HaxeFlixel / HaxeFlixel/flixel
`FlxAtlasFrames`'s function `addAtlas()` may crash the game
Nobody has claimed this yet.
- Dominant language
- Haxe
- Stars
- 2.2k
- Forks
- 522
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with FlxAtlasFrames.addAtlas(), nested frames, and clearing the image cache. Inspect how frame graphics and their bitmaps are selected and destroyed during cache cleanup. Done means clearing the cache no longer leaves a cached graphic whose bitmap has been destroyed or causes the game to crash.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100