-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Flutter AOT precompiler crash #79441
Comments
Seems like we are stuck in speculation loop in one of the functions. @alexmarkov could you take a look? |
Hi @vaind logstahatesser@Tahas-MacBook-Pro errorful % flutterm build apk --release
Running "flutter pub get" in errorful... 1,214ms
💪 Building with sound null safety 💪
../../third_party/dart/runtime/vm/compiler/aot/precompiler.cc: 3177: error: unreachable code
Dart snapshot generator failed with exit code -6
FAILURE: Build failed with an exception.
* Where:
Script '/Users/tahatesser/Code/flutter_master/packages/flutter_tools/gradle/flutter.gradle' line: 1029
* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command '/Users/tahatesser/Code/flutter_master/bin/flutter'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 47s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 48.0s
Gradle task assembleRelease failed with exit code 1
tahatesser@Tahas-MacBook-Pro errorful % flutter doctor -v[✓] Flutter (Channel stable, 2.0.3, on macOS 11.2.3 20D91 darwin-x64, locale
en-GB)
• Flutter version 2.0.3 at /Users/tahatesser/Code/flutter_stable
• Framework revision 4d7946a68d (13 days ago), 2021-03-18 17:24:33 -0700
• Engine revision 3459eb2436
• Dart version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Volumes/Extreme/SDK
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = /Volumes/Extreme/SDK
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• 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
1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.54.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.20.0
[✓] Connected device (3 available)
• iPhone 12 (mobile) • 83060656-28E7-44CD-801E-B11EC3EC89BA • ios
• com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• macOS (desktop) • macos • darwin-x64
• macOS 11.2.3 20D91 darwin-x64
• Chrome (web) • chrome • web-javascript
• Google Chrome 89.0.4389.114
• No issues found! [✓] Flutter (Channel master, 2.1.0-13.0.pre.346, on macOS 11.2.3 20D91
darwin-x64, locale en-GB)
• Flutter version 2.1.0-13.0.pre.346 at
/Users/tahatesser/Code/flutter_master
• Framework revision 8158b478d7 (9 hours ago), 2021-03-31 13:29:03 +0800
• Engine revision dbcbf69a57
• Dart version 2.13.0 (build 2.13.0-175.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Volumes/Extreme/SDK
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = /Volumes/Extreme/SDK
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• 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
1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.54.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.20.0
[✓] Connected device (3 available)
• iPhone 12 (mobile) • 83060656-28E7-44CD-801E-B11EC3EC89BA • ios
• com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• macOS (desktop) • macos • darwin-x64
• macOS 11.2.3 20D91 darwin-x64
• Chrome (web) • chrome • web-javascript
• Google Chrome 89.0.4389.114
• No issues found! Thanks for filing the issue! |
…nd stores Previously, FFI store could use kUnboxedUint32 for value being stored via 8-bit or 16-bit StoreIndexed instruction. However, such StoreIndexed instructions require kUnboxedIntPtr representation. Due to the mismatch in the representations, SelectRepresentations pass inserts a speculative (deoptimizing) IntConverter instruction, which cases crash in AOT mode. Similar problem exists for FFI loads. This change corrects representation when unboxing value in the body of FFI store intrinsics and when boxing the value in FFI loads, so representation of the value matches representation required by StoreIndexed / returned by LoadIndexed. TEST=ffi/regress_flutter79441_test Fixes flutter/flutter#79441 Change-Id: Ida144e8d2e7a69d6767c9d4447bb20e79d847d48 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193824 Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Daco Harkes <dacoharkes@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
The fix was rolled into Flutter in e5f75db. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
lib/main.dart
contents to https://gist.github.com/vaind/2ffd8c8bde7e2d0bd1fc9559cbdfb3bepubspec.yaml
min SDK version to 2.12 to enable null-safetyflutter build apk --release
you get
../../third_party/dart/runtime/vm/compiler/aot/precompiler.cc: 2761: error: unreachable code
Logs
Logs
The text was updated successfully, but these errors were encountered: