Skip to content

tommybuonomo/dart-release-compiler-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dart Compiler Release Issue

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 😀

Context of the issue

The initial issue has been declared on the flame repository during the developement of a game.

Getting Started

  • 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 a print("This print just fix the issue") into the setAwake method of the body.dart class.

Conclusion

The only explanation could be a compiler optimization issue in release mode that affects the body.dart method.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published