-
-
Notifications
You must be signed in to change notification settings - Fork 915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flame throws exception in Web / Chrome on Restart #3345
Comments
Interesting, this sounds like a Flutter issue. |
Note the pure Flutter app does not throw, only with Flame (see reproduce steps) I would need to install something to manage multiple flutter versions, what do you recommend? Or use |
Yeah I noticed that, it can still be a Flutter issue though.
If Flutter downgrade takes you far enough back that works, otherwise I'd recommend https://fvm.app |
OK, this is pretty weird. I am seeing the same error on my Windows machine with Flutter 3.19.6. But this time it also throws in the Flutter app, not just with Flame. Update: I then upgraded Flutter on the Windows Machine to the current version 3.24.3 and created a new Project, first pure Flutter then the Flame example (as described in how to reproduce above). Only the Flame app throws, same behaviour as described above. |
What happened?
Minimal Flame example throws Exception in Flutter Web with message "Trying to render a disposed EngineFlutterView." (to reproduce see below). Tested with Flame 1.20 and 1.19 / Flutter 3.24.3 / VSCode on Mac with Chrome
What do you expect?
No exception thrown
How can we reproduce this?
Flutter -> New Project -> Empty Application
Select Chrome / Web
Run / Debug
Open Javascript console
Restart (try a few times)
--> Exception is not thrown
In Terminal
flutter pub add flame
replace contents of main.dart with
(same as https://docs.flame-engine.org/latest/tutorials/bare_flame_game.html)
--> Exception is thrown
What steps should take to fix this?
Hmmmmmmmmmmmmm
Do have an example of where the bug occurs?
see above
this error does not occur in the zap.run environment which does not implement restart
Relevant log output
Execute in a terminal and put output into the code block below
Output of: flutter doctor -v
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0.1 24A348 darwin-x64, locale
en-GB)
• Flutter version 3.24.3 on channel stable at
/Users/m/root/dev/flutter/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2663184aa7 (5 weeks ago), 2024-09-11 16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at /Users/m/Library/Android/sdk
• Platform android-34, build-tools 35.0.0
• Java binary at: /Applications/Android
Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
17.0.11+0-17.0.11b1207.24-11852314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16A242d
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
17.0.11+0-17.0.11b1207.24-11852314)
[✓] VS Code (version 1.94.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.98.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS
15.0.1 24A348 darwin-x64
• Chrome (web) • chrome • web-javascript • Google
Chrome 129.0.6668.101
! Device emulator-5562 is offline.
[✓] Network resources
• All expected network resources are available.
Affected platforms
Web
Other information
Haven't seen this before
Are you interested in working on a PR for this?
The text was updated successfully, but these errors were encountered: