flixel
flixel copied to clipboard
`FlxAtlasFrames`'s function `addAtlas()` may crash the game
When using addAtlas() on a Frames and then clear the cache of the images, there is a chance that the graphics that its frames are nested to other frames are selected first, making it so the graphic doesnt get destroyed, but the main one gets destroyed.
This causes that the graphic is on the cache, even though the bitmap is destroyed, causing the game to basically crash.
do you have a simple repro?
I can give you the test bench that @EliteMasterEric gave to me regarding to this issue
https://github.com/EliteMasterEric/FlxAnimate-TestBench
I know it should be using a normal flixel project, but this one is the quickest I can give you if you need another one that doesnt involve this one, tell me and ill make one myself lol
Is there a specific thing thing i need to do to cause it to happen or is it ser up to happen right away
Is there a specific thing thing i need to do to cause it to happen or is it ser up to happen right away
The specific steps that reliably reproduce it are pressing 121312 (pressing different numbers switches to different FlxStates)
I believe the general reproduction is moving to the state containing the sprite, leaving and transitioning states some more to ensure the graphic is destroyed, then returning back. Moving away from the state and then directly back doesn't reproduce the issue.
thanks for the steps I'll check this out after the weekend