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
In the current Windows exception handler, a dialog box is shown by changing the instruction and stack pointers and then continuing execution.
_safe_esp is used as the new stack pointer.
ShowCrashlogWindow is used as the new instruction pointer.
_safe_esp is set to a value of the stack pointer of the main thread during initialisation. Therefore, this mechanism is not valid for handling crashes on non-main threads as the wrong stack would be used. When testing on 32 and 64 bit x86 the dialog box indeed failed to be displayed.
As the game loop and other functionality is now no longer in the main thread, crashes which are also not in the main thread can be expected to become less uncommon in future.
I've resolved this in my branch by using the top of stack from the thread environment block for non-main threads, but I don't expect you to necessarily be happy with that solution. I still thought it may be of interest to draw your attention to it though.
I did not add a fix for ARM as I've got no way of testing it, in principle you can use the same mechanism though. JGRennison/OpenTTD-patches@883e19f
The text was updated successfully, but these errors were encountered:
In the current Windows exception handler, a dialog box is shown by changing the instruction and stack pointers and then continuing execution.
_safe_esp is used as the new stack pointer.
ShowCrashlogWindow is used as the new instruction pointer.
_safe_esp is set to a value of the stack pointer of the main thread during initialisation. Therefore, this mechanism is not valid for handling crashes on non-main threads as the wrong stack would be used. When testing on 32 and 64 bit x86 the dialog box indeed failed to be displayed.
As the game loop and other functionality is now no longer in the main thread, crashes which are also not in the main thread can be expected to become less uncommon in future.
I've resolved this in my branch by using the top of stack from the thread environment block for non-main threads, but I don't expect you to necessarily be happy with that solution. I still thought it may be of interest to draw your attention to it though.
I did not add a fix for ARM as I've got no way of testing it, in principle you can use the same mechanism though.
JGRennison/OpenTTD-patches@883e19f
The text was updated successfully, but these errors were encountered: