Skip to content

Exhausted heap space, trying to allocate 8589934608 bytes, making my laptop stops responding #54420

Description

@d-apps

Command

flutter run

When I execute flutter run on mobile and web, randomly, it was giving me this error below, making my laptop stops responding and now it's more often, most of times I had to reboot my laptop, The screenshot below shows trying to run on web but happens when testing on phones too. I always use master channel and I upgrade regularly.

image

Steps to Reproduce

Logs

flutter run --verbose

D:\Documentos\FlutterProjects\app_loja>flutter run --verbose
[  +44 ms] executing: [C:\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +136 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +3 ms] a5765331bca80c7191a6a6ccc95cab56baad5471
[   +1 ms] executing: [C:\src\flutter/] git describe --match *.*.* --first-parent --long --tags
[ +132 ms] Exit code 0 from: git describe --match *.*.* --first-parent --long --tags
[   +1 ms] 1.18.0-dev.4.0-57-ga5765331b
[  +18 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +104 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[   +1 ms] origin/master
[   +1 ms] executing: [C:\src\flutter/] git ls-remote --get-url origin
[  +99 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[ +161 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref HEAD
[  +96 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[   +1 ms] master
[ +135 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +6 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.
[   +2 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +46 ms] executing: C:\Users\Dih\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[  +86 ms] List of devices attached
[  +10 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +1 ms] 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.
[   +7 ms] 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.
[  +97 ms] More than one device connected; please specify a device with the '-d <deviceId>' flag, or use '-d all' to act on all devices.
[  +44 ms] Chrome     • chrome     • web-javascript • Google Chrome 80.0.3987.163
[   +2 ms] Web Server • web-server • web-javascript • Flutter Tools
[  +18 ms] "flutter run" took 364ms.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1      RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:337:7)
<asynchronous suspension>
#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:711:11)
<asynchronous suspension>
#3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:628:33)
<asynchronous suspension>
#4      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart)
#5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
#6      _rootRun (dart:async/zone.dart:1184:13)
#7      _CustomZone.run (dart:async/zone.dart:1077:19)
#8      _runZoned (dart:async/zone.dart:1619:10)
#9      runZoned (dart:async/zone.dart:1539:10)
#10     AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
#11     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:618:20)
#12     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#13     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:340:21)
#14     _rootRunUnary (dart:async/zone.dart:1192:38)
#15     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#16     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#17     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#18     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#19     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#20     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#21     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:306:13)
#22     FlutterVersion.checkFlutterVersionFreshness (package:flutter_tools/src/version.dart)
#23     _rootRunUnary (dart:async/zone.dart:1192:38)
#24     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#25     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#26     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#27     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#28     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#29     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:556:7)
#30     _rootRun (dart:async/zone.dart:1184:13)
#31     _CustomZone.run (dart:async/zone.dart:1077:19)
#32     _CustomZone.runGuarded (dart:async/zone.dart:979:7)
#33     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1019:23)
#34     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#35     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#36     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#37     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)


flutter analyze


D:\Documentos\FlutterProjects\app_loja>flutter analyze
Analyzing app_loja...

   info - 'headerAlignment' is deprecated and shouldn't be used - lib\common\restaurant_item_tile.dart:16:7 - deprecated_member_use
   info - 'tapHeaderToExpand' is deprecated and shouldn't be used - lib\common\restaurant_item_tile.dart:87:7 - deprecated_member_use

2 issues found. (ran in 84.1s)


flutter doctor -v


[√] Flutter (Channel master, v1.18.0-5.0.pre.57, on Microsoft Windows [versão 10.0.18363.720], locale pt-BR)
    • Flutter version 1.18.0-5.0.pre.57 at C:\src\flutter
    • Framework revision a5765331bc (7 hours ago), 2020-04-09 16:15:01 -0700
    • Engine revision 5b4b1f33c6
    • Dart version 2.8.0 (build 2.8.0-dev.20.0 dcdc71d763)


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\Dih\AppData\Local\Android\sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

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

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 45.0.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] Connected device (2 available)
    • Chrome     • chrome     • web-javascript • Google Chrome 80.0.3987.163
    • Web Server • web-server • web-javascript • Flutter Tools

• No issues found!


Packages used


cupertino_icons: ^0.1.3
  money2: ^1.3.0
  font_awesome_flutter: ^8.8.1
  expandable: ^4.1.2
  statusbar: ^1.1.0

  firebase_auth: ^0.15.5+3
  cloud_firestore: ^0.13.4+2

  persistent_bottom_nav_bar: ^1.2.1

  mobx: ^1.1.1
  flutter_mobx: ^1.1.0

  get_it: ^4.0.1
  oktoast: ^2.3.1+1

  brasil_fields: ^0.0.7+2

dev_dependencies:
  flutter_test:
    sdk: flutter

  mobx_codegen: ^1.0.3
  build_runner: ^1.8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: buildBuilding flutter applications with the toolc: crashStack traces logged to the consolec: performanceRelates to speed or footprint issues (see "perf:" labels)customer: crowdAffects or could affect many people, though not necessarily a specific customer.dependency: dartDart team may need to help usfound in release: 1.17Found to occur in 1.17perf: memoryPerformance issues related to memorytoolAffects 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