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
Access violation in il2cpp::vm::String::New when SteamMatchmakingServers__RequestInternetServerList was creating a KeyValuePair #658
Comments
@garrynewman any idea what could possibly cause this or what could be tried as a workaround? This seems to be a very rare issue but still sometimes happens, and with the same callstack as above. The only key value pair array for filter should be empty as no AddFilter is called. Still, marshalling it sometimes crashes as if filters reference had become garbage. But I don't know why that would happen and the same pattern is used elsewhere, too. Related Facepunch code below:
|
This hadn't happened in a while and I was hoping it to have been fixed, but no, still happening here:
String.cpp:
Facepunch.Steamworks.Win643.cpp:
Full call stack:
|
I opened the dump with VS and managed to get some extra info. When MatchMakingKeyValuePair_t6F5741A605188A958AF99938D200629244FAD16D_marshal_pinvoke_back is called, its parameter "marshalled" is already non-null garbage. Could it be this is some IL2CPP or marshalling bug related to marshalling empty arrays of structs? When this is called, ___1_ppchFilters is a non-null pointer (can't see the length but assuming it is 0):
The next function is quite unreadable, but something goes wrong and it thinks the length of the array is more than 0 since it calls MatchMakingKeyValuePair_t6F5741A605188A958AF99938D200629244FAD16D_marshal_pinvoke_back in the end and crashes.
|
Opened a thread on Unity forums, too: https://forum.unity.com/threads/il2cpp-marshalling-issue-with-an-empty-arrays-of-structs.1423185/ |
…ry. This is an attempt to get rid of a very rare crash that seems to be related to the key value pair array crashing when being marshalled. One theory is that there is something wrong with GC and this change tries to prevent the array getting garbage collected. Now waiting to see if the crash still happens... More info: https://forum.unity.com/threads/il2cpp-marshalling-issue-with-an-empty-arrays-of-structs.1423185 Facepunch#658
Describe the bug
One player managed to crash the game by querying servers in the host list (having refreshed the list several times). I have not managed to reproduce it, but I got the dump file and according to it, the game crashed in il2cpp::vm::String::New when creating a MatchmakingKeyValuePair.
Not sure if this is a Unity, IL2CPP, Steam or Facepunch.Steamworks bug. Any ideas?
Crash text and relevant part of the callstack:
Unhandled exception at 0x00007FFCEE28EC13 (GameAssembly.dll) in crash.dmp: 0xC0000005: Access violation reading location 0x000002219D1AF030.
To Reproduce
Query for the server list several times. There were around 9 servers in the list when this happened. Couldn't be reproduced so this is probably something rare.
Calling Code
Expected behavior
No crashing ever.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: