我有耗尽的堆空间问题和Flashv2.10.5,我正在MacOS上进行开发,并在iPadOS上运行。
颤振医生输出:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.5, on macOS 12.6 21G115 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.71.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
• No issues found!
错误输出:
Exhausted heap space, trying to allocate 48 bytes.
Exhausted heap space, trying to allocate 32 bytes.
Exhausted heap space, trying to allocate 48 bytes.
Exhausted heap space, trying to allocate 32 bytes.
Exhausted heap space, trying to allocate 48 bytes.
Exhausted heap space, trying to allocate 32 bytes.
Exhausted heap space, trying to allocate 48 bytes.
Exhausted heap space, trying to allocate 32 bytes.
Exhausted heap space, trying to allocate 48 bytes.
Exhausted heap space, trying to allocate 32 bytes.
这可能与插件有关,因为在Android中没有出现任何问题。
flutter clean
也帮不了flutter upgrade
,因为我想继续写2.10.5
最常见的崩溃错误是:
Reloaded 1 of 2289 libraries in 3,398ms.
* thread #10, name = 'io.flutter.1.ui', stop reason = EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=2867 MB, unused=0x0)`
frame #0: 0x00000001036261e4 Flutter`dart::DebuggerStackTrace::CollectAsyncLazy() + 1072
Flutter`dart::DebuggerStackTrace::CollectAsyncLazy:
-> 0x1036261e4 <+1072>: str x0, [x24, #0x18]
0x1036261e8 <+1076>: bl 0x103625900 ; dart::Code::ZoneHandle()
0x1036261ec <+1080>: str x0, [x24, #0x20]
0x1036261f0 <+1084>: bl 0x103625934 ; dart::Function::ZoneHandle()
Target 0: (Runner) stopped.
我不知道什么信息能帮上忙,所以随便问
更新27/9/22
我试着用3.3.2启动,它没有减慢应用程序的速度直到崩溃,而是更早地崩溃,有类似的Exausted heap space
错误,然后:
Exhausted heap space, trying to allocate 80 bytes.
../../third_party/dart/runtime/vm/object.cc: 5722: error: expected: is_finalized()
version=2.18.1 (stable) (Tue Sep 13 11:42:55 2022 +0200) on "ios_arm64"
pid=5514, thread=43011, isolate_group=main(0x102077c00), isolate=main(0x102056c00)
isolate_instructions=103dee3c0, vm_instructions=103dee3c0
pc 0x000000010474e830 fp 0x000000016f243f10 Dart_DumpNativeStackTrace+0x18
pc 0x0000000104363830 fp 0x000000016f243f30 dart::Assert::Fail(char const*, ...) const+0x30
pc 0x000000010445bb5c fp 0x000000016f243fc0 dart::Class::LookupFunctionReadLocked(dart::String const&, dart::Class::MemberKind) const+0x4b0
pc 0x0000000104500990 fp 0x000000016f244090 dart::ResolveDynamicAnyArgsWithCustomLookup(dart::Zone*, dart::Class const&, dart::String const&, bool, std::__1::function<dart::FunctionPtr (dart::Class&, dart::String const&)>)+0x2e4
pc 0x0000000104500570 fp 0x000000016f244120 dart::ResolveDynamicForReceiverClassWithCustomLookup(dart::Class const&, dart::String const&, dart::ArgumentsDescriptor const&, bool, std::__1::function<dart::FunctionPtr (dart::Class&, dart::String const&)>)+0xb8
pc 0x000000010450f7b0 fp 0x000000016f244210 dart::PatchableCallHandler::ResolveSwitchAndReturn(dart::Object const&)+0x3f4
pc 0x000000010450906c fp 0x000000016f2448f0 dart::DRT_SwitchableCallMiss(dart::NativeArguments)+0x404
pc 0x000000010bd0295c fp 0x000000016f244930 Unknown symbol
pc 0x000000010bd02fdc fp 0x000000016f244970 Unknown symbol
pc 0x00000002c0f07e34 fp 0x000000016f2449a0 Unknown symbol
pc 0x000000010bd02ed8 fp 0x000000016f244a70 Unknown symbol
pc 0x00000001043b50b8 fp 0x000000016f244b10 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)+0x25c
pc 0x0000000104734154 fp 0x000000016f244bf0 Dart_ToString+0x1c4
pc 0x0000000104350a30 fp 0x000000016f244d80 (anonymous namespace)::LogUnhandledException(_Dart_Handle*, _Dart_Handle*)+0x3c
pc 0x00000001043509c4 fp 0x000000016f244dd0 (anonymous namespace)::ReportUnhandledException(_Dart_Handle*, _Dart_Handle*)+0xec
pc 0x00000001041ddba0 fp 0x000000016f244e00 tonic::CheckAndHandleError(_Dart_Handle*)+0x48
pc 0x00000001041db0bc fp 0x000000016f244e90 tonic::DartMicrotaskQueue::RunMicrotasks()+0xbc
pc 0x00000001040db5b0 fp 0x000000016f244fd0 fml::MessageLoopImpl::FlushTasks(fml::FlushType)+0x7e8
pc 0x00000001040def18 fp 0x000000016f244ff0 fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*)+0x20
pc 0x0000000180b77678 fp 0x000000016f245000 <redacted>+0x20
pc 0x8e585c0180afb654 fp 0x000000016f2460d0 <redacted>+0x8e585c0000000428
pc 0x8a56e98180af5e00 fp 0x000000016f246130 <redacted>+0x8a56e98000000140
pc 0xc724bb0180ad44b0 fp 0x000000016f246e90 <redacted>+0xc724bb0000000790
pc 0x7c27640180ae7bc8 fp 0x000000016f246f40 CFRunLoopRunSpecific+0x7c27640000000258
pc 0x316a4701040dede8 fp 0x000000016f246f80 fml::MessageLoopDarwin::Run()+0x316a470000000058
pc 0x00000001040dde68 fp 0x000000016f246fc0 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0> >(void*)+0xd0
pc 0x00000001f0b359ac fp 0x000000016f246fe0 _pthread_start+0x94
-- End of DumpStackTrace
pc 0x0000000000000000 fp 0x000000016f244930 sp 0x0000000000000000 [Stub] CallToRuntime
pc 0x000000010bd02fdc fp 0x000000016f244970 sp 0x000000016f244940 [Stub] SwitchableCallMiss
pc 0x00000002c0f07e34 fp 0x000000016f2449a0 sp 0x000000016f244980 [Unoptimized] _objectToString@0150898
pc 0x000000010bd02ed8 fp 0x000000016f244a70 sp 0x000000016f2449b0 [Stub] InvokeDartCode
* thread #8, name = 'io.flutter.1.ui', stop reason = signal SIGABRT
frame #0: 0x00000001b79d5b38 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`:
-> 0x1b79d5b38 <+8>: b.lo 0x1b79d5b58 ; <+40>
0x1b79d5b3c <+12>: pacibsp
0x1b79d5b40 <+16>: stp x29, x30, [sp, #-0x10]!
0x1b79d5b44 <+20>: mov x29, sp
Target 0: (Runner) stopped.
Lost connection to device.
Exited
发布于 2022-09-22 14:54:46
试试这个:
https://stackoverflow.com/questions/73815034
复制相似问题