-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
Navigator.push freezes the app on receipt of platform msg before AppLifeCycleState.resumed #13818
Comments
I am running into a very similar issue on Android (triggering FB SDK login flow instead of image picker). manually downgrading to 0.19 seems to resolve this, while master still seems broken. |
Marking m3 since this sounds like a regression. |
@Hixie thanks for prioritizing it. any suggested workaround? hacks? anything I can do to make it work? |
@oliverchang how do you |
@FastNinja I just did a git checkout to the 0.19 revision (fd7853f) in my flutter checkout. |
@Hixie This may not actually be an @FastNinja Until we fix this, it seems that delaying the var imageFile = await ImagePicker.pickImage();
await new Future.delayed(new Duration(milliseconds: 100));
Navigator.of(...).push(...) Wondering if the problem is bad interaction between navigation and the app lifecycle handling that takes place when the platform view (e.g. for ImagePicker, the image gallery) is dismissed and the |
I am not quite sure, but I think I ran into a similar issue both using the external barcodescanner- and location-plugins. Both seemed to disappear when downgrading to 0.0.19 as well as using @mravn-google 's delay method. The only difference with my problem is that the alert dialog I was trying to display (which is also being pushed after a platform call, hence this comment), seems to be being displayed, yet it is invisible. I noticed this, since I it seemed to "catch" all my taps that were hitting the invisible alertDialog, but once I tapped outside of the invisible alertDialog, it was dismissed properly and I could continue using my app as intended. mintware-de/flutter_barcode_reader#3 P.S.: I think I'll start writing a Sherlock Holmes-style book called "Ben Sower and the invisible alertDialog". |
Regression seems to have been introduced by #13344 (@FastNinja's example works fine just before that commit, and not after). Steps to reproduce on Android:
It appears we have a problem when step 2 above executes before AppLifeCycleState is back at resumed. If we postpone the /cc @Hixie |
Same issue was reported here #13600 |
cc @Hixie, another developer reported this on gitter today |
cc @jonahwilliams Does your patch for split-screen solve this too? |
If the original issue is referring to iOS behavior, no. However, I bet the root cause is similar, so I can start looking at it. The android instances I can verify. If it doesn't fix them, it may just make them less frequent. |
I can reproduce the iOS issue. It looks like frames are being scheduled correctly after returning from the image picker, however the animation to bring the route into view doesn't function correctly. Possibly it starts too soon? The overlay is blocking touch events too I believe, making it appear as though the app has frozen. However if you place a animating widget on the home page, you'll still see it animating correctly. |
Very weird. |
Did some ticker debugging after speaking with @yjbanov offline. It looks like we are creating the route transition ticker before resuming animating. As a result, it is getting canceled - and all of the animations that depend on it aren't firing.
|
How is it getting canceled? |
Actually - it looks like canceling is in the animation controller and expected. However, after that it tries to The ticker never gets resumed, I'm not sure if it should. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
Observations:
flutter update
i.e. it woeked on 4 weeks old flutter (dev branch)).This is the code that hangs (full sample app can be found here https://github.com/FastNinja/imagepickerissue
):
I have created the following repository to easily reproduce the issue.
https://github.com/FastNinja/imagepickerissue
It is the Minimum Possible App that reproduces the issue - single page with 2 buttons.
1st button just navigates to new screen. 2nd button picks an image and then navigates to new screen.
Using the image picker does not initiate navigation into new screen and the whole application gots frozen.
Logs
Run your application with
flutter run
and attach all the log output:Run
flutter analyze
and attach any output of that command also:Flutter Doctor
The text was updated successfully, but these errors were encountered: