You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally, I investigated an issue where someone couldn't get the debugger to work on a sonic fangame. The game is publicly accessible here: http://hedgehog.exposed/win
Notably, this game uses a very old Unity version: 4.6.6p3 which I found was related to this issue. After messing with logging, I found that the issue is the call to mono_debug_domain_create and I found something unexpected: it appears this function simply didn't exist in the game's mono's export table which explains why the call failed.
But what's interesting is I checked the export table of a couple of old unity mono games I had and I found that somewhere in the 5.x range, the symbol stopped to appear. After checking the unity mono's sources, I landed on this: Unity-Technologies/mono#399
This PR would suggest that the first version Unity shipped a mono with this symbol exposed is 5.5.0 (the change appears in the unity 5.5 branch, but not 5.4). This matches my testing: I found a missing symbol on a 5.3 game, but the symbol was present on a 5.5 game. All the ones with the symbol present could have the debug server start without crashes while all the ones with the symbol absent could reproduce the same crash I observed. This indicates the issue is for very old unity games, Doorstop's debug server simply doesn't work.
What I found interesting is if I simply commented out the call, debugging seemed to work. I at least could hit a breakpoint, but where I am unsure is I am not sure of the implications of not calling this. I am not familiar enough with mono's internals to know what's the best way to address this. What I do know is that we definitely can't lookup the function by name on these old mono. This suggest we might want to first check if the symbol exists and call it if it does, but what if it doesn't? What should we do in this case?
The text was updated successfully, but these errors were encountered:
Originally, I investigated an issue where someone couldn't get the debugger to work on a sonic fangame. The game is publicly accessible here: http://hedgehog.exposed/win
Notably, this game uses a very old Unity version: 4.6.6p3 which I found was related to this issue. After messing with logging, I found that the issue is the call to
mono_debug_domain_create
and I found something unexpected: it appears this function simply didn't exist in the game's mono's export table which explains why the call failed.But what's interesting is I checked the export table of a couple of old unity mono games I had and I found that somewhere in the 5.x range, the symbol stopped to appear. After checking the unity mono's sources, I landed on this: Unity-Technologies/mono#399
This PR would suggest that the first version Unity shipped a mono with this symbol exposed is 5.5.0 (the change appears in the unity 5.5 branch, but not 5.4). This matches my testing: I found a missing symbol on a 5.3 game, but the symbol was present on a 5.5 game. All the ones with the symbol present could have the debug server start without crashes while all the ones with the symbol absent could reproduce the same crash I observed. This indicates the issue is for very old unity games, Doorstop's debug server simply doesn't work.
What I found interesting is if I simply commented out the call, debugging seemed to work. I at least could hit a breakpoint, but where I am unsure is I am not sure of the implications of not calling this. I am not familiar enough with mono's internals to know what's the best way to address this. What I do know is that we definitely can't lookup the function by name on these old mono. This suggest we might want to first check if the symbol exists and call it if it does, but what if it doesn't? What should we do in this case?
The text was updated successfully, but these errors were encountered: