This package only suppose to generate a bug using flame that happens only in release mode. To resume this project, it's a tiny project that used flame with the box2d plugin. It adds one worm in the world every 500ms. I remove the worms after 5 seconds in the world. If a worm have the bug, it will be colored in black, and it will not be removed from the world (to let the bug visible). Sometimes it takes 10 seconds for the bug to happen, sometimes 3 minutes, so be patient 😀
The initial issue has been declared on the flame repository during the developement of a game.
- Clone the project
- Launch the application (iOS or Android, no matter) in release mode.
- The bug will happen randomly, most of the time in less than 3 minutes. When the bug happens, I color the affected linked bodies in black. (the work is a group of 7 bodies linked by joints). Sometimes, even the static bodies (top, left, bottom and right walls) are randomly move and deleted from the world. The bug is not a code issue. Some variables into body.dart are randomly changed during the execution of the game
- Checkout to the
bug-fixed
branch. Now the bug is gone, and the ONLY difference between the 2 branches is this commit that only add aprint("This print just fix the issue")
into thesetAwake
method of thebody.dart
class.
The only explanation could be a compiler optimization issue in release mode that affects the body.dart
method.