You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ flutter doctor -v
[✓] Flutter (Channel beta, 3.16.0-0.4.pre, on Ubuntu 22.04.3 LTS
6.2.0-36-generic, locale en_US.UTF-8)
• Flutter version 3.16.0-0.4.pre on channel beta at
/home/misha/snap/flutter/common/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 379c3f4d37 (5 days ago), 2023-11-01 11:34:49 -0700
• Engine revision abdaabc6dc
• Dart version 3.2.0 (build 3.2.0-210.4.beta)
• DevTools version 2.28.1
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /home/misha/Android/Sdk
• Platform android-33, build-tools 33.0.2
• ANDROID_HOME = /home/misha/Android/Sdk
• Java binary at: /opt/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• clang version 10.0.0-4ubuntu1
• cmake version 3.16.3
• ninja version 1.10.0
• pkg-config version 0.29.1
[✓] Android Studio (version 2020.3)
• Android Studio at /opt/android-studio
• 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 11.0.10+0-b96-7249189)
[✓] VS Code (version 1.84.1)
• VS Code at /usr/share/code
• Flutter extension version 3.76.0
[✓] Connected device (2 available)
• Linux (desktop) • linux • linux-x64 • Ubuntu 22.04.3 LTS
6.2.0-36-generic
• Chrome (web) • chrome • web-javascript • Google Chrome 118.0.5993.117
[✓] Network resources
• All expected network resources are available.
• No issues found!
More environment information
Flame version: 1.10.1
Platform affected: tested on Linux (Ubuntu 22.04)
Log information
N/A
More information
This was happening on 1.9.1 as well, I upgraded to 1.10.1 in order to see if it was resolved.
Edit: On further research, it looks like leaving the iterator open is the culprit. If you do not go through all the elements produced by componentsAtPoint, the bug occurs. I'm not aware if fully consuming all iterators in Dart is good practice or anything, I would expect the processing to just sort of stop at that position.
The text was updated successfully, but these errors were encountered:
misha
changed the title
Using an iterator with TapDetector appears to break rendering
Partially consuming the output of componentsAtPoint breaks rendering
Nov 7, 2023
Current bug behavior
I have a game with a red
CircleComponent
usingTapDetector
. In theonTapUp
callback, I have the following code:I expected this code to be free of side effects and do basically nothing.
However, if you tap the circle 4 times, the circle goes away.
The critical part appears to be the call to
moveNext
. The bug does not occur without it.Expected behavior
The circle should not go away.
Steps to reproduce
Basically what is in the description. I have a repository containing the code here:
https://github.com/misha/flame_debug
Flutter doctor output
More environment information
Log information
N/A
More information
This was happening on 1.9.1 as well, I upgraded to 1.10.1 in order to see if it was resolved.
Edit: On further research, it looks like leaving the iterator open is the culprit. If you do not go through all the elements produced by
componentsAtPoint
, the bug occurs. I'm not aware if fully consuming all iterators in Dart is good practice or anything, I would expect the processing to just sort of stop at that position.The text was updated successfully, but these errors were encountered: