Issue Type: Bug
Extension version: 3.7.1
VS Code version: Code 1.41.1 (26076a4de974ead31f97692a0d32f90d735645c0, 2019-12-18T14:58:56.166Z)
OS version: Windows_NT x64 10.0.18363
System Info
|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (4 x 2400)|
|GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|7.92GB (0.99GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|
This sounds a little like https://github.com/flutter/flutter/issues/46616 which I've had no luck tracking down yet.
Can you reproduce this on a small project (for example the output of flutter create)? Could you capture an instrumentation log (see https://github.com/flutter/flutter/issues/46616#issuecomment-567120293) for this happening?
Strangely, I can't reproduce the error. But it seems it happens when you have a big project. The Analyzer seems to be having problems while reading your code and reading the debug output of the app while running it on debug mode. I'll comment something here when it happens again.
The Analyzer seems to be having problems while reading your code and reading the debug output of the app while running it on debug mode
The analyzer doesn't read any output from Flutter - however my suspicion is that it's because it's analyzing the content being written by Flutter into .dart_tool/build folders and something there is causing it to crash (possibly along the same lines of https://github.com/dart-lang/sdk/issues/31564).
If it comes back, please do try to capture an instrumentation log, as seeing what's being analyzed for the period leading up to it terminating might be useful. It'd also be useful to know what type of project/device you're running on, in case it's specific to that.
I actually experienced this issue in Android Studio as well (though not as annoying as in VS Code). I have an instrumentation log just before it happened, do I email it to [email protected]?
Sure - if you can't post it publicly you can email it to me there (please ensure there's nothing sensitive in there). If it's huge, probably on the last few tens(/hundreds) of lines are relevant (if at all). Previously logs didn't reveal much, I'm still a bit unsure what's going on (I've tried a few times to reproduce with no luck).
Other things that would help:
flutter create app)Sorry for the delay, I will try to reproduce it few more times. From my experience, running flutter run --debug from the command prompt / PowerShell (yes, Windows) instead of using the extension seems to lessen the occurrence in VS Code, just one termination when building for the first time, but it breeze trough subsequent hot reloads / hot restarts.
Waiting for this.
Here is the analyzerInstrumentation.txt log file.
Now it happens a lot when I do flutter clean then press "Debug with Dart & Flutter" then hover on any class, methods and or variables.
Thanks - unfortunately the log doesn't seem to contain anything that stands out. Definitely seems to match the reports in https://github.com/flutter/flutter/issues/46616, but still no joy in reproducing here.
I think this is an issue with the PC resources. When Flutter builds, it takes up a lot of resources, and when you hover on any of your code, the Dart Analyzer kicks in and tries to take some resources which is isn't available much and then crashes if it can't get much resource. If this is not the case on those people who have a very "High-End Specs" PC's, I think maybe that is what is happening.
I believe the analyzer has already terminated at the point that you hover - we just don't show a notification until something next tries to use the analyzer (I'll try to improve this, so there's instant feedback when it crashes).
Can you reproduce this with Task Manager (or similar) open to see what the resource usage is like when this happens?
(also, can you post rough specs of your machine?)
Here is the machine that I use -> https://support.hp.com/ph-en/document/c04799946.
And this the the resource while building:

I don't think is a resource problem, because my laptop is an i5 8365U 16GB RAM SDD M2 256GB and build time is short.
Yesterday happened to work for like 2 hours without this error. Really weird. I personally noticed longer build time for flutter with CPU around 99%-100%, on hotfix5 and 6, which are usually spamming me with the analyzer exception. I switched to hotfix4 + dart plugin 3.7.1 since with this flutter seem to work well for time being.
I was able to reproduce this (see https://github.com/flutter/flutter/issues/46616#issuecomment-574180181). Seems like it may only occur on Windows (which is why it took me a while - I mostly use Mac). I'll ping here/close this issue once a fix has landed.
I've landed a fix which is now available in Flutter's master channel. It solves the repro cases I had, though one user has reported it still happening. Please try updating to see if it fixes for you (and post back on https://github.com/flutter/flutter/issues/46616#issuecomment-575556867).