DFHack / dfhack

Memory hacking library for Dwarf Fortress and a set of tools that use it
Other
1.88k stars 478 forks source link

DF crash when resizing its window #5003

Open ngc-6853 opened 1 month ago

ngc-6853 commented 1 month ago

Hello, I got a crash when resizing DF window from maximized to "half of the screen" - I play windowed, Windows OS. Please find attached the crash log, I was told by DFHack masters to report this here. I was playing a fort, and as far as I can remember there was nothing special on the screen at this time: no DF panel or DFHack interface except the usual logo, notification panel and civilian alert button. It is not the first time I have a crash when resizing but previous occurrences occurred months ago, I don't have crash logs. I tried to reproduce without success - most of the time, resizing the window works.

crash_2024-10-15-19-16-34.txt

ab9rf commented 1 month ago

after spending a decent amount of time looking into and discussing this, we believe this crash was caused by an unstable heap environment almost certainly caused by a bug in dwarf fortress. i've seen a substantial number of "random" 51.01 crashes that to me look like use-after-free crashes, so my expectation is that there's a memory management issue in dwarf fortress itself that is resulting in heap smashes, which obviously will cause random, difficult to localize, misbehavior

we can't mitigate heap smashes caused by the core game doing unspeakable things to pointers, so there's probably nothing we can to address this