Skip to content

dart2js --checked --suppress-warnings crashes #24653

Closed
@nex3

Description

@nex3

I'm using bleeding edge cc0a9c3 on Ubuntu.

If I run dart2js --checked --suppress-warnings on a Dart file with an empty main method, I get the following error:

out/ReleaseIA32/dart-sdk/lib/core/annotations.dart:70:9:
Internal Error: The compiler crashed when compiling this element.
  const Deprecated(String expires) : this.expires = expires;
        ^^^^^^^^^^
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 (1.13.0-edge.bb3060aa5940dbdaf4c21da63a7f66b65f7f5b2f), and

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

The compiler crashed: The null object does not have a method 'substByContext'.

NoSuchMethodError: method not found: 'substByContext'
Receiver: null
Arguments: [Instance of 'InterfaceType']
#0      Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1      Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#2      ConstructorEvaluator.potentiallyCheckType (pkg/compiler/lib/src/compile_time_constants.dart:1066)
#3      ConstructorEvaluator.updateFieldValue (pkg/compiler/lib/src/compile_time_constants.dart:1082)
#4      ConstructorEvaluator.evaluateConstructorInitializers (pkg/compiler/lib/src/compile_time_constants.dart:1162)
#5      ConstructorEvaluator.evaluateConstructorFieldValues.<anonymous closure> (pkg/compiler/lib/src/compile_time_constants.dart:1199)
#6      _CompilerDiagnosticReporter.withCurrentElement (pkg/compiler/lib/src/compiler.dart:1690)
#7      ConstructorEvaluator.evaluateConstructorFieldValues (pkg/compiler/lib/src/compile_time_constants.dart:1197)
#8      CompileTimeConstantEvaluator.makeConstructedConstant (pkg/compiler/lib/src/compile_time_constants.dart:996)
#9      CompileTimeConstantEvaluator.createConstructorInvocation (pkg/compiler/lib/src/compile_time_constants.dart:868)
#10     CompileTimeConstantEvaluator.visitNewExpression (pkg/compiler/lib/src/compile_time_constants.dart:811)
#11     NewExpression.accept (pkg/compiler/lib/src/tree/nodes.dart:531)
#12     CompileTimeConstantEvaluator.evaluate (pkg/compiler/lib/src/compile_time_constants.dart:376)
#13     ConstantCompilerBase.compileNodeWithDefinitions (pkg/compiler/lib/src/compile_time_constants.dart:296)
#14     DartConstantCompiler.compileNodeWithDefinitions (pkg/compiler/lib/src/compile_time_constants.dart:346)
#15     ConstantCompilerBase.compileMetadata (pkg/compiler/lib/src/compile_time_constants.dart:315)
#16     JavaScriptConstantTask.compileMetadata.<anonymous closure> (pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart:85)
#17     CompilerTask.measure (pkg/compiler/lib/src/common/tasks.dart:55)
#18     JavaScriptConstantTask.compileMetadata (pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart:83)
#19     ResolverTask.resolveMetadataAnnotation.<anonymous closure>.<anonymous closure> (pkg/compiler/lib/src/resolution/resolution.dart:1040)
#20     CompilerTask.measure (pkg/compiler/lib/src/common/tasks.dart:55)
#21     ResolverTask.resolveMetadataAnnotation.<anonymous closure> (pkg/compiler/lib/src/resolution/resolution.dart:1019)
#22     _CompilerDiagnosticReporter.withCurrentElement (pkg/compiler/lib/src/compiler.dart:1690)
#23     ResolverTask.resolveMetadataAnnotation (pkg/compiler/lib/src/resolution/resolution.dart:1019)
#24     _CompilerResolution.resolveMetadataAnnotation (pkg/compiler/lib/src/compiler.dart:1964)
#25     MetadataAnnotationX.ensureResolved (pkg/compiler/lib/src/elements/modelx.dart:3057)
#26     ResolverTask._postProcessClassElement (pkg/compiler/lib/src/resolution/resolution.dart:628)
#27     ResolverTask._resolveTypeDeclaration.<anonymous closure>.<anonymous closure> (pkg/compiler/lib/src/resolution/resolution.dart:545)
#28     CompilerTask.measure (pkg/compiler/lib/src/common/tasks.dart:55)
#29     ResolverTask._resolveTypeDeclaration.<anonymous closure> (pkg/compiler/lib/src/resolution/resolution.dart:534)
#30     _CompilerDiagnosticReporter.withCurrentElement (pkg/compiler/lib/src/compiler.dart:1690)
#31     ResolverTask._resolveTypeDeclaration (pkg/compiler/lib/src/resolution/resolution.dart:533)
#32     ResolverTask.resolveClass (pkg/compiler/lib/src/resolution/resolution.dart:570)
#33     _CompilerResolution.resolveClass (pkg/compiler/lib/src/compiler.dart:1954)
#34     BaseClassElementX.ensureResolved (pkg/compiler/lib/src/elements/modelx.dart:2571)
#35     MetadataAnnotationX.ensureResolved (pkg/compiler/lib/src/elements/modelx.dart:3054)
#36     EagerAnnotationHandler.checkAnnotation.<anonymous closure> (pkg/compiler/lib/src/patch_parser.dart:404)
#37     _CompilerDiagnosticReporter.withCurrentElement (pkg/compiler/lib/src/compiler.dart:1690)
#38     ResolutionEnqueuer.emptyDeferredTaskQueue (pkg/compiler/lib/src/enqueue.dart:919)
#39     ResolutionEnqueuer.onQueueEmpty (pkg/compiler/lib/src/enqueue.dart:912)
#40     Enqueuer.forEach (pkg/compiler/lib/src/enqueue.dart:746)
#41     Compiler.emptyQueue (pkg/compiler/lib/src/compiler.dart:1099)
#42     Compiler.processQueue (pkg/compiler/lib/src/compiler.dart:1127)
#43     Compiler.compileLoadedLibraries (pkg/compiler/lib/src/compiler.dart:997)
#44     Compiler.runCompiler.<anonymous closure> (pkg/compiler/lib/src/compiler.dart:870)
#45     _RootZone.runUnary (dart:async/zone.dart:1149)
#46     _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:502)
#47     _Future._propagateToListeners (dart:async/future_impl.dart:585)
#48     _Future._completeWithValue (dart:async/future_impl.dart:376)
#49     _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:430)
#50     _microtaskLoop (dart:async/schedule_microtask.dart:43)
#51     _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)
#52     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#53     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions