Skip to content

Flutter AOT precompiler crash #79441

Description

@vaind

Steps to Reproduce

  1. flutter create errorful
  2. change lib/main.dart contents to https://gist.github.com/vaind/2ffd8c8bde7e2d0bd1fc9559cbdfb3be
  3. change pubspec.yaml min SDK version to 2.12 to enable null-safety
  4. flutter build apk --release

you get ../../third_party/dart/runtime/vm/compiler/aot/precompiler.cc: 2761: error: unreachable code

Logs

Logs
Running "flutter pub get" in errorful...                           390ms

💪 Building with sound null safety 💪

../../third_party/dart/runtime/vm/compiler/aot/precompiler.cc: 2761: error: unreachable code
Dart snapshot generator failed with exit code -6                        
                                                                        
                                                                        
FAILURE: Build failed with an exception.                                
                                                                        
* Where:                                                                
Script '/home/ivan/lib/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 991
                                                                        
* What went wrong:                                                      
Execution failed for task ':app:compileFlutterBuildRelease'.            
> Process 'command '/home/ivan/lib/flutter/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 3s                                                      
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done                       3.6s
Gradle task assembleRelease failed with exit code 1

[✓] Flutter (Channel stable, 2.0.3, on Linux, locale en_US.UTF-8)
    • Flutter version 2.0.3 at /home/ivan/lib/flutter
    • Framework revision 4d7946a68d (12 days ago), 2021-03-18 17:24:33 -0700
    • Engine revision 3459eb2436
    • Dart version 2.12.2

Metadata

Metadata

Assignees

Labels

a: buildBuilding flutter applications with the toolc: crashStack traces logged to the consoledependency: dartDart team may need to help usfound in release: 2.0Found to occur in 2.0found in release: 2.1Found to occur in 2.1has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specifically

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