-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Intermittent VM Heap crash during hot-reload since Flutter 3.10/Dart 3.0 #126884
Comments
/cc @rmacnak-google
Without reproduction this will be hard to diagnose. If you find a way to reproduce this (even if just with some probability) that would help a lot |
Happens in our app as well. In my case happened 10/10 when added (while app was running) Widget? wid; as member to StatefulWidget and then in build() returned that wid if not null - otherwise assign to that wid member the widget to be returned from that build(). When hotreloaded with those added code it crashed. I am running M1X Mac with rosetta
|
Hi @johannesvuorinen, can you provide a minimal reproducible code sample since you're also experiencing this? |
Happens also in our app. Not sure how to reproduce it.
|
Was just coming to report this for Rive.app too and found this issue already opened. Same thing, after upgrading to Flutter 3.10 we often experience crashes when hot reloading:
|
Tried this out with a @johannesvuorinen If you have a 10/10 success rate reproducing it, could you try to make a minimal reproduction that can be shared? |
Print additional information upon detecting an invalid become mapping. TEST=ci Bug: flutter/flutter#126884 (speculative) Change-Id: If15713e1f25561da4a12a6f1954bd57864df18db Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303860 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
@rmacnak-google has a speculative fix here https://dart-review.googlesource.com/c/sdk/+/303860, this should roll into the latest flutter builds in a day or two, @johannesvuorinen in case you are not able to produce a minimal reproduction would it be possible for you to try your current app on the latest flutter version that would have this change to see if it fixes your problem. |
So far seems good. I built custom engine for mac debug with the dart sdk revision containing that change. |
Multiple team members confirming that the hot reload crash is not happening anymore with the newer dart sdk revision. |
@itsjustkevin this could be a potential candidate for cherry pick into stable, will file a cherry pick request on the Dart side |
Thanks for tagging this @slightfoot and thanks for bringing it to my attention @a-siva. I am going to remove the |
@itsjustkevin here is the cherry pick request dart-lang/sdk#52508 |
Hello people i am facing same issue when hot reloading and or when switch index in bottom navigation( not official bottom navigation but custom made bottom navigation bar with row and container) but it started happening all of sudden. it was working just fine any temporary workaround for now? thanks! 👍 |
@mkustermann Hello i think i have example that makes VM crash please take a look. https://0bin.net/paste/3BUixk1g#YFT4myK99oRf-fkm+1240JSHHtfv23ML5EZE6jmrj6L |
@VirtualAstronaut It seems to me that the example you provided goes into an infinite loop, consuming 100% CPU and RAM consumption goes continuously up. The reason is that creating the list will make it go into an infinite loop: child: ListView.builder(
shrinkWrap: true,
itemBuilder: (context, index) {
return _LeaveTile();
},
), => The So this seems unrelated. |
…Enum.values. Print additional information upon detecting an invalid become mapping. TEST=ci Bug: flutter/flutter#126884 Change-Id: If15713e1f25561da4a12a6f1954bd57864df18db Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305582 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Siva Annamalai <asiva@google.com> Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>
I am able to reproduce this issue. It happens a lot. I have two Flutter projects, one called fishm, the other one called fishm-packages. fishm is a runnable Flutter projects, it uses some packages which are defined in fishm-packages. When I change code in fishm-packages, if I do hot reload in fishm, it crashes. This only happenes after I upgrade to Flutter 3.10.2 |
Firstly, could you try with flutter If so, please provide precise instructions on how to reproduce the issue - otherwise we won't be able to diagnose the root cause. |
dart-lang/sdk@b28ac57 is now available in Flutter 3.10.3. |
@qtldleon can you try your application with Flutter 3.10.3, thanks. |
@slightfoot If you've been able to see this it would also be good to know if you can reproduce this with 3.10.3 (even if it's not reliably). |
@FlippedOvO looks like the issue you are running into is different from the one originally reported here by @slightfoot . Can you open a new issue and provide us with some reproduction instructions so we can investigate it. |
Other than the error received, everything is the same as the problem, including the operational steps. |
I haven't seen any crashes on hot reload anymore after upgrading to 3.10.3 |
@a-siva From Triage: Seems like we can close this as fixed in 3.10.3. Is the issue reported by @FlippedOvO tracked anywhere or are we repurposing this issue to track their observations as well? I'd prefer the former. |
I have asked @FlippedOvO to open a new issue but I don't believe he has done it yet. We should not repurpose this issue to track that issue, I would prefer a new issue with a reproduction is opened. |
I had same error as @slightfoot described in main description. And after update Flutter to latest stable version 3.10.4 I don't see the error anymore. |
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 |
Is there an existing issue for this?
Steps to reproduce
I am afraid I cannot reproduce with consistence, just every so often a hot-reload will crash with the reported log. Clean builds do not make a difference.
Expected results
Not to crash on hot-reload
Actual results
Crashing and application termination during hot-reload.
Code sample
No code available. This is not a framework issue. Rather a Dart/Engine issue.
Screenshots or Video
No response
Logs
Logs
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: