Skip to content

The compiler crashed: NoSuchMethodError: The getter 'boxedVariables' was called on null. #47916

Description

@mono0926

Run flutter build web --target lib/main.dart on my internal project, and the compiler crashes.
Sorry, I couldn't make a reproducible public code.

Log:

Target dart2js failed: Exception: .dart_tool/flutter_build/6c1142c37fb0b5a7878591c90dbc00fe/app.dill:
Internal Error: The compiler crashed when compiling this element.
The compiler is broken.
The compiler crashed: NoSuchMethodError: The getter 'boxedVariables' was called on null.
Receiver: null
Tried calling: boxedVariables
#0      JsKernelToElementMap.makeRecordContainer (package:compiler/src/js_model/element_map_impl.dart:1769:14)
#1      ClosureDataBuilder.createClosureEntities.<anonymous closure> (package:compiler/src/js_model/closure.dart:328:23)
#2      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:539:8)
#3      ClosureDataBuilder.createClosureEntities (package:compiler/src/js_model/closure.dart:326:19)
#4      JsClosedWorldBuilder.convertClosedWorld (package:compiler/src/js_model/js_world_builder.dart:161:41)
#5      JsBackendStrategy.createJClosedWorld (package:compiler/src/js_model/js_strategy.dart:175:52)
#6      Compiler.closeResolution (package:compiler/src/compiler.dart:573:25)
#7      Compiler.computeClosedWorld (package:compiler/src/compiler.dart:433:9)
#8      Compiler.compileFromKernel.<anonymous closure>.<anonymous closure> (package:compiler/src/compiler.dart:530:17)
#9      CompilerTask.measureSubtask (package:compiler/src/common/tasks.dart:181:35)
#10     Compiler.compileFromKernel.<anonymous closure> (package:compiler/src/compiler.dart:529:44)
#11     CompilerTask.measureSubtask (package:compiler/src/common/tasks.dart:181:35)
#12     Compiler.compileFromKernel (package:compiler/src/compiler.dart:528:14)
#13     Compiler.runInternal (package:compiler/src/compiler.dart:333:15)
<asynchronous suspension>


This tracker is for issues related to:

  • dart2js
  • Dart SDK Version: 2.15.0
  • Flutter Version: 2.8.0
  • macOS 12.1

Metadata

Metadata

Assignees

Labels

area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dart2js

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions