[go: nahoru, domu]

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

Out of memory issue on iOS archive #60802

Closed
dna-f opened this issue Jul 3, 2020 · 21 comments
Closed

Out of memory issue on iOS archive #60802

dna-f opened this issue Jul 3, 2020 · 21 comments
Labels
c: fatal crash Crashes that terminate the process c: regression It was better in the past than it is now dependency: dart Dart team may need to help us engine flutter/engine repository. See also e: labels. platform-ios iOS applications specifically

Comments

@dna-f
Copy link
dna-f commented Jul 3, 2020

Hi guys,
I'm facing an Out of memory issue while compiling the iOS release version of my my app using channel Beta version 1.19.0-4.1.pre or 1.19.0-4.2.pre
No problems instead with versions 1.18.0-11.1.pre or minor.

This is my flutter doctor -v log

[✓] Flutter (Channel beta, 1.19.0-4.2.pre, on Mac OS X 10.15.5 19F101, locale en-GB)
    • Flutter version 1.19.0-4.2.pre at /Users/andrea/flutter
    • Framework revision 9b9b543d92 (8 days ago), 2020-06-22 12:19:28 -0700
    • Engine revision 9a28c3bcf4
    • Dart version 2.9.0 (build 2.9.0-14.1.beta)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/andrea/Library/Android/sdk
    • Platform android-30, build-tools 29.0.2
    • ANDROID_HOME = /Users/andrea/Library/Android/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-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.9.1

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 47.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.46.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.11.0

[✓] Connected device (1 available)
    • iPhone 11 Pro Max • A82C5936-66FA-4074-B8B3-2C374D827B7D • ios •
      com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)

• No issues found!

And this is the build error while executing an Archive operation from Xcode or after executing the following command:

flutter build ios --release --target lib/main.dart --flavor production --verbose

    /bin/sh -c /Users/andrea/Library/Developer/Xcode/DerivedData/Runner-fmankeitqefwlfcrcijlliqpegak/Build/Intermediates.noindex/ArchiveIntermediates/production/IntermediateBuildFilesPath/Runner.build/Release-production-iphoneos/Runner.build/Script-9740EEB61CF901F6004384FC.sh

../../third_party/dart/runtime/vm/heap/scavenger.cc: 281: error: Out of memory.
version=2.9.0-14.1.beta (beta) (Tue Jun 9 10:52:57 2020 +0200) on "macos_x64"
pid=17544, thread=5635, isolate_group=main(0x7fbf7c811c00), isolate=(nil)(0x0)
isolate_instructions=10d97e000, vm_instructions=109e89040

  pc 0x000000010a134845 fp 0x00007000053dc5e0 dart::Profiler::DumpStackTrace(void*)+0x85
  pc 0x0000000109e89192 fp 0x00007000053dc6c0 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x000000010a20dac4 fp 0x00007000053dc730 dart::ScavengerVisitorBase<true>::VisitPointers(dart::ObjectPtr*, dart::ObjectPtr*)+0x304
  pc 0x000000010a149ea4 fp 0x00007000053dc760 dart::ObjectLayout::VisitPointersPredefined(dart::ObjectPointerVisitor*, long)+0x354
  pc 0x000000010a20bd5c fp 0x00007000053dc7e0 dart::ParallelScavengerTask::RunEnteredIsolateGroup()+0x11c
  pc 0x000000010a20b7f1 fp 0x00007000053dc8c0 dart::Scavenger::ParallelScavenge(dart::SemiSpace*)+0x261
  pc 0x000000010a20b134 fp 0x00007000053dc9c0 dart::Scavenger::Scavenge()+0x1a4
  pc 0x000000010a1fc9aa fp 0x00007000053dca90 dart::Heap::CollectNewSpaceGarbage(dart::Thread*, dart::Heap::GCReason)+0x2aa
  pc 0x000000010a1fb038 fp 0x00007000053dcad0 dart::Heap::AllocateNew(long)+0x108
  pc 0x000000010a0a25ce fp 0x00007000053dcb20 dart::Object::Allocate(long, long, dart::Heap::Space)+0x5e
  pc 0x000000010a0f6ca6 fp 0x00007000053dcb70 dart::TypedData::New(long, long, dart::Heap::Space)+0x136
  pc 0x000000010a09b966 fp 0x00007000053dcbe0 dart::NativeEntry::BootstrapNativeCallWrapper(_Dart_NativeArguments*, void (*)(_Dart_NativeArguments*))+0xb6
  pc 0x000000010e801419 fp 0x00007000053dcc28 Unknown symbol
  pc 0x000000010da7ef76 fp 0x00007000053dcc68 Unknown symbol
  pc 0x000000010de02bc9 fp 0x00007000053dccb0 Unknown symbol
  pc 0x000000010dc6ff94 fp 0x00007000053dccf8 Unknown symbol
  pc 0x000000013f22d31a fp 0x00007000053dcd68 Unknown symbol
  pc 0x000000013f2516d8 fp 0x00007000053dcda0 Unknown symbol
  pc 0x000000013f262740 fp 0x00007000053dcdf0 Unknown symbol
  pc 0x000000013f25119a fp 0x00007000053dce50 Unknown symbol
  pc 0x000000014d8003ee fp 0x00007000053dcea0 Unknown symbol
  pc 0x000000013f24c163 fp 0x00007000053dcee0 Unknown symbol
  pc 0x000000014d800258 fp 0x00007000053dcf30 Unknown symbol
  pc 0x000000013f2546f2 fp 0x00007000053dcf80 Unknown symbol
  pc 0x000000014d8038f9 fp 0x00007000053dd000 Unknown symbol
  pc 0x000000014d80707d fp 0x00007000053dd0b8 Unknown symbol
  pc 0x000000013f27f499 fp 0x00007000053dd128 Unknown symbol
  pc 0x000000013f25da90 fp 0x00007000053dd168 Unknown symbol
  pc 0x000000014d815da6 fp 0x00007000053dd1c8 Unknown symbol
  pc 0x000000013f26e072 fp 0x00007000053dd238 Unknown symbol
  pc 0x000000010e36113e fp 0x00007000053dd2e8 Unknown symbol
  pc 0x000000013f26939b fp 0x00007000053dd340 Unknown symbol
  pc 0x000000014d815dc4 fp 0x00007000053dd3a0 Unknown symbol
  pc 0x000000013f25fe29 fp 0x00007000053dd400 Unknown symbol
  pc 0x000000014d8039a4 fp 0x00007000053dd490 Unknown symbol
  pc 0x000000014d80707d fp 0x00007000053dd548 Unknown symbol
  pc 0x000000013f27f499 fp 0x00007000053dd5b8 Unknown symbol
  pc 0x000000013f25da90 fp 0x00007000053dd5f8 Unknown symbol
  pc 0x000000014d815da6 fp 0x00007000053dd658 Unknown symbol
  pc 0x000000013f26e072 fp 0x00007000053dd6c8 Unknown symbol
  pc 0x000000010e36113e fp 0x00007000053dd778 Unknown symbol
  pc 0x000000013f26939b fp 0x00007000053dd7d0 Unknown symbol
  pc 0x000000014d815dc4 fp 0x00007000053dd830 Unknown symbol
  pc 0x000000013f25fe29 fp 0x00007000053dd890 Unknown symbol
  pc 0x000000014d8039a4 fp 0x00007000053dd920 Unknown symbol
  pc 0x000000014d80707d fp 0x00007000053dd9d8 Unknown symbol
  pc 0x000000013f27f499 fp 0x00007000053dda48 Unknown symbol
  pc 0x000000013f25da90 fp 0x00007000053dda88 Unknown symbol
  pc 0x000000014d815da6 fp 0x00007000053ddae8 Unknown symbol
  pc 0x000000013f25b179 fp 0x00007000053ddb48 Unknown symbol
  pc 0x0000000142e1b309 fp 0x00007000053ddb80 Unknown symbol
  pc 0x000000014d7f37b4 fp 0x00007000053ddc50 Unknown symbol
  pc 0x000000014d7c6814 fp 0x00007000053ddd08 Unknown symbol
  pc 0x000000010da5a3f6 fp 0x00007000053ddd30 Unknown symbol
  pc 0x000000014d7c629b fp 0x00007000053dde10 Unknown symbol
  pc 0x0000000111e8b56d fp 0x00007000053dded8 Unknown symbol
  pc 0x000000010e192b46 fp 0x00007000053ddf58 Unknown symbol
  pc 0x000000010e1933ad fp 0x00007000053ddfd0 Unknown symbol
  pc 0x000000010e429b84 fp 0x00007000053de060 Unknown symbol
  pc 0x000000010d981861 fp 0x00007000053de0f0 Unknown symbol
  pc 0x000000010e42db1a fp 0x00007000053de160 Unknown symbol
  pc 0x000000010d981683 fp 0x00007000053de1a8 Unknown symbol
  pc 0x000000010e42f668 fp 0x00007000053de208 Unknown symbol
  pc 0x000000010d980e25 fp 0x00007000053de238 Unknown symbol
  pc 0x0000000111e8cec9 fp 0x00007000053de2d0 Unknown symbol
  pc 0x000000010e192b46 fp 0x00007000053de350 Unknown symbol
  pc 0x000000010e1933ad fp 0x00007000053de3c8 Unknown symbol
  pc 0x000000010e429b84 fp 0x00007000053de458 Unknown symbol
  pc 0x000000010d981861 fp 0x00007000053de4e8 Unknown symbol
  pc 0x000000010e42db1a fp 0x00007000053de558 Unknown symbol
  pc 0x000000010d981683 fp 0x00007000053de5a0 Unknown symbol
  pc 0x000000010e42f668 fp 0x00007000053de600 Unknown symbol
  pc 0x000000010d980e25 fp 0x00007000053de630 Unknown symbol
  pc 0x0000000111e8ddaa fp 0x00007000053de6c8 Unknown symbol
  pc 0x000000010e192b46 fp 0x00007000053de748 Unknown symbol
  pc 0x000000010e1933ad fp 0x00007000053de7c0 Unknown symbol
  pc 0x000000010e429b84 fp 0x00007000053de850 Unknown symbol
  pc 0x000000010d981861 fp 0x00007000053de8e0 Unknown symbol
  pc 0x000000010e42db1a fp 0x00007000053de950 Unknown symbol
  pc 0x000000010d981683 fp 0x00007000053de998 Unknown symbol
  pc 0x000000010e42f668 fp 0x00007000053de9f8 Unknown symbol
  pc 0x000000010d980e25 fp 0x00007000053dea28 Unknown symbol
  pc 0x0000000111e8ed3e fp 0x00007000053deac8 Unknown symbol
  pc 0x000000010e192b46 fp 0x00007000053deb48 Unknown symbol
  pc 0x000000010e1933ad fp 0x00007000053debc0 Unknown symbol
  pc 0x000000010e429b84 fp 0x00007000053dec50 Unknown symbol
  pc 0x000000010d981861 fp 0x00007000053dece0 Unknown symbol
  pc 0x000000010e42db1a fp 0x00007000053ded50 Unknown symbol
  pc 0x000000010d981683 fp 0x00007000053ded98 Unknown symbol
  pc 0x000000010e42f668 fp 0x00007000053dedf8 Unknown symbol
  pc 0x000000010d980e25 fp 0x00007000053dee28 Unknown symbol
  pc 0x000000010dbb527d fp 0x00007000053deec8 Unknown symbol
  pc 0x000000010e192b46 fp 0x00007000053def48 Unknown symbol
  pc 0x000000010e1933ad fp 0x00007000053defc0 Unknown symbol
  pc 0x000000010e429b84 fp 0x00007000053df050 Unknown symbol
  pc 0x000000010d981861 fp 0x00007000053df0e0 Unknown symbol
  pc 0x000000010e42db1a fp 0x00007000053df150 Unknown symbol
  pc 0x000000010d981683 fp 0x00007000053df198 Unknown symbol
  pc 0x000000010e42f668 fp 0x00007000053df1f8 Unknown symbol
  pc 0x000000010d980e25 fp 0x00007000053df228 Unknown symbol
  pc 0x0000000111e92852 fp 0x00007000053df2d0 Unknown symbol
  pc 0x000000010e192b46 fp 0x00007000053df350 Unknown symbol
  pc 0x000000010e1933ad fp 0x00007000053df3c8 Unknown symbol
  pc 0x000000010e429b84 fp 0x00007000053df458 Unknown symbol
  pc 0x000000010d981861 fp 0x00007000053df4e8 Unknown symbol
  pc 0x000000010e42db1a fp 0x00007000053df558 Unknown symbol
  pc 0x000000010d981683 fp 0x00007000053df5a0 Unknown symbol
  pc 0x000000010e42f668 fp 0x00007000053df600 Unknown symbol
  pc 0x000000010d980e25 fp 0x00007000053df630 Unknown symbol
  pc 0x000000010dbb527d fp 0x00007000053df6d0 Unknown symbol
  pc 0x000000010e192b46 fp 0x00007000053df750 Unknown symbol
  pc 0x000000010e1933ad fp 0x00007000053df7c8 Unknown symbol
  pc 0x000000010e429b84 fp 0x00007000053df858 Unknown symbol
  pc 0x000000010d981861 fp 0x00007000053df8e8 Unknown symbol
  pc 0x000000010e42db1a fp 0x00007000053df958 Unknown symbol
  pc 0x000000010d981683 fp 0x00007000053df9a0 Unknown symbol
  pc 0x000000010e42f668 fp 0x00007000053dfa00 Unknown symbol
  pc 0x000000010d980e25 fp 0x00007000053dfa30 Unknown symbol
  pc 0x000000010df2866c fp 0x00007000053dfac8 Unknown symbol
  pc 0x000000010e192b46 fp 0x00007000053dfb48 Unknown symbol
  pc 0x000000010e1933ad fp 0x00007000053dfbc0 Unknown symbol
  pc 0x000000010e429b84 fp 0x00007000053dfc50 Unknown symbol
  pc 0x000000010d981861 fp 0x00007000053dfce0 Unknown symbol
  pc 0x000000010e42db1a fp 0x00007000053dfd50 Unknown symbol
  pc 0x000000010d981683 fp 0x00007000053dfd98 Unknown symbol
  pc 0x000000010e42f668 fp 0x00007000053dfdf8 Unknown symbol
  pc 0x000000010d980e25 fp 0x00007000053dfe28 Unknown symbol
  pc 0x000000010df27d21 fp 0x00007000053dfec0 Unknown symbol
  pc 0x000000010e192b46 fp 0x00007000053dff40 Unknown symbol
  pc 0x000000010e1933ad fp 0x00007000053dffb8 Unknown symbol
  pc 0x000000010e429b84 fp 0x00007000053e0048 Unknown symbol
  pc 0x000000010d981861 fp 0x00007000053e00d8 Unknown symbol
  pc 0x000000010e42db1a fp 0x00007000053e0148 Unknown symbol
  pc 0x000000010d981683 fp 0x00007000053e0190 Unknown symbol
  pc 0x000000010e42f668 fp 0x00007000053e01f0 Unknown symbol
  pc 0x000000010d980e25 fp 0x00007000053e0220 Unknown symbol
  pc 0x0000000142e020a8 fp 0x00007000053e0390 Unknown symbol
  pc 0x000000010e192b46 fp 0x00007000053e0410 Unknown symbol
  pc 0x000000010e1933ad fp 0x00007000053e0488 Unknown symbol
  pc 0x000000010e429b84 fp 0x00007000053e0518 Unknown symbol
  pc 0x000000010d981861 fp 0x00007000053e05a8 Unknown symbol
  pc 0x000000010e42db1a fp 0x00007000053e0618 Unknown symbol
  pc 0x000000010d981683 fp 0x00007000053e0660 Unknown symbol
  pc 0x000000010dc2867c fp 0x00007000053e06b0 Unknown symbol
  pc 0x000000010e19711a fp 0x00007000053e0738 Unknown symbol
  pc 0x000000010e197abd fp 0x00007000053e07a8 Unknown symbol
  pc 0x000000010dc52553 fp 0x00007000053e0848 Unknown symbol
  pc 0x000000010e34817f fp 0x00007000053e08a8 Unknown symbol
  pc 0x000000010dc43103 fp 0x00007000053e08f0 Unknown symbol
  pc 0x000000010dc43264 fp 0x00007000053e0930 Unknown symbol
  pc 0x000000010dc435b7 fp 0x00007000053e0970 Unknown symbol
  pc 0x000000010dc425f3 fp 0x00007000053e09b0 Unknown symbol
  pc 0x000000010e4423ad fp 0x00007000053e09d8 Unknown symbol
  pc 0x000000010e80174c fp 0x00007000053e0a48 Unknown symbol
  pc 0x000000010a02f580 fp 0x00007000053e0ae0 dart::DartEntry::InvokeCode(dart::Code const&, dart::Array const&, dart::Array const&, dart::Thread*)+0x120
  pc 0x000000010a02f24b fp 0x00007000053e0b80 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)+0x2db
  pc 0x000000010a031708 fp 0x00007000053e0be0 dart::DartLibraryCalls::HandleMessage(dart::Object const&, dart::Instance const&)+0x1e8
  pc 0x000000010a066cf6 fp 0x00007000053e0dd0 dart::IsolateMessageHandler::HandleMessage(std::__1::unique_ptr<dart::Message, std::__1::default_delete<dart::Message> >)+0x4b6
  pc 0x000000010a0995c6 fp 0x00007000053e0e50 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)+0x136
  pc 0x000000010a099c04 fp 0x00007000053e0eb0 dart::MessageHandler::TaskCallback()+0x1e4
  pc 0x000000010a1ccba2 fp 0x00007000053e0f40 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*)+0x152
  pc 0x000000010a1cce6f fp 0x00007000053e0f70 dart::ThreadPool::Worker::Main(unsigned long)+0x6f
  pc 0x000000010a1308b1 fp 0x00007000053e0fb0 dart::ThreadStart(void*)+0x61
  pc 0x00007fff6a344109 fp 0x00007000053e0fd0 _pthread_start+0x94
  pc 0x00007fff6a33fb8b fp 0x00007000053e0ff0 thread_start+0xf
-- End of DumpStackTrace
[exit     : sp(0) fp(0x7000053dcc28) pc(0)]
[dart     : sp(0x7000053dcc38) fp(0x7000053dcc68) pc(0x10da7ef76) dart:typed_data_Uint32List_Uint32List. ]
[dart     : sp(0x7000053dcc78) fp(0x7000053dccb0) pc(0x10de02bc9) *dart:collection__CompactLinkedHashSet@3220832__init@3220832 ]
[dart     : sp(0x7000053dccc0) fp(0x7000053dccf8) pc(0x10dc6ff94) *dart:collection__CompactLinkedHashSet@3220832__rehash@3220832 ]
[dart     : sp(0x7000053dcd08) fp(0x7000053dcd68) pc(0x13f22d31a) *dart:collection__CompactLinkedHashSet@3220832_add ]
[dart     : sp(0x7000053dcd78) fp(0x7000053dcda0) pc(0x13f2516d8) *package:vm/transformations/type_flow/analysis.dart__DependencyTracker@207466997_addDependentInvocation ]
[dart     : sp(0x7000053dcdb0) fp(0x7000053dcdf0) pc(0x13f262740) *package:vm/transformations/type_flow/analysis.dart__ClassHierarchyCache@207466997_specializeTypeCone ]
[dart     : sp(0x7000053dce00) fp(0x7000053dce50) pc(0x13f25119a) *package:vm/transformations/type_flow/types.dart_SetType_intersection ]
[dart     : sp(0x7000053dce60) fp(0x7000053dcea0) pc(0x14d8003ee) *package:vm/transformations/type_flow/types.dart_ConeType_intersection ]
[dart     : sp(0x7000053dceb0) fp(0x7000053dcee0) pc(0x13f24c163) *package:vm/transformations/type_flow/types.dart_NullableType_intersection ]
[dart     : sp(0x7000053dcef0) fp(0x7000053dcf30) pc(0x14d800258) *package:vm/transformations/type_flow/types.dart_ConeType_intersection ]
[dart     : sp(0x7000053dcf40) fp(0x7000053dcf80) pc(0x13f2546f2) *package:vm/transformations/type_flow/summary.dart_Call__observeReceiverType@209416674 ]
[dart     : sp(0x7000053dcf90) fp(0x7000053dd000) pc(0x14d8038f9) *package:vm/transformations/type_flow/summary.dart_Call_apply ]
[dart     : sp(0x7000053dd010) fp(0x7000053dd0b8) pc(0x14d80707d) *package:vm/transformations/type_flow/summary.dart_Summary_apply ]
[dart     : sp(0x7000053dd0c8) fp(0x7000053dd128) pc(0x13f27f499) *package:vm/transformations/type_flow/analysis.dart__DirectInvocation@207466997__processFunction@207466997 ]
[dart     : sp(0x7000053dd138) fp(0x7000053dd168) pc(0x13f25da90) *package:vm/transformations/type_flow/analysis.dart__DirectInvocation@207466997_process ]
[dart     : sp(0x7000053dd178) fp(0x7000053dd1c8) pc(0x14d815da6) *package:vm/transformations/type_flow/analysis.dart__WorkList@207466997_processInvocation ]
[dart     : sp(0x7000053dd1d8) fp(0x7000053dd238) pc(0x13f26e072) *package:vm/transformations/type_flow/analysis.dart__DispatchableInvocation@207466997_process_<anonymous closure> ]
[dart     : sp(0x7000053dd248) fp(0x7000053dd2e8) pc(0x10e36113e) *dart:collection___InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin@3220832_forEach ]
[dart     : sp(0x7000053dd2f8) fp(0x7000053dd340) pc(0x13f26939b) *package:vm/transformations/type_flow/analysis.dart__DispatchableInvocation@207466997_process ]
[dart     : sp(0x7000053dd350) fp(0x7000053dd3a0) pc(0x14d815dc4) *package:vm/transformations/type_flow/analysis.dart__WorkList@207466997_processInvocation ]
[dart     : sp(0x7000053dd3b0) fp(0x7000053dd400) pc(0x13f25fe29) *package:vm/transformations/type_flow/analysis.dart_TypeFlowAnalysis_applyCall ]
[dart     : sp(0x7000053dd410) fp(0x7000053dd490) pc(0x14d8039a4) *package:vm/transformations/type_flow/summary.dart_Call_apply ]
[dart     : sp(0x7000053dd4a0) fp(0x7000053dd548) pc(0x14d80707d) *package:vm/transformations/type_flow/summary.dart_Summary_apply ]
[dart     : sp(0x7000053dd558) fp(0x7000053dd5b8) pc(0x13f27f499) *package:vm/transformations/type_flow/analysis.dart__DirectInvocation@207466997__processFunction@207466997 ]
[dart     : sp(0x7000053dd5c8) fp(0x7000053dd5f8) pc(0x13f25da90) *package:vm/transformations/type_flow/analysis.dart__DirectInvocation@207466997_process ]
[dart     : sp(0x7000053dd608) fp(0x7000053dd658) pc(0x14d815da6) *package:vm/transformations/type_flow/analysis.dart__WorkList@207466997_processInvocation ]
[dart     : sp(0x7000053dd668) fp(0x7000053dd6c8) pc(0x13f26e072) *package:vm/transformations/type_flow/analysis.dart__DispatchableInvocation@207466997_process_<anonymous closure> ]
[dart     : sp(0x7000053dd6d8) fp(0x7000053dd778) pc(0x10e36113e) *dart:collection___InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin@3220832_forEach ]
[dart     : sp(0x7000053dd788) fp(0x7000053dd7d0) pc(0x13f26939b) *package:vm/transformations/type_flow/analysis.dart__DispatchableInvocation@207466997_process ]
[dart     : sp(0x7000053dd7e0) fp(0x7000053dd830) pc(0x14d815dc4) *package:vm/transformations/type_flow/analysis.dart__WorkList@207466997_processInvocation ]
[dart     : sp(0x7000053dd840) fp(0x7000053dd890) pc(0x13f25fe29) *package:vm/transformations/type_flow/analysis.dart_TypeFlowAnalysis_applyCall ]
[dart     : sp(0x7000053dd8a0) fp(0x7000053dd920) pc(0x14d8039a4) *package:vm/transformations/type_flow/summary.dart_Call_apply ]
[dart     : sp(0x7000053dd930) fp(0x7000053dd9d8) pc(0x14d80707d) *package:vm/transformations/type_flow/summary.dart_Summary_apply ]
[dart     : sp(0x7000053dd9e8) fp(0x7000053dda48) pc(0x13f27f499) *package:vm/transformations/type_flow/analysis.dart__DirectInvocation@207466997__processFunction@207466997 ]
[dart     : sp(0x7000053dda58) fp(0x7000053dda88) pc(0x13f25da90) *package:vm/transformations/type_flow/analysis.dart__DirectInvocation@207466997_process ]
[dart     : sp(0x7000053dda98) fp(0x7000053ddae8) pc(0x14d815da6) *package:vm/transformations/type_flow/analysis.dart__WorkList@207466997_processInvocation ]
[dart     : sp(0x7000053ddaf8) fp(0x7000053ddb48) pc(0x13f25b179) *package:vm/transformations/type_flow/analysis.dart__WorkList@207466997_process ]
[dart     : sp(0x7000053ddb58) fp(0x7000053ddb80) pc(0x142e1b309) package:vm/transformations/type_flow/analysis.dart_TypeFlowAnalysis_process ]
[dart     : sp(0x7000053ddb90) fp(0x7000053ddc50) pc(0x14d7f37b4) package:vm/transformations/type_flow/transformer.dart_::_transformComponent ]
[dart     : sp(0x7000053ddc60) fp(0x7000053ddd08) pc(0x14d7c6814) package:vm/kernel_front_end.dart_::_runGlobalTransformations__async_op ]
[dart     : sp(0x7000053ddd18) fp(0x7000053ddd30) pc(0x10da5a3f6) *dart:async__AsyncAwaitCompleter@4048458_start ]
[dart     : sp(0x7000053ddd40) fp(0x7000053dde10) pc(0x14d7c629b) package:vm/kernel_front_end.dart_::_runGlobalTransformations ]
[dart     : sp(0x7000053dde20) fp(0x7000053dded8) pc(0x111e8b56d) package:vm/kernel_front_end.dart_::_compileToKernel__async_op ]
[dart     : sp(0x7000053ddee8) fp(0x7000053ddf58) pc(0x10e192b46) dart:async_::__rootRunUnary@4048458 ]
[dart     : sp(0x7000053ddf68) fp(0x7000053ddfd0) pc(0x10e1933ad) dart:async_::__rootRunUnary@4048458__rootRunUnary@4048458 ]
[dart     : sp(0x7000053ddfe0) fp(0x7000053de060) pc(0x10e429b84) *dart:async__FutureListener@4048458_handleValue ]
[dart     : sp(0x7000053de070) fp(0x7000053de0f0) pc(0x10d981861) *dart:async__Future@4048458__propagateToListeners@4048458_handleValueCallback ]
[dart     : sp(0x7000053de100) fp(0x7000053de160) pc(0x10e42db1a) *dart:async__Future@4048458__propagateToListeners@4048458 ]
[dart     : sp(0x7000053de170) fp(0x7000053de1a8) pc(0x10d981683) *dart:async__Future@4048458__completeWithValue@4048458 ]
[dart     : sp(0x7000053de1b8) fp(0x7000053de208) pc(0x10e42f668) dart:async__AsyncAwaitCompleter@4048458_complete ]
[dart     : sp(0x7000053de218) fp(0x7000053de238) pc(0x10d980e25) *dart:async_::__completeOnAsyncReturn@4048458 ]
[dart     : sp(0x7000053de248) fp(0x7000053de2d0) pc(0x111e8cec9) package:front_end/src/api_prototype/kernel_generator.dart_::_kernelForProgram__async_op ]
[dart     : sp(0x7000053de2e0) fp(0x7000053de350) pc(0x10e192b46) dart:async_::__rootRunUnary@4048458 ]
[dart     : sp(0x7000053de360) fp(0x7000053de3c8) pc(0x10e1933ad) dart:async_::__rootRunUnary@4048458__rootRunUnary@4048458 ]
[dart     : sp(0x7000053de3d8) fp(0x7000053de458) pc(0x10e429b84) *dart:async__FutureListener@4048458_handleValue ]
[dart     : sp(0x7000053de468) fp(0x7000053de4e8) pc(0x10d981861) *dart:async__Future@4048458__propagateToListeners@4048458_handleValueCallback ]
[dart     : sp(0x7000053de4f8) fp(0x7000053de558) pc(0x10e42db1a) *dart:async__Future@4048458__propagateToListeners@4048458 ]
[dart     : sp(0x7000053de568) fp(0x7000053de5a0) pc(0x10d981683) *dart:async__Future@4048458__completeWithValue@4048458 ]
[dart     : sp(0x7000053de5b0) fp(0x7000053de600) pc(0x10e42f668) dart:async__AsyncAwaitCompleter@4048458_complete ]
[dart     : sp(0x7000053de610) fp(0x7000053de630) pc(0x10d980e25) *dart:async_::__completeOnAsyncReturn@4048458 ]
[dart     : sp(0x7000053de640) fp(0x7000053de6c8) pc(0x111e8ddaa) package:front_end/src/api_prototype/kernel_generator.dart_::_kernelForProgramInternal__async_op ]
[dart     : sp(0x7000053de6d8) fp(0x7000053de748) pc(0x10e192b46) dart:async_::__rootRunUnary@4048458 ]
[dart     : sp(0x7000053de758) fp(0x7000053de7c0) pc(0x10e1933ad) dart:async_::__rootRunUnary@4048458__rootRunUnary@4048458 ]
[dart     : sp(0x7000053de7d0) fp(0x7000053de850) pc(0x10e429b84) *dart:async__FutureListener@4048458_handleValue ]
[dart     : sp(0x7000053de860) fp(0x7000053de8e0) pc(0x10d981861) *dart:async__Future@4048458__propagateToListeners@4048458_handleValueCallback ]
[dart     : sp(0x7000053de8f0) fp(0x7000053de950) pc(0x10e42db1a) *dart:async__Future@4048458__propagateToListeners@4048458 ]
[dart     : sp(0x7000053de960) fp(0x7000053de998) pc(0x10d981683) *dart:async__Future@4048458__completeWithValue@4048458 ]
[dart     : sp(0x7000053de9a8) fp(0x7000053de9f8) pc(0x10e42f668) dart:async__AsyncAwaitCompleter@4048458_complete ]
[dart     : sp(0x7000053dea08) fp(0x7000053dea28) pc(0x10d980e25) *dart:async_::__completeOnAsyncReturn@4048458 ]
[dart     : sp(0x7000053dea38) fp(0x7000053deac8) pc(0x111e8ed3e) package:front_end/src/api_prototype/kernel_generator.dart_::_kernelForProgramInternal__async_op_<anonymous closure>__async_op ]
[dart     : sp(0x7000053dead8) fp(0x7000053deb48) pc(0x10e192b46) dart:async_::__rootRunUnary@4048458 ]
[dart     : sp(0x7000053deb58) fp(0x7000053debc0) pc(0x10e1933ad) dart:async_::__rootRunUnary@4048458__rootRunUnary@4048458 ]
[dart     : sp(0x7000053debd0) fp(0x7000053dec50) pc(0x10e429b84) *dart:async__FutureListener@4048458_handleValue ]
[dart     : sp(0x7000053dec60) fp(0x7000053dece0) pc(0x10d981861) *dart:async__Future@4048458__propagateToListeners@4048458_handleValueCallback ]
[dart     : sp(0x7000053decf0) fp(0x7000053ded50) pc(0x10e42db1a) *dart:async__Future@4048458__propagateToListeners@4048458 ]
[dart     : sp(0x7000053ded60) fp(0x7000053ded98) pc(0x10d981683) *dart:async__Future@4048458__completeWithValue@4048458 ]
[dart     : sp(0x7000053deda8) fp(0x7000053dedf8) pc(0x10e42f668) dart:async__AsyncAwaitCompleter@4048458_complete ]
[dart     : sp(0x7000053dee08) fp(0x7000053dee28) pc(0x10d980e25) *dart:async_::__completeOnAsyncReturn@4048458 ]
[dart     : sp(0x7000053dee38) fp(0x7000053deec8) pc(0x10dbb527d) package:front_end/src/fasta/crash.dart_::_withCrashReporting__async_op ]
[dart     : sp(0x7000053deed8) fp(0x7000053def48) pc(0x10e192b46) dart:async_::__rootRunUnary@4048458 ]
[dart     : sp(0x7000053def58) fp(0x7000053defc0) pc(0x10e1933ad) dart:async_::__rootRunUnary@4048458__rootRunUnary@4048458 ]
[dart     : sp(0x7000053defd0) fp(0x7000053df050) pc(0x10e429b84) *dart:async__FutureListener@4048458_handleValue ]
[dart     : sp(0x7000053df060) fp(0x7000053df0e0) pc(0x10d981861) *dart:async__Future@4048458__propagateToListeners@4048458_handleValueCallback ]
[dart     : sp(0x7000053df0f0) fp(0x7000053df150) pc(0x10e42db1a) *dart:async__Future@4048458__propagateToListeners@4048458 ]
[dart     : sp(0x7000053df160) fp(0x7000053df198) pc(0x10d981683) *dart:async__Future@4048458__completeWithValue@4048458 ]
[dart     : sp(0x7000053df1a8) fp(0x7000053df1f8) pc(0x10e42f668) dart:async__AsyncAwaitCompleter@4048458_complete ]
[dart     : sp(0x7000053df208) fp(0x7000053df228) pc(0x10d980e25) *dart:async_::__completeOnAsyncReturn@4048458 ]
[dart     : sp(0x7000053df238) fp(0x7000053df2d0) pc(0x111e92852) package:front_end/src/kernel_generator_impl.dart_::_generateKernelInternal__async_op_<anonymous closure>__async_op ]
[dart     : sp(0x7000053df2e0) fp(0x7000053df350) pc(0x10e192b46) dart:async_::__rootRunUnary@4048458 ]
[dart     : sp(0x7000053df360) fp(0x7000053df3c8) pc(0x10e1933ad) dart:async_::__rootRunUnary@4048458__rootRunUnary@4048458 ]
[dart     : sp(0x7000053df3d8) fp(0x7000053df458) pc(0x10e429b84) *dart:async__FutureListener@4048458_handleValue ]
[dart     : sp(0x7000053df468) fp(0x7000053df4e8) pc(0x10d981861) *dart:async__Future@4048458__propagateToListeners@4048458_handleValueCallback ]
[dart     : sp(0x7000053df4f8) fp(0x7000053df558) pc(0x10e42db1a) *dart:async__Future@4048458__propagateToListeners@4048458 ]
[dart     : sp(0x7000053df568) fp(0x7000053df5a0) pc(0x10d981683) *dart:async__Future@4048458__completeWithValue@4048458 ]
[dart     : sp(0x7000053df5b0) fp(0x7000053df600) pc(0x10e42f668) dart:async__AsyncAwaitCompleter@4048458_complete ]
[dart     : sp(0x7000053df610) fp(0x7000053df630) pc(0x10d980e25) *dart:async_::__completeOnAsyncReturn@4048458 ]
[dart     : sp(0x7000053df640) fp(0x7000053df6d0) pc(0x10dbb527d) package:front_end/src/fasta/crash.dart_::_withCrashReporting__async_op ]
[dart     : sp(0x7000053df6e0) fp(0x7000053df750) pc(0x10e192b46) dart:async_::__rootRunUnary@4048458 ]
[dart     : sp(0x7000053df760) fp(0x7000053df7c8) pc(0x10e1933ad) dart:async_::__rootRunUnary@4048458__rootRunUnary@4048458 ]
[dart     : sp(0x7000053df7d8) fp(0x7000053df858) pc(0x10e429b84) *dart:async__FutureListener@4048458_handleValue ]
[dart     : sp(0x7000053df868) fp(0x7000053df8e8) pc(0x10d981861) *dart:async__Future@4048458__propagateToListeners@4048458_handleValueCallback ]
[dart     : sp(0x7000053df8f8) fp(0x7000053df958) pc(0x10e42db1a) *dart:async__Future@4048458__propagateToListeners@4048458 ]
[dart     : sp(0x7000053df968) fp(0x7000053df9a0) pc(0x10d981683) *dart:async__Future@4048458__completeWithValue@4048458 ]
[dart     : sp(0x7000053df9b0) fp(0x7000053dfa00) pc(0x10e42f668) dart:async__AsyncAwaitCompleter@4048458_complete ]
[dart     : sp(0x7000053dfa10) fp(0x7000053dfa30) pc(0x10d980e25) *dart:async_::__completeOnAsyncReturn@4048458 ]
[dart     : sp(0x7000053dfa40) fp(0x7000053dfac8) pc(0x10df2866c) package:front_end/src/fasta/kernel/kernel_target.dart_KernelTarget_buildComponent__async_op_<anonymous closure>__async_op ]
[dart     : sp(0x7000053dfad8) fp(0x7000053dfb48) pc(0x10e192b46) dart:async_::__rootRunUnary@4048458 ]
[dart     : sp(0x7000053dfb58) fp(0x7000053dfbc0) pc(0x10e1933ad) dart:async_::__rootRunUnary@4048458__rootRunUnary@4048458 ]
[dart     : sp(0x7000053dfbd0) fp(0x7000053dfc50) pc(0x10e429b84) *dart:async__FutureListener@4048458_handleValue ]
[dart     : sp(0x7000053dfc60) fp(0x7000053dfce0) pc(0x10d981861) *dart:async__Future@4048458__propagateToListeners@4048458_handleValueCallback ]
[dart     : sp(0x7000053dfcf0) fp(0x7000053dfd50) pc(0x10e42db1a) *dart:async__Future@4048458__propagateToListeners@4048458 ]
[dart     : sp(0x7000053dfd60) fp(0x7000053dfd98) pc(0x10d981683) *dart:async__Future@4048458__completeWithValue@4048458 ]
[dart     : sp(0x7000053dfda8) fp(0x7000053dfdf8) pc(0x10e42f668) dart:async__AsyncAwaitCompleter@4048458_complete ]
[dart     : sp(0x7000053dfe08) fp(0x7000053dfe28) pc(0x10d980e25) *dart:async_::__completeOnAsyncReturn@4048458 ]
[dart     : sp(0x7000053dfe38) fp(0x7000053dfec0) pc(0x10df27d21) package:front_end/src/fasta/loader.dart_Loader_buildBodies__async_op ]
[dart     : sp(0x7000053dfed0) fp(0x7000053dff40) pc(0x10e192b46) dart:async_::__rootRunUnary@4048458 ]
[dart     : sp(0x7000053dff50) fp(0x7000053dffb8) pc(0x10e1933ad) dart:async_::__rootRunUnary@4048458__rootRunUnary@4048458 ]
[dart     : sp(0x7000053dffc8) fp(0x7000053e0048) pc(0x10e429b84) *dart:async__FutureListener@4048458_handleValue ]
[dart     : sp(0x7000053e0058) fp(0x7000053e00d8) pc(0x10d981861) *dart:async__Future@4048458__propagateToListeners@4048458_handleValueCallback ]
[dart     : sp(0x7000053e00e8) fp(0x7000053e0148) pc(0x10e42db1a) *dart:async__Future@4048458__propagateToListeners@4048458 ]
[dart     : sp(0x7000053e0158) fp(0x7000053e0190) pc(0x10d981683) *dart:async__Future@4048458__completeWithValue@4048458 ]
[dart     : sp(0x7000053e01a0) fp(0x7000053e01f0) pc(0x10e42f668) dart:async__AsyncAwaitCompleter@4048458_complete ]
[dart     : sp(0x7000053e0200) fp(0x7000053e0220) pc(0x10d980e25) *dart:async_::__completeOnAsyncReturn@4048458 ]
[dart     : sp(0x7000053e0230) fp(0x7000053e0390) pc(0x142e020a8) *package:front_end/src/fasta/source/source_loader.dart_SourceLoader_buildBody__async_op ]
[dart     : sp(0x7000053e03a0) fp(0x7000053e0410) pc(0x10e192b46) dart:async_::__rootRunUnary@4048458 ]
[dart     : sp(0x7000053e0420) fp(0x7000053e0488) pc(0x10e1933ad) dart:async_::__rootRunUnary@4048458__rootRunUnary@4048458 ]
[dart     : sp(0x7000053e0498) fp(0x7000053e0518) pc(0x10e429b84) *dart:async__FutureListener@4048458_handleValue ]
[dart     : sp(0x7000053e0528) fp(0x7000053e05a8) pc(0x10d981861) *dart:async__Future@4048458__propagateToListeners@4048458_handleValueCallback ]
[dart     : sp(0x7000053e05b8) fp(0x7000053e0618) pc(0x10e42db1a) *dart:async__Future@4048458__propagateToListeners@4048458 ]
[dart     : sp(0x7000053e0628) fp(0x7000053e0660) pc(0x10d981683) *dart:async__Future@4048458__completeWithValue@4048458 ]
[dart     : sp(0x7000053e0670) fp(0x7000053e06b0) pc(0x10dc2867c) dart:async__Future@4048458__asyncCompleteWithValue@4048458_<anonymous closure> ]
[dart     : sp(0x7000053e06c0) fp(0x7000053e0738) pc(0x10e19711a) *dart:async_::__rootRun@4048458 ]
[dart     : sp(0x7000053e0748) fp(0x7000053e07a8) pc(0x10e197abd) dart:async_::__rootRun@4048458__rootRun@4048458 ]
[dart     : sp(0x7000053e07b8) fp(0x7000053e0848) pc(0x10dc52553) dart:async__CustomZone@4048458_run ]
[dart     : sp(0x7000053e0858) fp(0x7000053e08a8) pc(0x10e34817f) dart:async__CustomZone@4048458_bindCallback_<anonymous closure> ]
[dart     : sp(0x7000053e08b8) fp(0x7000053e08f0) pc(0x10dc43103) dart:async_::__microtaskLoop@4048458 ]
[dart     : sp(0x7000053e0900) fp(0x7000053e0930) pc(0x10dc43264) dart:async_::__startMicrotaskLoop@4048458 ]
[dart     : sp(0x7000053e0940) fp(0x7000053e0970) pc(0x10dc435b7) dart:async_::__startMicrotaskLoop@4048458__startMicrotaskLoop@4048458 ]
[dart     : sp(0x7000053e0980) fp(0x7000053e09b0) pc(0x10dc425f3) dart:isolate_::__runPendingImmediateCallback@1026248 ]
[dart     : sp(0x7000053e09c0) fp(0x7000053e09d8) pc(0x10e4423ad) dart:isolate__RawReceivePortImpl@1026248__handleMessage@1026248 ]
[entry    : sp(0x7000053e09e8) fp(0x7000053e0a48) pc(0x10e80174c)]

Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.


Build failed    01/07/2020, 08:13    195.7 seconds

The dart process takes more than 2gb of memory and then it crashes

If I downgrade the engine everything works fine
flutter downgrade 1.18.0-11.1.pre

Yesterday I tried to upgrade to version 1.19.0-4.3.pre on Beta channel but I got another error.

/bin/sh -c /Users/andrea/Library/Developer/Xcode/DerivedData/Runner-fmankeitqefwlfcrcijlliqpegak/Build/Intermediates.noindex/ArchiveIntermediates/production/IntermediateBuildFilesPath/Runner.build/Release-production-iphoneos/Runner.build/Script-9740EEB61CF901F6004384FC.sh

Exhausted heap space, trying to allocate 262176 bytes.

Unhandled exception:
Out of Memory
#0      _CompactLinkedHashSet._init (dart:collection-patch/compact_hash.dart)
#1      _CompactLinkedHashSet._rehash (dart:collection-patch/compact_hash.dart:511:7)
#2      _CompactLinkedHashSet.add (dart:collection-patch/compact_hash.dart:561:7)
#3      _DependencyTracker.addDependentInvocation (package:vm/transformations/type_flow/analysis.dart:56:29)
#4      _ClassHierarchyCache.specializeTypeCone (package:vm/transformations/type_flow/analysis.dart:1132:12)
#5      SetType.intersection (package:vm/transformations/type_flow/types.dart:505:12)
#6      NullableType.intersection (package:vm/transformations/type_flow/types.dart:291:20)
#7      TypeCheck.apply (package:vm/transformations/type_flow/summary.dart:558:25)
#8      Summary.apply (package:vm/transformations/type_flow/summary.dart:696:33)
#9      _DirectInvocation._processFunction (package:vm/transformations/type_flow/analysis.dart:265:24)
#10     _DirectInvocation.process (package:vm/transformations/type_flow/analysis.dart:181:14)
#11     _WorkList.processInvocation (package:vm/transformations/type_flow/analysis.dart:1258:32)
#12     TypeFlowAnalysis.applyCall (package:vm/transformations/type_flow/analysis.dart:1499:23)
#13     Call.apply (package:vm/transformations/type_flow/summary.dart:265:31)
#14     Summary.apply (package:vm/transformations/type_flow/summary.dart:696:33)
#15     _DirectInvocation._processFunction (package:vm/transformations/type_flow/analysis.dart:265:24)
#16     _DirectInvocation.process (package:vm/transformations/type_flow/analysis.dart:181:14)
#17     _WorkList.processInvocation (package:vm/transformations/type_flow/analysis.dart:1258:32)
#18     _DispatchableInvocation.process.<anonymous closure> (package:vm/transformations/type_flow/analysis.dart:406:44)
#19     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
#20     _DispatchableInvocation.process (package:vm/transformations/type_flow/analysis.dart:381:12)
#21     _WorkList.processInvocation (package:vm/transformations/type_flow/analysis.dart:1258:32)
#22     TypeFlowAnalysis.applyCall (package:vm/transformations/type_flow/analysis.dart:1499:23)
#23     Call.apply (package:vm/transformations/type_flow/summary.dart:265:31)
#24     Summary.apply (package:vm/transformations/type_flow/summary.dart:696:33)
#25     _DirectInvocation._processFunction (package:vm/transformations/type_flow/analysis.dart:265:24)
#26     _DirectInvocation.process (package:vm/transformations/type_flow/analysis.dart:181:14)
#27     _WorkList.processInvocation (package:vm/transformations/type_flow/analysis.dart:1258:32)
#28     TypeFlowAnalysis.applyCall (package:vm/transformations/type_flow/analysis.dart:1499:23)
#29     Call.apply (package:vm/transformations/type_flow/summary.dart:265:31)
#30     Summary.apply (package:vm/transformations/type_flow/summary.dart:696:33)
#31     _DirectInvocation._processFunction (package:vm/transformations/type_flow/analysis.dart:265:24)
#32     _DirectInvocation.process (package:vm/transformations/type_flow/analysis.dart:181:14)
#33     _WorkList.processInvocation (package:vm/transformations/type_flow/analysis.dart:1258:32)
#34     _DispatchableInvocation.process.<anonymous closure> (package:vm/transformations/type_flow/analysis.dart:406:44)
#35     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
#36     _DispatchableInvocation.process (package:vm/transformations/type_flow/analysis.dart:381:12)
#37     _WorkList.processInvocation (package:vm/transformations/type_flow/analysis.dart:1258:32)
#38     TypeFlowAnalysis.applyCall (package:vm/transformations/type_flow/analysis.dart:1499:23)
#39     Call.apply (package:vm/transformations/type_flow/summary.dart:265:31)
#40     Summary.apply (package:vm/transformations/type_flow/summary.dart:696:33)
#41     _DirectInvocation._processFunction (package:vm/transformations/type_flow/analysis.dart:265:24)
#42     _DirectInvocation.process (package:vm/transformations/type_flow/analysis.dart:181:14)
#43     _WorkList.processInvocation (package:vm/transformations/type_flow/analysis.dart:1258:32)
...
...
#119    _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#120    withCrashReporting (package:front_end/src/fasta/crash.dart)
#121    _rootRunUnary (dart:async/zone.dart:1198:47)
#122    _FutureListener.handleValue (dart:async/future_impl.dart:835:12118)
#123    Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#124    Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#125    Future._completeWithValue (dart:async/future_impl.dart:529:5)
#126    _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#127    _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#128    KernelTarget.buildComponent.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart)
#129    _rootRunUnary (dart:async/zone.dart:1198:47)
#130    _FutureListener.handleValue (dart:async/future_impl.dart:835:12118)
#131    Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#132    Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#133    Future._completeWithValue (dart:async/future_impl.dart:529:5)
#134    _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#135    _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#136    Loader.buildBodies (package:front_end/src/fasta/loader.dart)
#137    _rootRunUnary (dart:async/zone.dart:1198:47)
#138    _FutureListener.handleValue (dart:async/future_impl.dart:835:12118)
#139    Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#140    Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#141    Future._completeWithValue (dart:async/future_impl.dart:529:5)
#142    _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#143    _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#144    SourceLoader.buildBody (package:front_end/src/fasta/source/source_loader.dart)
#145    _rootRunUnary (dart:async/zone.dart:1198:47)
#146    _FutureListener.handleValue (dart:async/future_impl.dart:835:12118)
#147    Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#148    Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#149    Future._completeWithValue (dart:async/future_impl.dart:529:5)
#150    Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#151    _rootRun (dart:async/zone.dart:1190:13)
#152    _CustomZone.run (dart:async/zone.dart:1093:19)
#153    _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1021:23)
#154    _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#155    _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#156    _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#157    _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.
Command PhaseScriptExecution failed with a nonzero exit code
@VladyslavBondarenko VladyslavBondarenko added platform-ios iOS applications specifically c: fatal crash Crashes that terminate the process c: regression It was better in the past than it is now tool Affects the "flutter" command-line tool. See also t: labels. labels Jul 3, 2020
@kuhnroyal
Copy link

Getting the same for Android and iOS after upgrading a bigger project from stable to latest beta.
Both release builds fail with the same stacktrace.

@jmagman jmagman added engine flutter/engine repository. See also e: labels. and removed tool Affects the "flutter" command-line tool. See also t: labels. labels Jul 14, 2020
@jonahwilliams jonahwilliams added the dependency: dart Dart team may need to help us label Jul 15, 2020
@jonahwilliams
Copy link
Member

FYI @alexmarkov , looks like a crash in TFA

@alexmarkov
Copy link
Contributor

It looks like TFA runs out of memory. TFA is a whole-program analysis and may inherently consume a lot of memory if the input program is large.

@dna-f @kuhnroyal How big is the application you're trying to build? Does it have a lot of auto-generated Dart code?
Also, it would be interesting to see the actual command line of the front-end server, so could you please run flutter with -v option and post the whole log here?

2Gb doesn't sound like too much for TFA: I've seen TFA consuming up to ~4Gb of memory on large apps. Dart VM should grow the heap as needed up to a much higher limit (at least on 64-bit systems). Also, I don't recall any recent changes in TFA which could result in a much higher memory usage.

@rmacnak-google @dnfield Are there are recent changes in GC behavior which may result in these out of memory errors?

@rmacnak-google
Copy link
Contributor

There are no recent GC changes that would cause a program that previously succeed to OOM. (There is the older change of parallel scavenge that sometimes makes the proper Dart OutOfMemoryError become the FATAL in scavenger.cc, but the program would OOM either way.)

@dnfield
Copy link
Contributor
dnfield commented Jul 15, 2020

It should be pretty difficult to run out of memory on macOS, which I believe will typically let you use far more than the amount of physical memory installed on the machine.

It would be helpful to see a reproduction of this. I'm curious how much memory it's trying to allocate when it fails here: https://github.com/dart-lang/sdk/blob/084f9faf813bda21c9b5394d8afadab185b53bfb/runtime/vm/heap/scavenger.cc#L281

My guess right now is that it's already at a few GB and it requests some insane number of bytes for that malloc to fail.

@dnfield
Copy link
Contributor
dnfield commented Jul 15, 2020

If you cannot share a reproduction program for this, it would also help if someone experiencing it can bisect to a specific commit (ideally to a specific Dart roll into the engine, but even just a specific engine roll would be more helpful right now).

You can use the git bisect command in your Flutter repository to do this by checking out the last known good revision, doing git bisect start, checking out the first known bad revision, git bisect bad, and proceeding from there.

@kuhnroyal
Copy link

@alexmarkov 43.298 lines of Dart code including ~20.000 generated from moor and built_value libraries.
Everything builds fine with Flutter 1.17.5

Build is running on MacOS Catalina, it is however running in some VM which might have a memory limit. Will get back to you on that.

@kuhnroyal
Copy link

What is TFA? 🤔
The build nodes have 5120MB of memory.

I can test tomorrow if this also occurs on my own machine.

@alexmarkov
Copy link
Contributor

@kuhnroyal TFA is a type flow analysis, the whole-program analysis used by Dart AOT compiler.
Could you try to increase memory limit for your build nodes and see if it helps?
Could you also run top with sorting by memory while build is in progress and check how much memory is consumed by various processes (top 5-10). Please do this experiment with current version and with 1.17.5 and post results here so we could compare.

@kuhnroyal
Copy link

@alexmarkov I tried this on my machine with 16GB MacOS Catalina. It also fails here running flutter build ios --release

Flutter 1.17.5:
One dart process goes up to 2396m and the build succeeds.
Flutter 1.19.0-4.3.pre5:
One dart process goes up to 2226m and the build fails with OOM.

@kuhnroyal
Copy link

Here is the log from the Android build:

Log output
[+2001 ms] > Task :app:compileFlutterBuildDevRelease
[        ] [  +25 ms] executing: [/Users/username/fvm/versions/1.19.0-4.3.pre/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [ +124 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [   +3 ms] 8fe7655ed20ffd1395f68e30539a847a01a30351
[        ] [   +1 ms] executing: [/Users/username/fvm/versions/1.19.0-4.3.pre/] git tag --contains HEAD
[        ] [ +418 ms] Exit code 0 from: git tag --contains HEAD
[        ] [        ] 1.19.0-4.3.pre
[        ] [   +9 ms] executing: [/Users/username/fvm/versions/1.19.0-4.3.pre/] git rev-parse --abbrev-ref --symbolic @{u}
[        ] [  +17 ms] Exit code 128 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] [        ] fatal: HEAD zeigt auf keinen Branch
[        ] [  +53 ms] executing: [/Users/username/fvm/versions/1.19.0-4.3.pre/] git rev-parse --abbrev-ref HEAD
[        ] [  +24 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] [        ] HEAD
[        ] [  +69 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [   +5 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [  +18 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] [ +129 ms] Initializing file store
[        ] [  +37 ms] Skipping target: gen_localizations
[        ] [   +7 ms] kernel_snapshot: Starting due to {}
[        ] [  +61 ms] /Users/username/fvm/versions/1.19.0-4.3.pre/bin/cache/dart-sdk/bin/dart --disable-dart-dev --old_gen_heap_size=2000 /Users/username/fvm/versions/1.19.0-4.3.pre/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root /Users/username/fvm/versions/1.19.0-4.3.pre/bin/cache/artifacts/engine/common/flutter_patched_sdk_product/ --target=flutter -Ddart.developer.causal_async_stacks=false -Ddart.vm.profile=false -Ddart.vm.product=true --bytecode-options=source-positions --aot --tfa --packages /Users/username/workspace/handover/.packages --output-dill /Users/username/workspace/handover/.dart_tool/flutter_build/a7aa12a0857601bb9700fc183923347e/app.dill --depfile /Users/username/workspace/handover/.dart_tool/flutter_build/a7aa12a0857601bb9700fc183923347e/kernel_snapshot.d package:app/main.dart
[+27486 ms] > Task :path_provider:generateReleaseRFile
[+56099 ms] > Task :app:compileFlutterBuildDevRelease
[        ] [+83623 ms] Exhausted heap space, trying to allocate 262176 bytes.
[+1201 ms] [+1125 ms] Unhandled exception:
[        ]            Out of Memory
[        ]            #0      _CompactLinkedHashSet._init (dart:collection-patch/compact_hash.dart)
[        ]            #1      _CompactLinkedHashSet._rehash (dart:collection-patch/compact_hash.dart:511:7)
[        ]            #2      _CompactLinkedHashSet.add (dart:collection-patch/compact_hash.dart:561:7)
[        ]            #3      _DependencyTracker.addDependentInvocation (package:vm/transformations/type_flow/analysis.dart:56:29)
[        ]            #4      TypeFlowAnalysis.applyCall (package:vm/transformations/type_flow/analysis.dart:1496:20)
[        ]            #5      Call.apply (package:vm/transformations/type_flow/summary.dart:265:31)
[        ]            #6      Summary.apply (package:vm/transformations/type_flow/summary.dart:696:33)
[        ]            #7      _DirectInvocation._processFunction (package:vm/transformations/type_flow/analysis.dart:265:24)
[        ]            #8      _DirectInvocation.process (package:vm/transformations/type_flow/analysis.dart:181:14)
[        ]            #9      _WorkList.processInvocation (package:vm/transformations/type_flow/analysis.dart:1258:32)
[        ]            #10     _WorkList.process (package:vm/transformations/type_flow/analysis.dart:1238:7)
[        ]            #11     TypeFlowAnalysis.process (package:vm/transformations/type_flow/analysis.dart:1387:14)
[        ]            #12     transformComponent (package:vm/transformations/type_flow/transformer.dart:66:20)
[        ]            #13     runGlobalTransformations (package:vm/kernel_front_end.dart:460:5)
[        ]            #14     compileToKernel (package:vm/kernel_front_end.dart:357:11)
[        ]            #15     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ]            #16     _FutureListener.handleValue (dart:async/future_impl.dart:835:12118)
[        ]            #17     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ]            #18     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ]            #19     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ]            #20     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
[        ]            #21     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[        ]            #22     kernelForProgram (package:front_end/src/api_prototype/kernel_generator.dart)
[        ]            #23     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ]            #24     _FutureListener.handleValue (dart:async/future_impl.dart:835:12118)
[        ]            #25     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ]            #26     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ]            #27     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ]            #28     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
[        ]            #29     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[        ]            #30     kernelForProgramInternal (package:front_end/src/api_prototype/kernel_generator.dart)
[        ]            #31     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ]            #32     _FutureListener.handleValue (dart:async/future_impl.dart:835:12118)
[        ]            #33     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ]            #34     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ]            #35     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ]            #36     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
[        ]            #37     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[        ]            #38     kernelForProgramInternal.<anonymous closure> (package:front_end/src/api_prototype/kernel_generator.dart)
[        ]            ...
[        ]            ...
[        ]            #64     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[        ]            #65     withCrashReporting (package:front_end/src/fasta/crash.dart)
[        ]            #66     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ]            #67     _FutureListener.handleValue (dart:async/future_impl.dart:835:12118)
[        ]            #68     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ]            #69     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ]            #70     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ]            #71     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
[        ]            #72     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[        ]            #73     KernelTarget.buildComponent.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart)
[        ]            #74     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ]            #75     _FutureListener.handleValue (dart:async/future_impl.dart:835:12118)
[        ]            #76     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ]            #77     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ]            #78     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ]            #79     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
[        ]            #80     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[        ]            #81     Loader.buildBodies (package:front_end/src/fasta/loader.dart)
[        ]            #82     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ]            #83     _FutureListener.handleValue (dart:async/future_impl.dart:835:12118)
[        ]            #84     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ]            #85     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ]            #86     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ]            #87     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
[        ]            #88     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[        ]            #89     SourceLoader.buildBody (package:front_end/src/fasta/source/source_loader.dart)
[        ]            #90     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ]            #91     _FutureListener.handleValue (dart:async/future_impl.dart:835:12118)
[        ]            #92     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ]            #93     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ]            #94     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ]            #95     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
[        ]            #96     _rootRun (dart:async/zone.dart:1190:13)
[        ]            #97     _CustomZone.run (dart:async/zone.dart:1093:19)
[        ]            #98     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1021:23)
[        ]            #99     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
[        ]            #100    _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
[        ]            #101    _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
[        ]            #102    _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
[  +83 ms] [ +157 ms] Persisting file store
[        ] [   +2 ms] Done persisting file store
[        ] [  +12 ms] "flutter assemble" took 85.213ms.
[        ] [   +2 ms] Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
[        ] build failed.
[  +98 ms] #0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
[        ] #1      AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:235:7)
[        ] #2      _rootRunUnary (dart:async/zone.dart:1198:47)
[        ] #3      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
[        ] #4      _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
[        ] #5      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ] #6      Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ] #7      Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ] #8      _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
[        ] #9      _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[   +1 ms] #10     FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
[        ] #13     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
[        ] #14     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ] #15     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ] #16     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ] #17     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
[        ] #18     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[        ] #19     _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart)
[        ] #20     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ] #21     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
[        ] #22     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
[        ] #23     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ] #24     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ] #25     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ] #26     Future.wait.<anonymous closure> (dart:async/future.dart:409:22)
[        ] #27     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ] #28     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
[        ] #29     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
[        ] #30     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ] #31     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ] #32     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ] #33     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
[        ] #34     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[        ] #35     _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart)
[        ] #36     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ] #37     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
[        ] #38     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
[        ] #39     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ] #40     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ] #41     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ] #42     Future.wait.<anonymous closure> (dart:async/future.dart:409:22)
[        ] #43     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ] #44     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
[        ] #45     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
[        ] #46     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ] #47     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ] #48     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ] #49     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
[        ] #50     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[        ] #51     _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart)
[        ] #52     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ] #53     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
[        ] #54     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
[        ] #55     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ] #56     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ] #57     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ] #58     Future.wait.<anonymous closure> (dart:async/future.dart:409:22)
[        ] #59     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ] #60     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
[        ] #61     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
[        ] #62     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ] #63     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ] #64     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ] #65     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
[        ] #66     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[        ] #67     _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart)
[        ] #68     _asyncErrorWrapperHelper.errorCallback (dart:async-patch/async_patch.dart:91:64)
[        ] #69     _rootRunBinary (dart:async/zone.dart:1214:47)
[        ] #70     _CustomZone.runBinary (dart:async/zone.dart:1107:19)
[        ] #71     _FutureListener.handleError (dart:async/future_impl.dart:157:20)
[        ] #72     Future._propagateToListeners.handleError (dart:async/future_impl.dart:708:47)
[        ] #73     Future._propagateToListeners (dart:async/future_impl.dart:729:24)
[        ] #74     Future._completeError (dart:async/future_impl.dart:537:5)
[        ] #75     _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:47:15)
[        ] #76     KernelSnapshot.build (package:flutter_tools/src/build_system/targets/dart.dart)
[        ] #77     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ] #78     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
[        ] #79     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
[        ] #80     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ] #81     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ] #82     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ] #83     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
[        ] #84     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[        ] #85     KernelCompiler.compile (package:flutter_tools/src/compile.dart)
[        ] #86     _rootRunUnary (dart:async/zone.dart:1198:47)
[        ] #87     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
[        ] #88     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
[        ] #89     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
[        ] #90     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
[        ] #91     Future._completeWithValue (dart:async/future_impl.dart:529:5)
[        ] #92     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
[        ] #93     _rootRun (dart:async/zone.dart:1190:13)
[        ] #94     _CustomZone.run (dart:async/zone.dart:1093:19)
[        ] #95     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
[        ] #96     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
[        ] #97     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
[        ] #98     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
[        ] #99     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
[        ] #100    _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
[  +86 ms] > Task :app:compileFlutterBuildDevRelease FAILED
[  +95 ms] FAILURE: Build failed with an exception.
[        ] * Where:
[        ] Script '/Users/username/fvm/versions/1.19.0-4.3.pre/packages/flutter_tools/gradle/flutter.gradle' line: 896
[        ] * What went wrong:
[        ] Execution failed for task ':app:compileFlutterBuildDevRelease'.
[        ] > Process 'command '/Users/username/fvm/versions/1.19.0-4.3.pre/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 1m 58s
[        ] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[        ] Use '--warning-mode all' to show the individual deprecation warnings.
[        ] See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
[        ] 12 actionable tasks: 2 executed, 10 up-to-date
[ +457 ms] Running Gradle task 'assembleDevRelease'... (completed in 119,6s)
[  +40 ms] "flutter apk" took 125.628ms.
Gradle task assembleDevRelease failed with exit code 1

@alexmarkov
Copy link
Contributor

Thanks, @kuhnroyal !

The memory usage hasn't grown. There is --old_gen_heap_size=2000 VM option passed to the front-end server invocation. It limits Dart VM heap size and it is not enough to compile this particular application.

@jonahwilliams
Copy link
Member

I think we removed that flag once we determined the issue was caused by the truncated dill file: #58525

Though that might not be in this particular version

@alexmarkov
Copy link
Contributor

The limit was added in #58039. /cc @zanderso

@dna-f
Copy link
Author
dna-f commented Jul 16, 2020

Hi @alexmarkov,
my project is quite big and i can count something like 270 classes auto-generated through build_runner.
I can compile the project in debug mode and run it on the iOS simulator, but when i execute the following command to prepare the release I got the error:
flutter build ios --release --target lib/main.dart --flavor production --verbose
(the command is already running with the -verbose option and the stack trace included before)

Didn't try git bisect yet.

You can find some top screenshots attached.
The first one crashes with 2122M on the dart process (v. 1.19.0-4.3.pre)
Screenshot 2020-07-17 at 00 19 01

The second one ends correctly, reaching more memory usage than the first, 2296M and even more ~2400M (1.18.0-11.1.pre)

Screenshot 2020-07-17 at 00 19 16

@zanderso
Copy link
Member

The limit was first in dev in 1.19.0-2.0.pre and removed in 1.19.0-5.0.pre. I believe this range contains 1.19.0-4.3.pre5.

@alexmarkov
Copy link
Contributor

@kuhnroyal @dna-f Could you try a newer version of Flutter and confirm that the problem is fixed?

@kuhnroyal
Copy link
kuhnroyal commented Jul 17, 2020

Yea, I just tried locally with 1.19.0-5.0.pre and it completes while using 2800m.
Didn't check for a newer version as I was using beta channel.

Gonna send this to CI and report back.

Edit: Builds on CI as well now!

@dna-f
Copy link
Author
dna-f commented Jul 18, 2020

Everything ok for me too
Thanks so much!

@alexmarkov
Copy link
Contributor

Thank you for the confirmation.
I think we can close this issue as it is already fixed in the current version.

@github-actions
Copy link

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 flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: fatal crash Crashes that terminate the process c: regression It was better in the past than it is now dependency: dart Dart team may need to help us engine flutter/engine repository. See also e: labels. platform-ios iOS applications specifically
Projects
None yet
Development

No branches or pull requests

9 participants