Skip to content

ISteamMatchmakingServerListReponse & IL2CPP #700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
JamesMcGhee opened this issue Apr 15, 2025 · 4 comments
Open

ISteamMatchmakingServerListReponse & IL2CPP #700

JamesMcGhee opened this issue Apr 15, 2025 · 4 comments

Comments

@JamesMcGhee
Copy link
Contributor

JamesMcGhee commented Apr 15, 2025

We are seeing an error when compiling for IL2CPP if anything that uses ISteamMatchmakingServerListReponse is used, you get the following

NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code. The method we're attempting to marshal is: Steamworks.ISteamMatchmakingServerListResponse::InternalOnServerResponded
  at System.Runtime.InteropServices.Marshal.StructureToPtr[T] (T structure, System.IntPtr ptr, System.Boolean fDeleteOld) [0x00000] in <00000000000000000000000000000000>:0 
  at Steamworks.ISteamMatchmakingServerListResponse..ctor (Steamworks.ISteamMatchmakingServerListResponse+ServerResponded onServerResponded, Steamworks.ISteamMatchmakingServerListResponse+ServerFailedToRespond onServerFailedToRespond, Steamworks.ISteamMatchmakingServerListResponse+RefreshComplete onRefreshComplete) [0x0009d] in E:\GitHub\Steamworks.NET_TimelinePatch\com.rlabrecque.steamworks.net\Runtime\ISteamMatchmakingResponses.cs:62

I tested and confirmed myself under mono all is well, in editor (and thus mono) all is well ... in a build, the above error. To be clear that is when you run the build and then request a server list, you will get this error when the response is registered.

@JamesMcGhee
Copy link
Contributor Author

JamesMcGhee commented Apr 19, 2025

This seems to be related to #554 and #635. Apologies for the duplicate I didn't see the others in the list when I skimmed through.
That said this is an outstanding issue that is blocking a couple groups I know if there is anything I can do to help let me know, I glanced through your code and the way this particular callback is handled is a bit different than the others but I didn't dive deep once I saw the issue was in the wrapper I came here.

By the way, I noted you have 136 open issues. I'm happy to try and help with Steamworks.NET support, we more or less do that anyway through our community. My first recommendation would be to clean up some of these cases; more than a few are no longer relevant and can be closed. Quite a few are duplicates and can be merged, whittling it down to the actual set of open cases would help identify the "known issues" ... which I can help you do that part no problem. With a list of known issues, it would be easier to address them as a community, hopefully saving you work overall in that you can mostly then just merge the community's changes in as appropriate.

@JamesMcGhee
Copy link
Contributor Author

@kimlaya is that a workaround for the issue?
if so why not branch and merge request?

@westonleavitt
Copy link

westonleavitt commented Apr 20, 2025

@JamesMcGhee

I actually think I have it fixed and functioning for the server call.

No clue how many or if there are others callbacks in the API that need fixed but this at least appears to be fixing in our latest build.

I'm just testing on my end then will submit the changes.

@JamesMcGhee
Copy link
Contributor Author

@westonleavitt, very nice do you have a fork you can share?
I can share it with our community get more testing done on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants