dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.23k stars 1.57k forks source link

--dump-info may lead to a crash #15671

Closed DartBot closed 9 years ago

DartBot commented 10 years ago

This issue was originally filed by ngeoffray@google.com


$ ./sdk/bin/dart2js --dump-info --package-root=out/ReleaseIA32/packages/ samples/third_party/todomvc/test/listorder_test.dart

sdk/lib/async/stream_transformers.dart:261:31: Resolution work list is closed. Trying to add deferred action for typedef(_SubscriptionTransformer) typedef StreamSubscription<T> _SubscriptionTransformer<S, T>(                               ^^^^^^^^^^^^^^^^^^^^^^^^ 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 (build number could not be determined), and

* the entire message you see here (including the full stack trace   below as well as the source location above).

The compiler crashed: Assertion failure: Resolution work list is closed. Trying to add deferred action for typedef(_SubscriptionTransformer)

­0 ResolutionEnqueuer.addDeferredAction (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/enqueue.dart:692:7)

­1 CommonResolverVisitor.addDeferredAction (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart:1559:51)

­2 TypedefResolverVisitor.visitTypedef (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart:3700:22)

­3 Typedef.accept (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/tree/nodes.dart:1934:50)

­4 CommonResolverVisitor.visit (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart:1534:60)

­5 ResolverTask.resolveTypedef.<anonymous closure>.<anonymous closure> (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart:1168:22)

­6 CompilerTask.measure (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:1561:37)

­7 ResolverTask.resolveTypedef.<anonymous closure> (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart:1163:21)

­8 Compiler.withCurrentElement (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:499:15)

­9 Compiler.withCurrentElement (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:509:7)

­10 Compiler.withCurrentElement (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:500:7)

­11 ResolverTask.resolveTypedef (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart:1162:39)

­12 ResolverTask.resolve.<anonymous closure> (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart:273:30)

­13 CompilerTask.measure (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:1561:37)

­14 ResolverTask.resolve (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart:246:19)

­15 Compiler.resolveTypedef.<anonymous closure> (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:1326:46)

­16 Compiler.withCurrentElement (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:499:15)

­17 Compiler.withCurrentElement (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:509:7)

­18 Compiler.withCurrentElement (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:500:7)

­19 Compiler.resolveTypedef (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:1325:23)

­20 TypeResolver.resolveTypeAnnotation (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart:1775:32)

­21 ResolverVisitor.resolveTypeAnnotation (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart:3158:55)

­22 ResolverTask.resolveReturnType (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart:595:64)

­23 ResolverTask.resolveTypeAnnotation (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart:586:38)

­24 Compiler.resolveTypeAnnotation (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:1305:42)

­25 VariableListElementX.computeType.<anonymous closure> (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart:1243:46)

­26 Compiler.withCurrentElement (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:499:15)

­27 Compiler.withCurrentElement (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:509:7)

­28 Compiler.withCurrentElement (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:500:7)

­29 VariableListElementX.computeType (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart:1240:32)

­30 VariableElementX.computeType (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart:1156:33)

­31 InfoDumpVisitor.visitFieldElement (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/dump_info.dart:265:40)

­32 FieldElementX.accept (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart:1176:62)

­33 InfoDumpVisitor.visitClassElement.<anonymous closure> (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/dump_info.dart:313:36)

­34 LinkEntry.forEach (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart:86:8)

­35 ClassElementX.forEachLocalMember (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart:2187:35)

­36 InfoDumpVisitor.visitClassElement (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/dump_info.dart:312:31)

­37 PartialClassElement.accept (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/scanner/class_element_parser.dart:65:62)

­38 InfoDumpVisitor.visitLibraryElement.<anonymous closure> (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/dump_info.dart:232:36)

­39 LinkEntry.forEach (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart:86:8)

­40 LibraryElementX.forEachLocalMember (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart:947:27)

­41 InfoDumpVisitor.visitLibraryElement (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/dump_info.dart:231:31)

­42 LibraryElementX.accept (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart:1009:64)

­43 ElementVisitor.visit (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/elements/visitor.dart:18:33)

­44 DumpInfoTask.collectDumpInfo.<anonymous closure> (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/dump_info.dart:435:48)

­45 MappedListIterable.elementAt (dart:_collection-dev/iterable.dart:393)

­46 ListIterator.moveNext (dart:_collection-dev/iterable.dart:321)

­47 WhereIterator.moveNext (dart:_collection-dev/iterable.dart:415)

­48 List.addAll (dart:core-patch/growable_array.dart:186)

­49 DumpInfoTask.collectDumpInfo (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/dump_info.dart:434:24)

­50 DumpInfoTask.dumpInfo.<anonymous closure> (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/dump_info.dart:413:41)

­51 CompilerTask.measure (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:1561:37)

­52 DumpInfoTask.dumpInfo (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/dump_info.dart:412:12)

­53 Compiler.compileLoadedLibraries (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:1136:28)

­54 Compiler.runCompiler.<anonymous closure> (file:///usr/local/google/home/ngeoffray/projects/dart3/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:1011:29)

­55 _Future._propagateToListeners.<anonymous closure> (dart:async/future_impl.dart:453)

­56 _rootRun (dart:async/zone.dart:683)

­57 _RootZone.run (dart:async/zone.dart:832)

­58 _Future._propagateToListeners (dart:async/future_impl.dart:445)

­59 _Future._complete (dart:async/future_impl.dart:303)

­60 Future.forEach.nextElement (dart:async/future.dart:286)

­61 _Future._propagateToListeners.<anonymous closure> (dart:async/future_impl.dart:453)

­62 _rootRun (dart:async/zone.dart:683)

­63 _RootZone.run (dart:async/zone.dart:832)

­64 _Future._propagateToListeners (dart:async/future_impl.dart:445)

­65 _Future._complete (dart:async/future_impl.dart:303)

­66 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:354)

­67 _asyncRunCallback (dart:async/schedule_microtask.dart:18)

­68 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:120)

blois commented 10 years ago

Issue #17069 has been merged into this issue.

rakudrama commented 10 years ago

Lets see if this helps: https://codereview.chromium.org/185543010/


cc @blois.

floitschG commented 10 years ago

Fixed the minimal example that Sigurd gave me.

=== import "package:unittest/matcher.dart";

main() {   var a = new StringDescription(); } ===

blois commented 10 years ago

Fixes the angular compilation as well. Thanks!!

sigurdm commented 10 years ago

Great - thanks for the fix.


Added Fixed label.