raddebugger icon indicating copy to clipboard operation
raddebugger copied to clipboard

Crash after reloading dll sometimes

Open toodemhard opened this issue 10 months ago • 5 comments

I have a game with hot reloading and sometimes after recompile and the game reloads dll, raddebuger will crash. This isn't problem with compile errors because the dll still exists and rerunning works. Most of the time the reload works fine though. This isn't a critical issue for me just thought you might want to see the exception window info.

[Window Title]
Fatal Exception

[Content]
A fatal exception (code 0xc0000005) occurred. The process is terminating.

Press Ctrl+C to copy this text to clipboard, then create a new issue at
https://github.com/EpicGamesExt/raddebugger/issues

Call stack:
1. [0x7ff6ef2adef0] e_type_rhs_string_from_key +1568, eval_types.c line 1772
2. [0x7ff6ef3294c9] rd_string_from_eval_viz_row_column +3673, raddbg_views.c line 1147
3. [0x7ff6ef338a46] rd_watch_view_build +36310, raddbg_views.c line 2863
4. [0x7ff6ef242da9] rd_view_rule_ui_call_stack +457, raddbg_views.c line 5509
5. [0x7ff6ef36a8d2] rd_window_frame +185458, raddbg_core.c line 7628
6. [0x7ff6ef31ccda] rd_frame +94618, raddbg_core.c line 16696
7. [0x7ff6ef2b0a35] entry_point +8597, raddbg_main.c line 972
8. [0x7ff6ef3b30e8] w32_entry_point_caller +2536, os_core_win32.c line 1676
9. [0x7ff6ef3b319d] wWinMain +29, os_core_win32.c line 1689
10. [0x7ff6ef3b42b2] __scrt_common_main_seh +262, exe_common.inl line 288
11. [0x7ffa6315e8d7] KERNEL32
12. [0x7ffa6527fbcc] ntdll

Version: 0.9.13 [f792da5]

[Close]

toodemhard avatar Feb 23 '25 19:02 toodemhard

Can you try this on 0.9.14 and see if the issue still occurs?

ryanfleury avatar Feb 23 '25 21:02 ryanfleury

Just tried out on 0.9.14 but can't reproduce because it was quite infrequent so I will continue using it and let you know if it happens again. Did you already try to fix something like this on later versions?

toodemhard avatar Feb 23 '25 22:02 toodemhard

It happened again on 0.9.14 this time. Was after a hot reload recompile again.

[Window Title]
Fatal Exception

[Content]
A fatal exception (code 0xc0000005) occurred. The process is terminating.

Press Ctrl+C to copy this text to clipboard, then create a new issue at
https://github.com/EpicGamesExt/raddebugger/issues

Call stack:
1. [0x7ff76e17f1b0] e_type_rhs_string_from_key +1568, eval_types.c line 1797
2. [0x7ff76e1f8660] rd_string_from_eval_viz_row_column +3600, raddbg_views.c line 1155
3. [0x7ff76e207d19] rd_watch_view_build +36761, raddbg_views.c line 2874
4. [0x7ff76e102b29] rd_view_rule_ui_call_stack +457, raddbg_views.c line 5508
5. [0x7ff76e2394cc] rd_window_frame +183756, raddbg_core.c line 7610
6. [0x7ff76e1ec0ed] rd_frame +94285, raddbg_core.c line 16776
7. [0x7ff76e181dcd] entry_point +8829, raddbg_main.c line 974
8. [0x7ff76e280abe] w32_entry_point_caller +2542, os_core_win32.c line 1724
9. [0x7ff76e280b7d] wWinMain +29, os_core_win32.c line 1737
10. [0x7ff76e281c92] __scrt_common_main_seh +262, exe_common.inl line 288
11. [0x7ffa6315e8d7] KERNEL32
12. [0x7ffa6527fbcc] ntdll

Version: 0.9.14 [a40c26a]

[Close]

Image

toodemhard avatar Feb 24 '25 00:02 toodemhard

Sorry for the delay on this. Many parts of the evaluation system have been overhauled in 0.9.16, including the places where this crash occurred. Would you be able to give it a try on 0.9.16 now? I am not able to easily reproduce it with the hotloading tests I've got, unfortunately.

ryanfleury avatar May 07 '25 15:05 ryanfleury

Just tried to hot reload on 0.9.16 but no crash happened. If it still crashes I probably won't find it as quickly as last time because I finished working on the game. The crash happened quite a few times on 0.9.14 and even on 0.9.15 but I never realized anything reproducible about it.

Whenever the crash happened, after reopening there would be a new invalid target that I have to delete. Also if it could be anything about the way the hot reloading is done then everything is in this file: https://github.com/toodemhard/multiplayer_2/blob/main/src/platform/app.c.

toodemhard avatar May 07 '25 17:05 toodemhard

I think this hotloading setup should work fine. I think this bug has likely disappeared after the recent evaluation/evaluation-visualization/callstack system passes, since this was a crash in building type strings for function types in a call stack. Please let me know if you see it again.

ryanfleury avatar May 20 '25 23:05 ryanfleury

Yeah I think it was very likely fixed in the overhaul because I still have no crashes since 0.9.16.

toodemhard avatar May 20 '25 23:05 toodemhard