Skip to content

flutter build --release crashes 3.7.0 #119220

Description

@SunlightBro

Steps to Reproduce

Building a debug app works
flutter build apk --debug --flavor dev -t lib/main.dart

Running Gradle task 'assembleDevDebug'...                          33.5s
✓  Built build/app/outputs/flutter-apk/app-dev-debug.apk.

But building for release crashes
flutter build apk --release --flavor dev -t lib/main.dart

===== CRASH =====
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0xc
version=2.19.0 (stable) (Mon Jan 23 11:29:09 2023 -0800) on "macos_x64"
pid=61474, thread=-1, isolate_group=isolate(0x7fec27808200), isolate=(nil)(0x0)
os=macos, arch=x64, comp=yes, sim=no
isolate_instructions=0, vm_instructions=0

Before with Flutter 3.3.10 --release build successful.

This is a App in released in production for Android and iOS

Logs

Logs
💪 Building with sound null safety 💪

Expected to find fonts for (packages/cupertino_icons/CupertinoIcons, MaterialIcons, WuerthIcon), but found (MaterialIcons, WuerthIcon). This usually means you are referring to font families in an IconData class but not including them in the assets section of your pubspec.yaml, are missing the package that would include them, or are missing "uses-material-design: true".

===== CRASH =====
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0xc
version=2.19.0 (stable) (Mon Jan 23 11:29:09 2023 -0800) on "macos_arm"
pid=59850, thread=-1, isolate_group=isolate(0x7fe1b801b400), isolate=(nil)(0x0)
os=macos, arch=arm, comp=no, sim=no
isolate_instructions=0, vm_instructions=0
  pc 0x000000010139e2ad fp 0x0000000306bfe100 dart::FlowGraphTypePropagator::VisitValue(dart::Value*)+0x3d
  pc 0x000000010139dee7 fp 0x0000000306bfe150 dart::FlowGraphTypePropagator::PropagateRecursive(dart::BlockEntryInstr*)+0xd7
  pc 0x000000010139dfc3 fp 0x0000000306bfe1a0 dart::FlowGraphTypePropagator::PropagateRecursive(dart::BlockEntryInstr*)+0x1b3
  pc 0x000000010139d5a2 fp 0x0000000306bfe620 dart::FlowGraphTypePropagator::Propagate()+0x32
  pc 0x000000010139d538 fp 0x0000000306bfe740 dart::FlowGraphTypePropagator::Propagate(dart::FlowGraph*)+0x58
  pc 0x00000001013b5662 fp 0x0000000306bfe760 dart::CompilerPass_TypePropagation::DoBody(dart::CompilerPassState*) const+0x22
  pc 0x00000001013b4250 fp 0x0000000306bfe830 dart::CompilerPass::Run(dart::CompilerPassState*) const+0x1b0
  pc 0x00000001013b447a fp 0x0000000306bfe860 dart::CompilerPass::RunInliningPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*)+0x3a
  pc 0x00000001013630fb fp 0x0000000306bfed70 dart::CallSiteInliner::TryInliningImpl(dart::Function const&, dart::Array const&, dart::InlinedCallData*, bool)+0x100b
  pc 0x00000001013577d6 fp 0x0000000306bfee10 dart::CallSiteInliner::TryInlining(dart::Function const&, dart::Array const&, dart::InlinedCallData*, bool)+0xf6
  pc 0x00000001013662db fp 0x0000000306bfef00 dart::CallSiteInliner::InlineStaticCalls()+0x56b
  pc 0x000000010135d3df fp 0x0000000306bff020 dart::CallSiteInliner::InlineCalls()+0x24f
  pc 0x000000010135d031 fp 0x0000000306bff120 dart::FlowGraphInliner::Inline()+0x1e1
  pc 0x00000001013b55d2 fp 0x0000000306bff190 dart::CompilerPass_Inlining::DoBody(dart::CompilerPassState*) const+0x52
  pc 0x00000001013b4250 fp 0x0000000306bff260 dart::CompilerPass::Run(dart::CompilerPassState*) const+0x1b0
  pc 0x00000001013b4739 fp 0x0000000306bff290 dart::CompilerPass::RunPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*)+0xa9
  pc 0x0000000101286bf9 fp 0x0000000306bff960 dart::PrecompileParsedFunctionHelper::Compile(dart::CompilationPipeline*)+0x5c9
  pc 0x00000001012876fd fp 0x0000000306bfffe0 dart::PrecompileFunctionHelper(dart::Precompiler*, dart::CompilationPipeline*, dart::Function const&, bool)+0x31d
  pc 0x00000001012824f6 fp 0x0000000306c000f0 dart::Precompiler::CompileFunction(dart::Precompiler*, dart::Thread*, dart::Zone*, dart::Function const&)+0x176
  pc 0x000000010127fd81 fp 0x0000000306c00190 dart::Precompiler::ProcessFunction(dart::Function const&)+0xf1
  pc 0x000000010127a054 fp 0x0000000306c001f0 dart::Precompiler::Iterate()+0x94
  pc 0x0000000101274b19 fp 0x0000000306c00940 dart::Precompiler::DoCompileAll()+0x1489
  pc 0x000000010127360b fp 0x0000000306c00da0 dart::Precompiler::CompileAll()+0xbb
  pc 0x0000000101468ab8 fp 0x0000000306c00f10 Dart_Precompile+0x248
  pc 0x0000000100fc2f4b fp 0x0000000306c010a0 dart::bin::main(int, char**)+0x9ab
  pc 0x0000000201b4f310 fp 0x0000000306c01340 Unknown symbol
-- End of DumpStackTrace
=== Crash occurred when compiling package:photodoc/model/dto/project_dto.dart_ProjectDto_ProjectDto.init in AOT mode in TypePropagation pass
*** BEGIN CFG
TypePropagation
==== package:photodoc/model/dto/project_dto.dart__$_ProjectDto@1727099614__$_ProjectDto@1727099614. (Constructor)
B0[graph]:0 {
      v0 <- Constant(#-1) T{_Smi}
      v1 <- Constant(#) T{_OneByteString}
      v2 <- Constant(#false) T{bool}
      v3 <- Constant(#null) T{Null?}
      v4 <- Constant(#_ImmutableList len:0)
      v5 <- Constant(#_ImmutableList len:0)
      v6 <- Constant(#_ImmutableList len:0)
      v7 <- Constant(#_ImmutableList len:0)
      v8 <- Constant(#true)
      v5 <- Constant(#<optimized out>)
}
B3[function entry]:2 {
      v6 <- Parameter(0) T{_$_ProjectDto}
      v7 <- SpecialParameter(ArgDescriptor)
}
    StoreField(v6 . id = v0 <int64>)
    StoreField(v6 . name = v1)
    StoreField(v6 . eventStoreId = v1)
    StoreField(v6 . deleted = v2)
    StoreField(v6 . lastUpdatedByUser = v3)
    StoreField(v6 . createdDate = v3)
    StoreField(v6 . createdBy = v3)
    StoreField(v6 . company = v3)
    StoreField(v6 . address = v3)
    StoreField(v6 . customer = v3)
    StoreField(v6 . distanceToCurrentUser = v1)
    StoreField(v6 . number = v1)
    StoreField(v6 . isSynchronizeEnabled = v8)
    StoreField(v6 . isNewProject = v2)
    StoreField(v6 . isOffline = v2)
    StoreField(v6 . _images@1727099614 = v4)
    StoreField(v6 . _tags@1727099614 = v5)
    StoreField(v6 . _reports@1727099614 = v6)
    StoreField(v6 . _participants@1727099614 = v7)
    Return:470(v3)
*** END CFG
Dart snapshot generator failed with exit code -6

===== CRASH =====
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0xc
version=2.19.0 (stable) (Mon Jan 23 11:29:09 2023 -0800) on "macos_simarm64"
pid=59851, thread=-1, isolate_group=isolate(0x7fd545008200), isolate=(nil)(0x0)
os=macos, arch=arm64, comp=yes, sim=yes
isolate_instructions=0, vm_instructions=0
  pc 0x000000010490b1cd fp 0x000000030d841140 dart::FlowGraphTypePropagator::VisitValue(dart::Value*)+0x3d
  pc 0x000000010490ae07 fp 0x000000030d841190 dart::FlowGraphTypePropagator::PropagateRecursive(dart::BlockEntryInstr*)+0xd7
  pc 0x000000010490aee3 fp 0x000000030d8411e0 dart::FlowGraphTypePropagator::PropagateRecursive(dart::BlockEntryInstr*)+0x1b3
  pc 0x000000010490a4c2 fp 0x000000030d841660 dart::FlowGraphTypePropagator::Propagate()+0x32
  pc 0x000000010490a458 fp 0x000000030d841780 dart::FlowGraphTypePropagator::Propagate(dart::FlowGraph*)+0x58
  pc 0x0000000104922c12 fp 0x000000030d8417a0 dart::CompilerPass_TypePropagation::DoBody(dart::CompilerPassState*) const+0x22
  pc 0x0000000104921800 fp 0x000000030d841870 dart::CompilerPass::Run(dart::CompilerPassState*) const+0x1b0
  pc 0x0000000104921a2a fp 0x000000030d8418a0 dart::CompilerPass::RunInliningPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*)+0x3a
  pc 0x00000001048d0393 fp 0x000000030d841db0 dart::CallSiteInliner::TryInliningImpl(dart::Function const&, dart::Array const&, dart::InlinedCallData*, bool)+0x1073
  pc 0x00000001048c48f6 fp 0x000000030d841e50 dart::CallSiteInliner::TryInlining(dart::Function const&, dart::Array const&, dart::InlinedCallData*, bool)+0xf6
  pc 0x00000001048d36eb fp 0x000000030d841f40 dart::CallSiteInliner::InlineStaticCalls()+0x56b
  pc 0x00000001048ca64f fp 0x000000030d842060 dart::CallSiteInliner::InlineCalls()+0x24f
  pc 0x00000001048ca2a1 fp 0x000000030d842160 dart::FlowGraphInliner::Inline()+0x1e1
  pc 0x0000000104922b82 fp 0x000000030d8421d0 dart::CompilerPass_Inlining::DoBody(dart::CompilerPassState*) const+0x52
  pc 0x0000000104921800 fp 0x000000030d8422a0 dart::CompilerPass::Run(dart::CompilerPassState*) const+0x1b0
  pc 0x0000000104921ce9 fp 0x000000030d8422d0 dart::CompilerPass::RunPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*)+0xa9
  pc 0x00000001047f9fa1 fp 0x000000030d8429a0 dart::PrecompileParsedFunctionHelper::Compile(dart::CompilationPipeline*)+0x611
  pc 0x00000001047faa9a fp 0x000000030d843020 dart::PrecompileFunctionHelper(dart::Precompiler*, dart::CompilationPipeline*, dart::Function const&, bool)+0x31a
  pc 0x00000001047f4e56 fp 0x000000030d843130 dart::Precompiler::CompileFunction(dart::Precompiler*, dart::Thread*, dart::Zone*, dart::Function const&)+0x176
  pc 0x00000001047f2181 fp 0x000000030d8431d0 dart::Precompiler::ProcessFunction(dart::Function const&)+0xf1
  pc 0x00000001047eb60b fp 0x000000030d843230 dart::Precompiler::Iterate()+0xab
  pc 0x00000001047e59e9 fp 0x000000030d843980 dart::Precompiler::DoCompileAll()+0x1489
  pc 0x00000001047e44db fp 0x000000030d843de0 dart::Precompiler::CompileAll()+0xbb
  pc 0x00000001049d8828 fp 0x000000030d843f50 Dart_Precompile+0x248
  pc 0x000000010450ff4b fp 0x000000030d8440e0 dart::bin::main(int, char**)+0x9ab
  pc 0x0000000205245310 fp 0x000000030d844380 Unknown symbol
-- End of DumpStackTrace
=== Crash occurred when compiling package:photodoc/model/dto/project_dto.dart_ProjectDto_ProjectDto.init in AOT mode in TypePropagation pass
*** BEGIN CFG
TypePropagation
==== package:photodoc/model/dto/project_dto.dart__$_ProjectDto@1727099614__$_ProjectDto@1727099614. (Constructor)
B0[graph]:0 {
      v0 <- Constant(#-1) T{_Smi}
      v1 <- Constant(#) T{_OneByteString}
      v2 <- Constant(#false) T{bool}
      v3 <- Constant(#null) T{Null?}
      v4 <- Constant(#_ImmutableList len:0)
      v5 <- Constant(#_ImmutableList len:0)
      v6 <- Constant(#_ImmutableList len:0)
      v7 <- Constant(#_ImmutableList len:0)
      v8 <- Constant(#true)
      v5 <- Constant(#<optimized out>)
}
B3[function entry]:2 {
      v6 <- Parameter(0) T{_$_ProjectDto}
      v7 <- SpecialParameter(ArgDescriptor)
}
    StoreField(v6 . id = v0 <int64>)
    StoreField(v6 . name = v1)
    StoreField(v6 . eventStoreId = v1)
    StoreField(v6 . deleted = v2)
    StoreField(v6 . lastUpdatedByUser = v3)
    StoreField(v6 . createdDate = v3)
    StoreField(v6 . createdBy = v3)
    StoreField(v6 . company = v3)
    StoreField(v6 . address = v3)
    StoreField(v6 . customer = v3)
    StoreField(v6 . distanceToCurrentUser = v1)
    StoreField(v6 . number = v1)
    StoreField(v6 . isSynchronizeEnabled = v8)
    StoreField(v6 . isNewProject = v2)
    StoreField(v6 . isOffline = v2)
    StoreField(v6 . _images@1727099614 = v4)
    StoreField(v6 . _tags@1727099614 = v5)
    StoreField(v6 . _reports@1727099614 = v6)
    StoreField(v6 . _participants@1727099614 = v7)
    Return:470(v3)
*** END CFG
Dart snapshot generator failed with exit code -6

===== CRASH =====
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0xc
version=2.19.0 (stable) (Mon Jan 23 11:29:09 2023 -0800) on "macos_x64"
pid=59853, thread=-1, isolate_group=isolate(0x7fa106024e00), isolate=(nil)(0x0)
os=macos, arch=x64, comp=yes, sim=no
isolate_instructions=0, vm_instructions=0
  pc 0x0000000102cc627d fp 0x0000000309e04150 dart::FlowGraphTypePropagator::VisitValue(dart::Value*)+0x3d
  pc 0x0000000102cc5eb7 fp 0x0000000309e041a0 dart::FlowGraphTypePropagator::PropagateRecursive(dart::BlockEntryInstr*)+0xd7
  pc 0x0000000102cc5f93 fp 0x0000000309e041f0 dart::FlowGraphTypePropagator::PropagateRecursive(dart::BlockEntryInstr*)+0x1b3
  pc 0x0000000102cc5572 fp 0x0000000309e04670 dart::FlowGraphTypePropagator::Propagate()+0x32
  pc 0x0000000102cc5508 fp 0x0000000309e04790 dart::FlowGraphTypePropagator::Propagate(dart::FlowGraph*)+0x58
  pc 0x0000000102cddcc2 fp 0x0000000309e047b0 dart::CompilerPass_TypePropagation::DoBody(dart::CompilerPassState*) const+0x22
  pc 0x0000000102cdc8b0 fp 0x0000000309e04880 dart::CompilerPass::Run(dart::CompilerPassState*) const+0x1b0
  pc 0x0000000102cdcada fp 0x0000000309e048b0 dart::CompilerPass::RunInliningPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*)+0x3a
  pc 0x0000000102c8b533 fp 0x0000000309e04dc0 dart::CallSiteInliner::TryInliningImpl(dart::Function const&, dart::Array const&, dart::InlinedCallData*, bool)+0x1073
  pc 0x0000000102c7fa96 fp 0x0000000309e04e60 dart::CallSiteInliner::TryInlining(dart::Function const&, dart::Array const&, dart::InlinedCallData*, bool)+0xf6
  pc 0x0000000102c8e88b fp 0x0000000309e04f50 dart::CallSiteInliner::InlineStaticCalls()+0x56b
  pc 0x0000000102c857ef fp 0x0000000309e05070 dart::CallSiteInliner::InlineCalls()+0x24f
  pc 0x0000000102c85441 fp 0x0000000309e05170 dart::FlowGraphInliner::Inline()+0x1e1
  pc 0x0000000102cddc32 fp 0x0000000309e051e0 dart::CompilerPass_Inlining::DoBody(dart::CompilerPassState*) const+0x52
  pc 0x0000000102cdc8b0 fp 0x0000000309e052b0 dart::CompilerPass::Run(dart::CompilerPassState*) const+0x1b0
  pc 0x0000000102cdcd99 fp 0x0000000309e052e0 dart::CompilerPass::RunPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*)+0xa9
  pc 0x0000000102babbc1 fp 0x0000000309e059b0 dart::PrecompileParsedFunctionHelper::Compile(dart::CompilationPipeline*)+0x611
  pc 0x0000000102bac6ba fp 0x0000000309e06030 dart::PrecompileFunctionHelper(dart::Precompiler*, dart::CompilationPipeline*, dart::Function const&, bool)+0x31a
  pc 0x0000000102ba6a76 fp 0x0000000309e06140 dart::Precompiler::CompileFunction(dart::Precompiler*, dart::Thread*, dart::Zone*, dart::Function const&)+0x176
  pc 0x0000000102ba3da1 fp 0x0000000309e061e0 dart::Precompiler::ProcessFunction(dart::Function const&)+0xf1
  pc 0x0000000102b9d22b fp 0x0000000309e06240 dart::Precompiler::Iterate()+0xab
  pc 0x0000000102b97609 fp 0x0000000309e06990 dart::Precompiler::DoCompileAll()+0x1489
  pc 0x0000000102b960fb fp 0x0000000309e06df0 dart::Precompiler::CompileAll()+0xbb
  pc 0x0000000102d96808 fp 0x0000000309e06f60 Dart_Precompile+0x248
  pc 0x00000001028d0f4b fp 0x0000000309e070f0 dart::bin::main(int, char**)+0x9ab
  pc 0x0000000203447310 fp 0x0000000309e07390 Unknown symbol
-- End of DumpStackTrace
=== Crash occurred when compiling package:photodoc/model/dto/project_dto.dart_ProjectDto_ProjectDto.init in AOT mode in TypePropagation pass
*** BEGIN CFG
TypePropagation
==== package:photodoc/model/dto/project_dto.dart__$_ProjectDto@1727099614__$_ProjectDto@1727099614. (Constructor)
B0[graph]:0 {
      v0 <- Constant(#-1) T{_Smi}
      v1 <- Constant(#) T{_OneByteString}
      v2 <- Constant(#false) T{bool}
      v3 <- Constant(#null) T{Null?}
      v4 <- Constant(#_ImmutableList len:0)
      v5 <- Constant(#_ImmutableList len:0)
      v6 <- Constant(#_ImmutableList len:0)
      v7 <- Constant(#_ImmutableList len:0)
      v8 <- Constant(#true)
      v5 <- Constant(#<optimized out>)
}
B3[function entry]:2 {
      v6 <- Parameter(0) T{_$_ProjectDto}
      v7 <- SpecialParameter(ArgDescriptor)
}
    StoreField(v6 . id = v0 <int64>)
    StoreField(v6 . name = v1)
    StoreField(v6 . eventStoreId = v1)
    StoreField(v6 . deleted = v2)
    StoreField(v6 . lastUpdatedByUser = v3)
    StoreField(v6 . createdDate = v3)
    StoreField(v6 . createdBy = v3)
    StoreField(v6 . company = v3)
    StoreField(v6 . address = v3)
    StoreField(v6 . customer = v3)
    StoreField(v6 . distanceToCurrentUser = v1)
    StoreField(v6 . number = v1)
    StoreField(v6 . isSynchronizeEnabled = v8)
    StoreField(v6 . isNewProject = v2)
    StoreField(v6 . isOffline = v2)
    StoreField(v6 . _images@1727099614 = v4)
    StoreField(v6 . _tags@1727099614 = v5)
    StoreField(v6 . _reports@1727099614 = v6)
    StoreField(v6 . _participants@1727099614 = v7)
    Return:470(v3)
*** END CFG
Dart snapshot generator failed with exit code -6
Target android_aot_release_android-arm failed: Exception: AOT snapshotter exited with code -6
Target android_aot_release_android-arm64 failed: Exception: AOT snapshotter exited with code -6
Target android_aot_release_android-x64 failed: Exception: AOT snapshotter exited with code -6


FAILURE: Build failed with an exception.

* Where:
Script '/Users/sunbro/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1151

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDevRelease'.
> Process 'command '/Users/sunbro/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 37s

[✓] Flutter (Channel stable, 3.7.0, on macOS 13.1 22C65 darwin-arm64, locale en-DE)
    • Flutter version 3.7.0 on channel stable at /Users/sunbro/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b06b8b2710 (2 days ago), 2023-01-23 16:55:55 -0800
    • Engine revision b24591ed32
    • Dart version 2.19.0
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/sunbro/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.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 11.0.15+0-b2043.56-8887301)

[✓] IntelliJ IDEA Community Edition (version 2022.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 70.0.5
    • Dart plugin version 222.3345.108

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.1 22C65 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 109.0.5414.119

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Metadata

Metadata

Assignees

Labels

a: buildBuilding flutter applications with the toolc: crashStack traces logged to the consoledependency: dartDart team may need to help usr: fixedIssue is closed as already fixed in a newer versiontoolAffects the "flutter" command-line tool. See also t: labels.

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