thpatch / thcrap

Touhou Community Reliant Automatic Patcher
https://www.thpatch.net
The Unlicense
558 stars 41 forks source link

th07 will crash when showing the boss introduction image when the window/fullscreen mode was changed ingame #131

Closed 32th-System closed 3 years ago

32th-System commented 3 years ago

The exact problem: when the game starts or when the window/fullscreen mode is changed by the game, BP_textmage_init will run. The first time it runs it will store a bunch of pointers. When it runs again, it will realize that it already stored those pointers and will therefore not do anything. The problem: switching between window and fullscreen mode made these pointers out of date because the memory they point to got freed. Therefore, when textimage_commit tries to use the SpriteSlots pointer for example, it causes the game to crash.

Workarounds I have tried: