Skip to content
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

Dart analyzer terminates when running Flutter app #44574

Open
baku-apps opened this issue Dec 31, 2020 · 10 comments
Open

Dart analyzer terminates when running Flutter app #44574

baku-apps opened this issue Dec 31, 2020 · 10 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.

Comments

@baku-apps
Copy link

This issues was reported at [https://github.com/Dart-Code/Dart-Code/issues/2990] (Dart-Code/Dart-Code#2990), and asked by @DanTup to report the issues here.

The Dart Analyzer terminates when running the flutter app. However with flutter 1.22.4 and above I don't see a popup message that the analyzer has terminated (in VS Code). With Flutter 1.22.3 I do see a popup message asking me to restart the analyzer. Restarting the analyzer on app build works most of the time. (a manual restart later will loose hot reload as mentioned earlier).

Another issue is that the analyzer sometimes doesn't stop analyzing. Which makes everything slow and eats up resources.

All these Dart Analyzer issues seem to only happen in 1 project I'm working on.

See crashdump here:
dart.exe.13424.zip

@bwilkerson
Copy link
Member

@scheglov

@scheglov
Copy link
Contributor

scheglov commented Jan 1, 2021

@baku-apps Unfortunately without more details, like the example of code of which the analyzer does not stop analyzing, there is not much that I can do.

@scheglov scheglov added the area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. label Jan 1, 2021
@scheglov
Copy link
Contributor

scheglov commented Jan 1, 2021

+area-vm for checking the crashdump.

@DanTup
Copy link
Collaborator

DanTup commented Jan 1, 2021

@aam FYI - this may be similar to the watcher issues seen before, though still occurring in Flutter 1.22.4 (which I believe includes the previous fixes).

@aam
Copy link
Contributor

aam commented Jan 2, 2021

thank you @baku-apps . Is the crash dump in #44574 (comment) for flutter 1.22.4 and dart from that flutter distro? Is there a way to confirm that that dart sdk is what flutter analyzer uses when you experience the crashes/restarts?

@baku-apps
Copy link
Author

@aam the crashdump is made with version 1.22.3. However the same issue occurs also with 1.22.4 and 1.22.5. However, only for 1.22.3 I see in visuals studio a popup message that the Dart analyzer is terminated and if I want to restart it.

I'm using the dart sdk shipped with Flutter. I have re-installed Flutter and Dart several times and still have the same issue. It only happens with one particular project. And have not experienced it yet with other Flutter projects. Hope this information helps.

@DanTup
Copy link
Collaborator

DanTup commented Jan 5, 2021

@baku-apps are you able to capture a crash dump using 1.22.4/1.22.5? There were some changes in 1.22.4 intended to fix this, so a crash dump from 1.22.3 may not help understand why the issue still exists in the newer versions.

only for 1.22.3 I see in visuals studio a popup message that the Dart analyzer is terminated and if I want to restart it.

What's the behaviour you're seeing in 1.22.4? If there's no popup saying the analyzer terminated, could it be a different issue? I can't think of a reason the popup wouldn't appear if the analyzer process terminates so I wonder if you're seeing something else.

@DanTup
Copy link
Collaborator

DanTup commented Jan 13, 2021

I believe this is likely the issue described in #44650. It would explain why there's no "Analyzer Terminated" message - it's not the VM crash, but rather an error in the watcher that affects the servers state.

@baku-apps
Copy link
Author

@DanTup I'll try to add the crashdump for v1.22.4 and 1.22.5 before Friday.

@DanTup
Copy link
Collaborator

DanTup commented Jan 13, 2021

If I'm right about the above, I suspect you might not get a crash dump - it may be that the server is still running, but has bad state as a result of a file system watcher failure (which stops most completions from being returned). If that seems to be the case, we can close this in favour of #44650.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

5 participants