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:
Making BP_textimage_init reinitialize those pointers every time it runs -> boss intro images get replaced by solid white.
Making BP_textimage_init run all of it's code every time it's run -> immediate crash when switching between window and fullscreen mode.
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: