-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Assert in libtimer_impl.dart #33838
Comments
There was a hot reload test failure in an engine roll that looks similar to this: https://cirrus-ci.com/task/6149166369603584
|
I've seen this in Dart Code's integration tests too (Flutter Ver: 1.1.2, Linux):
|
I get this assert failure about 20% of the time when launching a debug build of a Flutter app on an Android device. |
|
This just happened to me on
Flutter Doctor
|
happened to me as well today on stable.. |
happened to me as well today on master.. |
same problem in an isolate launched from android. Goes away with a longer Duration before the timer triggers.. from 1 seconds to 4 seconds. I start the timer as the first thing in the isolate. Running on an intel vm of android. I don't see a problem when using my ARM phone.
|
@rmawatson or anyone else, what's the easiest way to reproduce this? I haven't been able to repro this at all yet. Based on @rmawatson's description, I'm currently running the demo app and launching an isolate as soon as the app starts that runs this function:
This seems to work correctly no matter how often I restart or hot-reload. None of the timers seem to trigger the assert. Is there something else I need to do? I'm running on an x86 android emulator. |
This happened to me only when starting up an isolate from Android and using the timer. And only when running in a virtual machine. I used the 7.1 64bit version in vmware from https://www.osboxes.org/android-x86/ - It was ok on my Android 6.0 phone. in dart.
In the android activity.
Edit: |
I think all instances I've seen of this have been during hot reloads right after the verbose log says ext.flutter.evict is being called:
|
For me it was definitely related to reload, but sort of the opposite of many of the comments that I see. It turned out that I used the property "debugShowCheckedModeBanner" for the initial MaterialApp object, but got the error when I launched the debugger. When I comment it out and then start the application again, the error does not occur. Finally, I then un-comment the line (while the app is already loaded) and the error still does not appear. It seems to be only occurring on the initial start of the app. I believe this to be a flutter bug on load sequence and possibly a race condition issue. |
@kikang72 Can you reproduce that from a simple |
I am using VS Code. I just ran a "flutter create" with the line commented and un-commented. Both succeeded. updated: I did just notice that when I do "flutter run" that the "debugShowCheckedModeBanner" line is ignored even though I have it set to false. |
Yeah, I suspected that may happen when you mentioned it. VS Code keeps track of whether the banner is on or off (you can toggle it from a command) and re-transmits it when the app starts. At the time I wrote that I didn't realise it could be hard-coded as off in the app, so it's likely we're overwriting it immediately at startup. I've opened Dart-Code/Dart-Code#1474 about that. |
I'm not sure if more data helps, but I'm seeing the same while trying to track down flakes in Dart DevTools tests too. Like the Flutter + Dart Code ones mentioned above, it was during a hot reload.
|
Same here. Been seeing this for the last few days. Any thoughts how to get rid of it?
|
When this error appears in the logs, my app's RPC code fails or callbacks fail to run. I don't know if it's a bug in my code or in the Flutter runtime. It happens often in the Android API 28 image and rarely in the API 21 image. I haven't noticed it in iOS Simulator. Would someone please investigate?
|
happened to me today... I am not using timers at all... during a hot restart... running on a samsung S6 |
Please let me know if there is anything we can do to help diagnose this issue. I see this issue periodically as well on a iOS emulator. |
This seems to fix the issue, but it's a flaky crash so it's hard to 100% verify. Bug: #33838 Bug: flutter/devtools#337 Change-Id: Ic037a94cfb9fe7da319d7d4b20e3a3efd0c7289f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97541 Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Liam Appelbe <liama@google.com>
I think that change fixed the bug, but since it's an uncommon flake it's a bit hard to 100% verify. Closing for now, but let me know if it still happens after applying the change. |
I am facing this error.
How can i fix it ? it is random behaviour of the app . |
@ch-muhammad-adil the fix mentioned above was only committed recently so is not in the Stable version of Flutter yet. You could try switching to the Master channel to see if the issue goes away (see https://github.com/flutter/flutter/wiki/Flutter-build-release-channels#how-to-change-channels) though be aware that's bleeding-edge code so you may come across other issues (in which case you may wish to wait until the fix makes it to dev, beta or the stable channel). |
Thank @DanTup , i will wait for it than. |
We have reports of this occurring with google3 customers, and it can be reliably reproduced externally as well.
|
@jonahwilliams I tried those steps and wasn't able to reproduce it. This particular assertion can't really be triggered anymore, because my change removed it. I'm not sure if the change is in stable yet. It's possible that the people reporting the issue don't have the fix yet. Alternatively, it might be a similar looking but different assertion. If so, can you file a new issue and include a stack trace? |
Got this today..
|
also have this issue:
|
@mliitfall what version of the Flutter SDK are you running? |
@jacob314 it's randomly happen, i need to hot restart to run the app again
|
As soon as Flutter releases the next stable version you will stop seeing the issue. You can also switch to the Beta channel if the issue is blocking your work. Thanks, |
Synced to the following version of flutter I sometimes see this spurious looking assert.
flutter/flutter@700cb76
The assert that triggers is here. Likely the call to cancelWakeup should be skipped if the _sendPort is null or _scheduledWakeupTime is already null.
Stack trace:
The text was updated successfully, but these errors were encountered: