Skip to content

Bad state: No element from TypeInferenceDependencyWalker.evaluate #33450

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

Closed
long1eu opened this issue Jun 14, 2018 · 4 comments
Closed

Bad state: No element from TypeInferenceDependencyWalker.evaluate #33450

long1eu opened this issue Jun 14, 2018 · 4 comments
Labels
analyzer-crash-report Issues which have been reported due to an analysis server crash legacy-area-analyzer Use area-devexp instead. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Milestone

Comments

@long1eu
Copy link

long1eu commented Jun 14, 2018

Analyzer Feedback from IntelliJ

Version information

  • IDEA 182.2757.3
  • 2.0.0-dev.56.0
  • IU-182.2757.3, JRE 1.8.0_152-release-1226-b7x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.13.5 unknown, screens 1920x1200, 1920x1200

Exception

report.txt

Dart analysis server, SDK version 2.0.0-dev.56.0, server version 1.20.3, error: Analysis failed: /Users/long1eu/IdeaProjects/qwil-app/qwil_chat/lib/src/selectors/window.dart
Bad state: No element
#0      List.single (dart:core-patch/dart:core/growable_array.dart:221)
#1      ExprBuilder.build (package:analyzer/src/summary/expr_builder.dart:284)
#2      ExprBuilder._pushLocalFunctionReference (package:analyzer/src/summary/expr_builder.dart:635)
#3      ExprBuilder.build (package:analyzer/src/summary/expr_builder.dart:228)
#4      ExprTypeComputer.compute (package:analyzer/src/summary/link.dart:2271)
#5      TypeInferenceNode.evaluate (package:analyzer/src/summary/link.dart:4852)
#6      TypeInferenceDependencyWalker.evaluate (package:analyzer/src/summary/link.dart:4698)
#7      DependencyWalker.walk.strongConnect (package:front_end/src/dependency_walker.dart:149)
#8      DependencyWalker.walk (package:front_end/src/dependency_walker.dart:168)
#9      VariableElementForLink.inferredType (package:analyzer/src/summary/link.dart:5121)
#10     TopLevelVariableElementForLink.link (package:analyzer/src/summary/link.dart:4681)
#11     CompilationUnitElementInBuildUnit.link (package:analyzer/src/summary/link.dart:1499)
#12     LibraryElementInBuildUnit.link (package:analyzer/src/summary/link.dart:3517)
#13     LibraryCycleNode.link (package:analyzer/src/summary/link.dart:3189)
#14     LibraryCycleDependencyWalker.evaluate (package:analyzer/src/summary/link.dart:3111)
@lrhn lrhn added legacy-area-analyzer Use area-devexp instead. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Jun 15, 2018
@victorvartan
Copy link

victorvartan commented Jul 1, 2018

I'm having the same "Bad state: No element" problem on Windows both with Visual Studio Code and Android Studio:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Built build\app\outputs\apk\debug\app-debug.apk.
I/FlutterActivityDelegate( 4012): onResume setting current activity to this
D/EGL_emulation( 4012): eglCreateContext: 0xe8945f20: maj 2 min 0 rcv 2
D/EGL_emulation( 4012): eglMakeCurrent: 0xe8945f20: ver 2 0 (tinfo 0xe0de3fb0)
I/Choreographer( 4012): Skipped 272 frames!  The application may be doing too much work on its main thread.
D/EGL_emulation( 4012): eglMakeCurrent: 0xe2c04900: ver 2 0 (tinfo 0xcc4580e0)
I/OpenGLRenderer( 4012): Davey! duration=5383ms; Flags=1, IntendedVsync=118841678781, Vsync=123375011933, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=123390879130, AnimationStart=123390963570, PerformTraversalsStart=123391077400, DrawStart=123414527620, SyncQueued=123415938410, SyncStart=123447475490, IssueDrawCommandsStart=123447881840, SwapBuffers=123724802470, FrameCompleted=124256871160, DequeueBufferDuration=72848000, QueueBufferDuration=3795000,
D/        ( 4012): HostConnection::get() New Host Connection established 0xe0de58c0, tid 4037
D/EGL_emulation( 4012): eglMakeCurrent: 0xe8945f20: ver 2 0 (tinfo 0xe0dff110)
Bad state: No elementBad state: No elementBad state: No elementBad state: No elementBad state: No elementBad state: No element

And then if I restart debugging I get:

Unable to hot reload. No instance of Flutter is currently running.
Unhandled exception:
Bad state: No element
#0      List.first (dart:core-patch/dart:core/array.dart:165)
#1      HotRunner._reloadSources.<anonymous closure> (package:flutter_tools/src/run_hot.dart:579)
#2      _rootRunUnary (dart:async/zone.dart:1134)
#3      _CustomZone.runUnary (dart:async/zone.dart:1031)
#4      _FutureListener.handleValue (dart:async/future_impl.dart:129)
#5      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:638)
#6      Future._propagateToListeners (dart:async/future_impl.dart:667)
#7      Future._completeWithValue (dart:async/future_impl.dart:482)
#8      Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:512)
#9      _rootRun (dart:async/zone.dart:1126)
#10     _CustomZone.run (dart:async/zone.dart:1023)
#11     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949)
#12     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#13     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)

The problem seems to be in packages\flutter_tools\lib\src\run_hot.dart apparently because some files are missing from the emulator, causing a list to be empty...
I tried some simple things like Wipe Data + Cold boot the emulator, deleted and re-added the emulator etc. and it's still not working.
The hot reload from the flutter run command has the same problem...
I also realized I was on the Flutter beta branch and switched to master but got the same errors there. Must be using the same Dart version. As this is just for a side project I hope I'll get some more spare time to dig deeper...

@bwilkerson bwilkerson added this to the Dart2.1 milestone Aug 28, 2018
@devoncarew devoncarew changed the title Bad state: No element Bad state: No element from TypeInferenceDependencyWalker.evaluate Sep 4, 2018
@devoncarew
Copy link
Member

cc @stereotype441

@devoncarew devoncarew modified the milestones: Dart2.1, PostDart2.1 Sep 5, 2018
@aadilmaan aadilmaan modified the milestones: Future, D25 Release Jun 4, 2019
@srawlins srawlins added the analyzer-crash-report Issues which have been reported due to an analysis server crash label Aug 30, 2019
@srawlins
Copy link
Member

This was reproduced by the analyzer team recently at #38084, which has more context; please follow along there.

@srawlins
Copy link
Member

Duplicate of #38084

@srawlins srawlins marked this as a duplicate of #38084 Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-crash-report Issues which have been reported due to an analysis server crash legacy-area-analyzer Use area-devexp instead. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

7 participants