Open ds84182 opened 5 years ago
Code here
Haven't tried 2.3.0 builds yet, so this might have been fixed already?
Crashes with this message (in DartPad):
Error compiling to JavaScript: main.dart: Internal Error: The compiler crashed when compiling this element. The compiler is broken. When compiling the above element, the compiler crashed. It is not possible to tell if this is caused by a problem in your program or not. Regardless, the compiler should not crash. The Dart team would greatly appreciate if you would take a moment to report this problem at http://dartbug.com/new. Please include the following information: * the name and version of your operating system, * the Dart SDK build number (2.2.0), and * the entire message you see here (including the full stack trace below as well as the source location above). The compiler crashed: Crash when compiling file:///tmp/dartpadGXCKCQ/main.dart, at character offset 1063: NoSuchMethodError: The method 'accept' was called on null. Receiver: null Tried calling: accept(Instance of '_TypeSchemaEliminationVisitor') #0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5) #1 _TypeSchemaEliminationVisitor.run (package:front_end/src/fasta/type_inference/type_schema_elimination.dart:126:25) #2 greatestClosure (package:front_end/src/fasta/type_inference/type_schema_elimination.dart:26:35) #3 new ClosureContext (package:front_end/src/fasta/type_inference/type_inferrer.dart:223:9) #4 TypeInferrerImpl.inferLocalFunction (package:front_end/src/fasta/type_inference/type_inferrer.dart:1464:41) #5 InferenceVisitor.visitFunctionNodeJudgment (file:///b/s/w/ir/cache/builder/sdk/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart:412:21) #6 InferenceVisitor.visitFunctionExpression (file:///b/s/w/ir/cache/builder/sdk/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart:427:27) #7 FunctionExpression.accept1 (package:kernel/ast.dart:3584:43) #8 ShadowTypeInferrer.inferExpression (package:front_end/src/fasta/kernel/kernel_shadow_ast.dart:1515:18) #9 TypeInferrerImpl.inferInvocation.<anonymous closure> (package:front_end/src/fasta/type_inference/type_inferrer.dart:1251:28) #10 TypeInferrerImpl._forEachArgument (package:front_end/src/fasta/type_inference/type_inferrer.dart:1826:15) #11 TypeInferrerImpl.inferInvocation (package:front_end/src/fasta/type_inference/type_inferrer.dart:1244:5) #12 TypeInferrerImpl.inferMethodInvocation (package:front_end/src/fasta/type_inference/type_inferrer.dart:1560:27) #13 InferenceVisitor.visitNullAwareMethodInvocationJudgment (file:///b/s/w/ir/cache/builder/sdk/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart:937:36) #14 NullAwareMethodInvocationJudgment.acceptInference (package:front_end/src/fasta/kernel/kernel_shadow_ast.dart:1072:20) #15 ShadowTypeInferrer.inferExpression (package:front_end/src/fasta/kernel/kernel_shadow_ast.dart:1513:18) #16 InferenceVisitor.visitIfNullJudgment (file:///b/s/w/ir/cache/builder/sdk/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart:452:14) #17 IfNullJudgment.acceptInference (package:front_end/src/fasta/kernel/kernel_shadow_ast.dart:755:20) #18 ShadowTypeInferrer.inferExpression (package:front_end/src/fasta/kernel/kernel_shadow_ast.dart:1513:18) #19 InferenceVisitor.visitReturnJudgment (file:///b/s/w/ir/cache/builder/sdk/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart:1043:16) #20 ReturnJudgment.acceptInference (package:front_end/src/fasta/kernel/kernel_shadow_ast.dart:1188:20) #21 ShadowTypeInferrer.inferStatement (package:front_end/src/fasta/kernel/kernel_shadow_ast.dart:1561:24) #22 InferenceVisitor.visitBlockJudgment (file:///b/s/w/ir/cache/builder/sdk/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart:76:16) #23 BlockJudgment.acceptInference (package:front_end/src/fasta/kernel/kernel_shadow_ast.dart:186:20) #24 ShadowTypeInferrer.inferStatement (package:front_end/src/fasta/kernel/kernel_shadow_ast.dart:1561:24) #25 TypeInferrerImpl.inferFunctionBody (package:front_end/src/fasta/type_inference/type_inferrer.dart:1176:5) #26 BodyBuilder.finishFunction (package:front_end/src/fasta/kernel/body_builder.dart:748:20) #27 DietListener.listenerFinishFunction (package:front_end/src/fasta/source/diet_listener.dart:803:14) #28 DietListener.buildFunctionBody (package:front_end/src/fasta/source/diet_listener.dart:837:7) #29 DietListener.endTopLevelMethod (package:front_end/src/fasta/source/diet_listener.dart:312:5) #30 Parser.parseTopLevelMethod (package:front_end/src/fasta/parser/parser.dart:2340:14) #31 Parser.parseTopLevelMemberImpl (package:front_end/src/fasta/parser/parser.dart:2241:14) #32 Parser.parseTopLevelDeclarationImpl (package:front_end/src/fasta/parser/parser.dart:489:14) #33 Parser.parseUnit (package:front_end/src/fasta/parser/parser.dart:348:15) #34 SourceLoader.buildBody (package:front_end/src/fasta/source/source_loader.dart:260:14) <asynchronous suspension> #35 Loader.buildBodies (package:front_end/src/fasta/loader.dart:182:15) <asynchronous suspension> #36 KernelTarget.buildComponent.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:293:20) <asynchronous suspension> #37 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24) <asynchronous suspension> #38 KernelTarget.buildComponent (package:front_end/src/fasta/kernel/kernel_target.dart:291:12) <asynchronous suspension> #39 generateKernelInternal.<anonymous closure> (package:front_end/src/kernel_generator_impl.dart:145:38) <asynchronous suspension> #40 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24) <asynchronous suspension> #41 generateKernelInternal (package:front_end/src/kernel_generator_impl.dart:55:10) <asynchronous suspension> #42 compile.<anonymous closure> (package:front_end/src/api_unstable/dart2js.dart:162:32) <asynchronous suspension> #43 CompilerContext.runWithOptions.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:134:20) <asynchronous suspension> #44 CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:122:46) #45 new Future.sync (dart:async/future.dart:224:31) #46 CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:122:19) #47 _rootRun (dart:async/zone.dart:1124:13) #48 _CustomZone.run (dart:async/zone.dart:1021:19) #49 _runZoned (dart:async/zone.dart:1516:10) #50 runZoned (dart:async/zone.dart:1463:12) #51 CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:121:12) #52 CompilerContext.runWithOptions (package:front_end/src/fasta/compiler_context.dart:132:10) #53 compile (package:front_end/src/api_unstable/dart2js.dart:160:46) <asynchronous suspension> #54 KernelLoaderTask.load.<anonymous closure> (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/kernel/loader.dart:77:27) <asynchronous suspension> #55 CompilerTask.measure (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/common/tasks.dart:62:51) #56 KernelLoaderTask.load (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/kernel/loader.dart:58:12) #57 Compiler.runInternal (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/compiler.dart:256:48) <asynchronous suspension> #58 Compiler.run.<anonymous closure>.<anonymous closure> (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/compiler.dart:223:38) #59 new Future.sync (dart:async/future.dart:224:31) #60 Compiler.run.<anonymous closure> (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/compiler.dart:223:20) #61 CompilerTask.measureSubtask (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/common/tasks.dart:177:35) #62 Compiler.run (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/compiler.dart:220:41) #63 CompilerImpl.run.<anonymous closure>.<anonymous closure> (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/apiimpl.dart:88:22) #64 _RootZone.runUnary (dart:async/zone.dart:1379:54) #65 _FutureListener.handleValue (dart:async/future_impl.dart:126:18) #66 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45) #67 Future._propagateToListeners (dart:async/future_impl.dart:668:32) #68 Future._completeWithValue (dart:async/future_impl.dart:483:5) #69 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:513:7) #70 _microtaskLoop (dart:async/schedule_microtask.dart:41:21) #71 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5) #72 _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13) #73 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5) #0 DietListener.buildFunctionBody (package:front_end/src/fasta/source/diet_listener.dart:842:7) #1 DietListener.endTopLevelMethod (package:front_end/src/fasta/source/diet_listener.dart:312:5) #2 Parser.parseTopLevelMethod (package:front_end/src/fasta/parser/parser.dart:2340:14) #3 Parser.parseTopLevelMemberImpl (package:front_end/src/fasta/parser/parser.dart:2241:14) #4 Parser.parseTopLevelDeclarationImpl (package:front_end/src/fasta/parser/parser.dart:489:14) #5 Parser.parseUnit (package:front_end/src/fasta/parser/parser.dart:348:15) #6 SourceLoader.buildBody (package:front_end/src/fasta/source/source_loader.dart:260:14) <asynchronous suspension> #7 Loader.buildBodies (package:front_end/src/fasta/loader.dart:182:15) <asynchronous suspension> #8 KernelTarget.buildComponent.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:293:20) <asynchronous suspension> #9 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24) <asynchronous suspension> #10 KernelTarget.buildComponent (package:front_end/src/fasta/kernel/kernel_target.dart:291:12) <asynchronous suspension> #11 generateKernelInternal.<anonymous closure> (package:front_end/src/kernel_generator_impl.dart:145:38) <asynchronous suspension> #12 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24) <asynchronous suspension> #13 generateKernelInternal (package:front_end/src/kernel_generator_impl.dart:55:10) <asynchronous suspension> #14 compile.<anonymous closure> (package:front_end/src/api_unstable/dart2js.dart:162:32) <asynchronous suspension> #15 CompilerContext.runWithOptions.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:134:20) <asynchronous suspension> #16 CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:122:46) #17 new Future.sync (dart:async/future.dart:224:31) #18 CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:122:19) #19 _rootRun (dart:async/zone.dart:1124:13) #20 _CustomZone.run (dart:async/zone.dart:1021:19) #21 _runZoned (dart:async/zone.dart:1516:10) #22 runZoned (dart:async/zone.dart:1463:12) #23 CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:121:12) #24 CompilerContext.runWithOptions (package:front_end/src/fasta/compiler_context.dart:132:10) #25 compile (package:front_end/src/api_unstable/dart2js.dart:160:46) <asynchronous suspension> #26 KernelLoaderTask.load.<anonymous closure> (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/kernel/loader.dart:77:27) <asynchronous suspension> #27 CompilerTask.measure (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/common/tasks.dart:62:51) #28 KernelLoaderTask.load (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/kernel/loader.dart:58:12) #29 Compiler.runInternal (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/compiler.dart:256:48) <asynchronous suspension> #30 Compiler.run.<anonymous closure>.<anonymous closure> (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/compiler.dart:223:38) #31 new Future.sync (dart:async/future.dart:224:31) #32 Compiler.run.<anonymous closure> (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/compiler.dart:223:20) #33 CompilerTask.measureSubtask (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/common/tasks.dart:177:35) #34 Compiler.run (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/compiler.dart:220:41) #35 CompilerImpl.run.<anonymous closure>.<anonymous closure> (file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/apiimpl.dart:88:22) #36 _RootZone.runUnary (dart:async/zone.dart:1379:54) #37 _FutureListener.handleValue (dart:async/future_impl.dart:126:18) #38 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45) #39 Future._propagateToListeners (dart:async/future_impl.dart:668:32) #40 Future._completeWithValue (dart:async/future_impl.dart:483:5) #41 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:513:7) #42 _microtaskLoop (dart:async/schedule_microtask.dart:41:21) #43 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5) #44 _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13) #45 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)
@stefantsov could you take a look?
Code here
Haven't tried 2.3.0 builds yet, so this might have been fixed already?
Crashes with this message (in DartPad):