From https://github.com/flutter/flutter/issues/46616 several races were fixed and flutter concerns seem to be addressed, but repro that @DanTup referenced there sill causes crashes in Danny's set up.
Crashdump is available here https://drive.google.com/a/google.com/file/d/186LwO1g9p-eCW9jFmX7sqfhPSmM1hUlI/view?usp=sharing
Although my repro was quite contrived, I think https://github.com/Dart-Code/Dart-Code/issues/2287#issuecomment-596504992 may be a user still hitting this when working on Flutter (using the master branch it's happening less, but still happening).
@ZichangG Have you tried if this crash can be reproduced?
This has come up a few times again in https://github.com/Dart-Code/Dart-Code/issues/2704 where running a Flutter app crashes the analysis server. Although I can't reproduce it when running the Flutter app, I have reproduced it a few times running flutter clean.
flutter cleanDart Analyzer has terminatedIf it doesn't repro, I just re-run the app, stop it, then clean.
Here is a crash dump:
https://drive.google.com/file/d/119wljBikMtmlE2iQsEKaMUEa9NtMQL7x/view?usp=sharing
The version of Flutter I used was
Flutter 1.21.0-8.0.pre.140 • channel master • https://github.com/DanTup/flutter.git
Framework • revision c8d051295a (7 hours ago) • 2020-08-11 00:26:02 -0400
Engine • revision a62703778b
Tools • Dart 2.10.0 (build 2.10.0-5.0.dev e2a67723ca)
Last things in the analyzer instrumentation log are:
1597143277987:Req:{"id"::"68","method"::"edit.getAssists","params"::{"file"::"M::\\Dev\\Google\\flutter_gallery\\lib\\main.dart","length"::0,"offset"::1041},"clientRequestTime"::1597143277987}
1597143277987:Req:{"id"::"69","method"::"edit.getAvailableRefactorings","params"::{"file"::"M::\\Dev\\Google\\flutter_gallery\\lib\\main.dart","length"::0,"offset"::1041},"clientRequestTime"::1597143277987}
1597143277988:Res:{"id"::"69","result"::{"kinds"::[]}}
1597143277992:Res:{"id"::"68","result"::{"assists"::[]}}
1597143280839:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\71910eb539bb7711546ff654f08685af\gen_localizations.stamp:remove
1597143280840:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\activity\R.java:remove
1597143280841:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\arch\core\R.java:remove
1597143280841:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\core\R.java:remove
1597143280843:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\customview\R.java:remove
1597143280844:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\fragment\R.java:remove
1597143280844:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\lifecycle\livedata\core\R.java:remove
1597143280844:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\lifecycle\livedata\R.java:remove
1597143280844:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\lifecycle\R.java:remove
1597143280845:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\lifecycle\viewmodel\R.java:remove
1597143280845:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\loader\R.java:remove
1597143280845:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\savedstate\R.java:remove
1597143280845:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\versionedparcelable\R.java:remove
1597143280845:Watch:M::\Dev\Google\flutter_gallery:M::\Dev\Google\flutter_gallery\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\viewpager\R.java:remove
Full analyzer instrumentation log: analyzer.instrum.txt
@zichangg @a-siva - Danny's been seeing user reports of this more often. It may or may not be the same as the issue reported in January. Danny does have a consistent repro for this (as well as a crash dump), and is happy to test out possible fixes.
@DanTup if you have consistent repro instructions could you post them here.
@a-siva I posted some notes above with a crash dump: https://github.com/dart-lang/sdk/issues/40348#issuecomment-671877859
It doesn't repro 100% of the time, but if I build/clean a few times, it happens maybe 1-2 times in 5 on my PC.
I am able to repro this issue with the following steps:
flutter create dart_issue_40348flutter cleanflutter doctor -v:
[√] Flutter (Channel stable, 1.20.2, on Microsoft Windows [Version 10.0.19041.450], locale de-DE)
• Flutter version 1.20.2 at C:\src\flutter
• Framework revision bbfbf1770c (13 days ago), 2020-08-13 08:33:09 -0700
• Engine revision 9d5b21729f
• Dart version 2.9.1
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\android-sdk
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = C:\android-sdk
• ANDROID_SDK_ROOT = C:\android-sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 48.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.48.2)
• VS Code at C:\Users\Stephan\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.13.2
[√] Connected device (1 available)
• AOSP on IA Emulator (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• No issues found!
In my real project I'm working on I don't have to emit a flutter clean during the debugging sessions to get the "Dart Analyzer.." messages popping up. I just starts to happen while or after debugging and editing code.
I already struggled with issue flutter/flutter#46616 some times ago, which was resolved for me by the fixes mentioned there.
BTW my Windows development machine is rather old, maybe it's some timing issue?
I'm still encountering the same issue with the latest dart-code and Flutter SDK. If there is any cleanup procedures needs to be done, please let us know. Thank you.
Dart-Code-Log-.txt
@elricym I believe the issue has been fairly recently re-fixed in 04879fa4cdc2fc173b99472bae186feecc7e08e0. I don't think that fix has made a stable Flutter release yet.
If you can still repro on a version of Flutter that includes that fix (which right now is probably only master/dev branches) then it might be worth getting a crash dump.
@DanTup Oh sorry, I thought the latest1.20.3 version is related to this issue.
@elricym unfortunately not. The easiest way I've found to check if a Dart SDK change is in the Flutter SDK you have is to run flutter --version and check the Tools/Dart version. For example here it's 2.10, though for your Flutter version it's likely v2.9.x:

Then if you find the changeset you're interested in in the Dart SDK repo and click the "..." to expand the tags list, you can see which SDK versions include that fix:

For this one, it's only been included in the releases since 2.10.0-77.0.dev, so isn't present in v2.9.
Hope this makes sense!
@a-siva reopened, but seems like it can be closed, please take a look
I believe there's still an issue here. There was a fix made (that was accidentally lost, then re-applied), but the original comment here referred to a crash I could still repro with the fix.
I tested again using my same scripts using the current nightly and it happened for 2 out of 11 attempts:
Faulting application name: dart.exe, version: 0.0.0.0, time stamp: 0x5f6b6547
Faulting module name: ntdll.dll, version: 10.0.19041.488, time stamp: 0x70e69bad
Exception code: 0xc0000005
Fault offset: 0x0000000000045e16
Faulting process ID: 0x3b0
Faulting application start time: 0x01d691cb5e1b2f0c
Faulting application path: N:\Apps\Dart\nightly-2020-09-23\bin\dart.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report ID: df6eb070-a200-4dde-b962-7cea3f4701e0
Faulting package full name:
Faulting package-relative application ID:
Here's a crash dump:
https://drive.google.com/file/d/1wFVekU_2jn16IEmiaiNN-9nwSgz0xZSe/view?usp=sharing
/cc @aam
@DanTup wrote
I tested again using my same scripts using the current nightly and it happened for 2 out of 11 attempts:
What are the scripts Danny?
The ones where first one watches a large directory(several gbs) with large number of files(tens of thousands), second one deletes that whole directory?
@amm yep! If you don't still have them, you can get them at https://github.com/flutter/flutter/issues/46616#issuecomment-576799743 (I copied them from there yesterday, so that's exactly the code I ran).
@aam using the VM you sent me I didn't see the crash in 20 runs. It was fairly intermittent so no guarantees, but it does seem like it may have fixed/improve it :-)
Thanks @DanTup ! I have put together https://dart-review.googlesource.com/c/sdk/+/164340 with the fix.
Great! I had another report of what may be this still occurring on Flutter master (which has the original fix), so I wonder if it could be this (https://github.com/Dart-Code/Dart-Code/issues/2814).
I had another report of this from @szerner on Flutter's dev channel which includes the latest fix made above, so this may still be an issue.
https://github.com/Dart-Code/Dart-Code/issues/2814#issuecomment-705014402
@szerner if you able to repro this on a clean Flutter project it may be useful to collect a crash dump (https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps).
The issue still occurs with Flutter Channel stable, 1.22.0
The issue still occurs with Flutter Channel stable, 1.22.0
See here @DanTup's comment, the current stable version does not yet contain the fix. At the moment you have to switch to the dev or master channel.
Hello devs!
I managed to solve this by doing the following steps:
It was a success! I hope I can help them 😀
Hello devs!
I managed to solve this by doing the following steps ...
Thanks @felipecastrosales , but in my case this procedure didn't help. Nice you've got a solution for your issue!
Most helpful comment
The issue still occurs with Flutter Channel stable, 1.22.0