Skip to content
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

The compiler crashed #53337

Closed
xinlake opened this issue Aug 24, 2023 · 2 comments
Closed

The compiler crashed #53337

xinlake opened this issue Aug 24, 2023 · 2 comments

Comments

@xinlake
Copy link

xinlake commented Aug 24, 2023

Issue

The compiler crashed when compiling my Flutter app, in Flutter v3.13.0 and v3.13.1 (This did not happen in previous versions). The flutter app works fine in debug mode.

  • Compile command
flutter build web --release --no-tree-shake-icons --web-renderer canvaskit
  • Crash log
E:\X33\SourceCode\x33>flutter build web --release --no-tree-shake-icons --web-renderer canvaskit

Target dart2js failed: ProcessException: Process exited abnormally:
file:///E:/X33/SourceCode/x33/.dart_tool/flutter_build/1b161226ccc79799c7d0843c2f08a72d/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 (3.1.0), and

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

The compiler crashed: Invalid argument(s): Type parameter TypeParameter(T) is not indexed
#0      TypeParameterIndexer.[] (package:kernel/binary/ast_to_binary.dart:3371:8)
#1      BinaryPrinter.visitTypeParameterType (package:kernel/binary/ast_to_binary.dart:2528:38)
#2      TypeParameterType.accept (package:kernel/ast.dart:12528:42)
#3      BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:439:10)
#4      BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:349:7)
#5      BinaryPrinter.visitInterfaceType (package:kernel/binary/ast_to_binary.dart:2435:7)
#6      InterfaceType.accept (package:kernel/ast.dart:11385:42)
#7      BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:439:10)
#8      BinaryPrinter.visitAsExpression (package:kernel/binary/ast_to_binary.dart:1960:5)
#9      AsExpression.accept (package:kernel/ast.dart:7636:44)
#10     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:439:10)
#11     BinaryPrinter.writeOptionalNode (package:kernel/binary/ast_to_binary.dart:531:7)
#12     BinaryPrinter.visitReturnStatement (package:kernel/binary/ast_to_binary.dart:2315:5)
#13     ReturnStatement.accept (package:kernel/ast.dart:10127:43)
#14     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:439:10)
#15     BinaryPrinter.writeOptionalNode (package:kernel/binary/ast_to_binary.dart:531:7)
#16     BinaryPrinter.visitFunctionNode (package:kernel/binary/ast_to_binary.dart:1529:5)
#17     FunctionNode.accept (package:kernel/ast.dart:3908:38)
#18     BinaryPrinter.writeFunctionNode (package:kernel/binary/ast_to_binary.dart:446:10)
#19     BinaryPrinter.visitProcedure (package:kernel/binary/ast_to_binary.dart:1357:5)
#20     Procedure.accept (package:kernel/ast.dart:3311:40)
#21     BinaryPrinter.writeProcedureNode (package:kernel/binary/ast_to_binary.dart:467:10)
#22     BinaryPrinter.writeProcedureNodeList (package:kernel/binary/ast_to_binary.dart:358:7)
#23     BinaryPrinter.visitClass (package:kernel/binary/ast_to_binary.dart:1260:5)
#24     Class.accept (package:kernel/ast.dart:1422:38)
#25     BinaryPrinter.writeClassNode (package:kernel/binary/ast_to_binary.dart:481:10)
#26     BinaryPrinter.writeClassNodeList (package:kernel/binary/ast_to_binary.dart:376:7)
#27     BinaryPrinter.visitLibrary (package:kernel/binary/ast_to_binary.dart:1096:5)
#28     Library.accept (package:kernel/ast.dart:577:38)
#29     BinaryPrinter.writeLibraryNode (package:kernel/binary/ast_to_binary.dart:460:10)
#30     BinaryPrinter.writeLibraries (package:kernel/binary/ast_to_binary.dart:766:9)
#31     BinaryPrinter.writeComponentFile.<anonymous closure> (package:kernel/binary/ast_to_binary.dart:605:7)
#32     Timeline.timeSync (dart:developer/timeline.dart:171:22)
#33     BinaryPrinter.writeComponentFile (package:kernel/binary/ast_to_binary.dart:586:14)
#34     SerializationTask.serializeComponent.<anonymous closure> (package:compiler/src/serialization/task.dart:77:15)
#35     CompilerTask.measureSubtask (package:compiler/src/common/tasks.dart:181:35)
#36     SerializationTask.serializeComponent (package:compiler/src/serialization/task.dart:67:5)
#37     Compiler.produceKernel (package:compiler/src/compiler.dart:422:29)
<asynchronous suspension>
#38     Compiler.runSequentialPhases (package:compiler/src/compiler.dart:711:20)
<asynchronous suspension>
#39     Compiler.runInternal.<anonymous closure> (package:compiler/src/compiler.dart:311:7)
<asynchronous suspension>
#40     Compiler.runInternal (package:compiler/src/compiler.dart:310:5)
<asynchronous suspension>
#41     Compiler.run.<anonymous closure> (package:compiler/src/compiler.dart:231:11)
<asynchronous suspension>
#42     main (package:compiler/src/dart2js.dart:1241:3)
<asynchronous suspension>
  Command: D:\FlutterDev\flutter-sdk\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev D:\FlutterDev\flutter-sdk\bin\cache\dart-sdk\bin\snapshots\dart2js.dart.snapshot --platform-binaries=D:\FlutterDev\flutter-sdk\bin\cache\flutter_web_sdk\kernel
  --invoker=flutter_tool -Ddart.vm.product=true -DFLUTTER_WEB_AUTO_DETECT=false -DFLUTTER_WEB_USE_SKIA=true -DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/b20183e04096094bcc37d9cde2a4b96f5cc684cf/ --native-null-assertions --no-source-maps
  -o E:\X33\SourceCode\x33\.dart_tool\flutter_build\1b161226ccc79799c7d0843c2f08a72d\app.dill --packages=.dart_tool/package_config.json --cfe-only E:\X33\SourceCode\x33\.dart_tool\flutter_build\1b161226ccc79799c7d0843c2f08a72d\main.dart
#0      RunResult.throwException (package:flutter_tools/src/base/process.dart:125:5)
#1      _DefaultProcessUtils.run (package:flutter_tools/src/base/process.dart:278:19)
<asynchronous suspension>
#2      Dart2JSTarget.build (package:flutter_tools/src/build_system/targets/web.dart:189:5)
<asynchronous suspension>
#3      _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:853:9)
<asynchronous suspension>
#4      Future.wait.<anonymous closure> (dart:async/future.dart:525:21)
<asynchronous suspension>
#5      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:791:32)
<asynchronous suspension>
#6      Future.wait.<anonymous closure> (dart:async/future.dart:525:21)
<asynchronous suspension>
#7      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:791:32)
<asynchronous suspension>
#8      FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:620:16)
<asynchronous suspension>
#9      WebBuilder.buildWeb (package:flutter_tools/src/web/compile.dart:89:34)
<asynchronous suspension>
#10     BuildWebCommand.runCommand (package:flutter_tools/src/commands/build_web.dart:198:5)
<asynchronous suspension>
#11     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1297:27)
<asynchronous suspension>
#12     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#13     CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#14     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:339:9)
<asynchronous suspension>
#15     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#16     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:285:5)
<asynchronous suspension>
#17     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:115:9)
<asynchronous suspension>
#18     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#19     main (package:flutter_tools/executable.dart:90:3)
<asynchronous suspension>

Compiling lib\main.dart for the Web...                             12.1s
Exception: Failed to compile application for the Web.

Environment

  • Windows 11, 16GB Memory
  • Using Chrome browser

dart info

If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.

#### General info

- Dart 3.1.0 (stable) (Tue Aug 15 21:33:36 2023 +0000) on "windows_x64"
- on windows / "Windows 10 Pro" 10.0 (Build 22621)
- locale is en-US

#### Process info

| Memory | CPU | Elapsed time | Command line |
| -----: | --: | -----------: | ------------ |
| 407 MB |  -- |              | dart.exe     |
|  82 MB |  -- |              | dart.exe     |
|  86 MB |  -- |              | dart.exe     |
|  78 MB |  -- |              | dart.exe     |

flutter doctor -v

[✓] Flutter (Channel stable, 3.13.1, on Microsoft Windows [Version 10.0.22621.2134], locale en-US)
    • Flutter version 3.13.1 on channel stable at D:\FlutterDev\flutter-sdk
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e1e47221e8 (33 hours ago), 2023-08-22 21:43:18 -0700
    • Engine revision b20183e040
    • Dart version 3.1.0
    • DevTools version 2.25.0

[✓] Windows Version (Installed version of Windows is version 10 or higher)

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at D:\AndroiDev\android-sdk
    • Platform android-33, build-tools 33.0.2
    • ANDROID_SDK_ROOT = D:\AndroiDev\android-sdk
    • Java binary at: D:\AndroiDev\android-studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.5)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.6.33829.357
    • Windows 10 SDK version 10.0.22621.0

[✓] Android Studio (version 2022.2)
    • Android Studio at D:\AndroiDev\android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)

[✓] Proxy Configuration
    • HTTP_PROXY is set
    • NO_PROXY is localhost,127.0.0.1,127.0.1.1,192.168.0.1,::1
    • NO_PROXY contains localhost
    • NO_PROXY contains ::1
    • NO_PROXY contains 127.0.0.1

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22621.2134]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 116.0.5845.98
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 116.0.1938.54

[✓] Network resources
    • All expected network resources are available.

• No issues found!
@biggs0125
Copy link

Duplicate of #53291

@biggs0125 biggs0125 marked this as a duplicate of #53291 Aug 24, 2023
@sigmundch
Copy link
Member

Thanks for the bug report @xinlake - we think it's the same issue as #53291, but if you have a small example that reproduces the problem, that would could help us move faster on finding a fix. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants