Flutter iOS 应用程序在从 ipa 文件启动时崩溃,但在从 xCode 运行时工作正常

Posted

技术标签:

【中文标题】Flutter iOS 应用程序在从 ipa 文件启动时崩溃,但在从 xCode 运行时工作正常【英文标题】:Flutter iOS app crashes on start from ipa file, but works fine when running from xCode 【发布时间】:2021-12-29 07:57:36 【问题描述】:

我的 ipa 文件有问题,无法找到问题所在。当我从 Xcode 运行应用程序时,一切都像魅力一样工作,但是当我创建 ipa 文件并从 TestFlight 或 Firebase 分发应用程序运行它时,应用程序在启动时崩溃。

我检查了日志,但完全不确定是什么导致了问题。 你能帮帮我吗?

这是一个日志:

Incident Identifier: 4030C5E3-3DC4-44CD-8E39-65A0A9457664
Hardware Model:      iPhone13,1
Process:             Runner [84257]
Path:                /private/var/containers/Bundle/Application/1B4255C6-3776-4C85-B6F1-8255B16D932F/Runner.app/Runner
Identifier:          rs.groschopp.touristGuide
Version:             1.0.1 (1)
AppStoreTools:       13C90b
AppVariant:          1:iPhone13,1:15
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           rs.groschopp.touristGuide [5216]

Date/Time:           2021-12-27 11:59:12.2545 +0100
Launch Time:         2021-12-27 11:59:11.8737 +0100
OS Version:          iPhone OS 15.1.1 (19B81)
Release Type:        User
Baseband Version:    2.11.04
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0


Kernel Triage:
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage


Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x00000001b8d3e964 __pthread_kill + 8
1   libsystem_pthread.dylib         0x00000001f2928378 pthread_kill + 268 (pthread.c:1610)
2   libsystem_c.dylib               0x000000018cbd6f50 abort + 164 (abort.c:118)
3   Flutter                         0x0000000105d0feec fml::KillProcess() + 12 (logging.cc:143)
4   Flutter                         0x0000000105d1001c fml::LogMessage::~LogMessage() + 4 (logging.cc:130)
5   Flutter                         0x0000000105d1001c fml::LogMessage::~LogMessage() + 304 (logging.cc:74)
6   Flutter                         0x0000000105ef1a6c flutter::DartVM::DartVM(std::__1::shared_ptr<flutter::DartVMData const>, std::__1::shared_ptr<flutter::IsolateNameServer>) + 7048 (dart_vm.cc:442)
7   Flutter                         0x0000000105eefd74 flutter::DartVM::DartVM(std::__1::shared_ptr<flutter::DartVMData const>, std::__1::shared_ptr<flutter::IsolateNameServer>) + 12 (dart_vm.cc:280)
8   Flutter                         0x0000000105eefd74 flutter::DartVM::Create(flutter::Settings, fml::RefPtr<flutter::DartSnapshot>, fml::RefPtr<flutter::DartSnapshot>, std::__1::shared_ptr<flutter::IsolateNameServer>) + 904 (dart_vm.cc:262)
9   Flutter                         0x0000000105d7c9a0 flutter::DartVMRef::Create(flutter::Settings, fml::RefPtr<flutter::DartSnapshot>, fml::RefPtr<flutter::DartSnapshot>) + 524 (dart_vm_lifecycle.cc:77)
10  Flutter                         0x0000000105d7c9a0 flutter::Shell::Create(flutter::TaskRunners, flutter::PlatformData, flutter::Settings, std::__1::function<std::__1::unique_ptr<flutter::PlatformView, std::__1::default_delete<flutter::PlatformView>... + 624 (shell.cc:296)
11  Flutter                         0x0000000105a4c374 -[FlutterEngine createShell:libraryURI:initialRoute:] + 1420 (FlutterEngine.mm:616)
12  Flutter                         0x0000000105a60e5c -[FlutterViewController sharedSetupWithProject:initialRoute:] + 412 (FlutterViewController.mm:205)
13  Flutter                         0x0000000105a60c98 -[FlutterViewController awakeFromNib] + 88 (FlutterViewController.mm:175)
14  UIKitCore                       0x00000001846dfa54 -[UINib instantiateWithOwner:options:] + 2296 (UINib.m:390)
15  UIKitCore                       0x000000018425e294 -[UIStoryboard __reallyInstantiateViewControllerWithIdentifier:creator:storyboardSegueTemplate:sender:] + 284 (UIStoryboard.m:233)
16  UIKitCore                       0x000000018425e12c -[UIStoryboard _instantiateViewControllerWithIdentifier:creator:storyboardSegueTemplate:sender:] + 128 (UIStoryboard.m:212)
17  UIKitCore                       0x0000000184261864 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 184 (UIApplication.m:4702)
18  UIKitCore                       0x00000001842db70c -[UIApplication _loadMainInterfaceFile] + 280 (UIApplication.m:0)
19  UIKitCore                       0x000000018469f3ac -[UIApplication _runWithMainScene:transitionContext:completion:] + 960 (UIApplication.m:4444)
20  UIKitCore                       0x00000001844fce44 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 152 (_UISceneLifecycleMultiplexer.m:452)
21  UIKitCore                       0x000000018435562c _UIScenePerformActionsWithLifecycleActionMask + 104 (_UISceneLifecycleState.m:109)
22  UIKitCore                       0x0000000184480b7c __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 224 (_UISceneLifecycleMultiplexer.m:565)
23  UIKitCore                       0x00000001845a1380 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 248 (_UISceneLifecycleMultiplexer.m:514)
24  UIKitCore                       0x00000001847e1f8c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 760 (_UISceneLifecycleMultiplexer.m:564)
25  UIKitCore                       0x000000018476d710 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 340 (_UISceneLifecycleMultiplexer.m:470)
26  UIKitCore                       0x0000000184356430 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block... + 196 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:73)
27  UIKitCore                       0x0000000184416350 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 892 (BSAnimationSettings+UIKit.m:50)
28  UIKitCore                       0x0000000184358340 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 276 (_UISceneSettingsDiffAction.m:23)
29  UIKitCore                       0x0000000184442df4 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 384 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:58)
30  UIKitCore                       0x00000001848ca260 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.608 + 776 (UIScene.m:1807)
31  UIKitCore                       0x0000000184386c60 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 256 (UIScene.m:1508)
32  UIKitCore                       0x00000001843ca524 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 288 (UIScene.m:1774)
33  UIKitCore                       0x0000000184501d70 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 572 (UIApplication.m:3937)
34  UIKitCore                       0x00000001844410b4 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 388 (UIApplicationSceneClientAgent.m:45)
35  FrontBoardServices              0x0000000193890e20 -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 440 (FBSScene.m:439)
36  FrontBoardServices              0x00000001938b6cdc __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.215 + 128 (FBSWorkspaceScenesClient.m:384)
37  FrontBoardServices              0x00000001938716b4 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:352)
38  FrontBoardServices              0x0000000193872cf4 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 372 (FBSWorkspaceScenesClient.m:383)
39  libdispatch.dylib               0x0000000181a0b660 _dispatch_client_callout + 20 (object.m:560)
40  libdispatch.dylib               0x0000000181a0f118 _dispatch_block_invoke_direct + 264 (queue.c:489)
41  FrontBoardServices              0x0000000193872f94 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:157)
42  FrontBoardServices              0x00000001938723d4 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220 (FBSSerialQueue.m:181)
43  FrontBoardServices              0x00000001938769e4 -[FBSSerialQueue _performNextFromRunLoopSource] + 28 (FBSSerialQueue.m:194)
44  CoreFoundation                  0x0000000181dbb020 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1972)
45  CoreFoundation                  0x0000000181dcbce0 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2016)
46  CoreFoundation                  0x0000000181d06054 __CFRunLoopDoSources0 + 376 (CFRunLoop.c:2061)
47  CoreFoundation                  0x0000000181d0b7f4 __CFRunLoopRun + 820 (CFRunLoop.c:2951)
48  CoreFoundation                  0x0000000181d1f3b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
49  GraphicsServices                0x000000019d6af38c GSEventRunModal + 164 (GSEvent.c:2200)
50  UIKitCore                       0x00000001846bf6a8 -[UIApplication _run] + 1100 (UIApplication.m:3493)
51  UIKitCore                       0x000000018443e7f4 UIApplicationMain + 2092 (UIApplication.m:5046)
52  Runner                          0x000000010417b1f4 main + 64 (AppDelegate.swift:6)
53  dyld                            0x0000000104c79a24 start + 520 (dyldMain.cpp:876)

Thread 1 name:
Thread 1:
0   libsystem_kernel.dylib          0x00000001b8d391a4 __ulock_wait + 8
1   libdispatch.dylib               0x0000000181a0c054 _dlock_wait + 56 (lock.c:326)
2   libdispatch.dylib               0x0000000181a0bdf8 _dispatch_thread_event_wait_slow + 56 (lock.c:366)
3   libdispatch.dylib               0x0000000181a1ab9c __DISPATCH_WAIT_FOR_QUEUE__ + 364 (lock.h:330)
4   libdispatch.dylib               0x0000000181a1a744 _dispatch_sync_f_slow + 144 (queue.c:1762)
5   UIKitCore                       0x0000000184518398 __37-[_UIRemoteKeyboards startConnection]_block_invoke_3 + 136 (_UIRemoteKeyboards.m:1075)
6   CoreFoundation                  0x0000000181d222f4 __invoking___ + 148
7   CoreFoundation                  0x0000000181d3fac4 -[NSInvocation invoke] + 468 (NSForwarding.m:3378)
8   Foundation                      0x0000000183556f00 __NSXPCCONNECTION_IS_CALLING_OUT_TO_REPLY_BLOCK__ + 24 (NSXPCConnection.m:170)
9   Foundation                      0x0000000183577da4 -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:] + 556 (NSXPCConnection.m:316)
10  Foundation                      0x0000000183552a84 __88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_3 + 212 (NSXPCConnection.m:1630)
11  libxpc.dylib                    0x00000001f295832c _xpc_connection_reply_callout + 116 (serializer.c:119)
12  libxpc.dylib                    0x00000001f294b85c _xpc_connection_call_reply_async + 88 (connection.c:833)
13  libdispatch.dylib               0x0000000181a0b6e0 _dispatch_client_callout3 + 20 (object.m:586)
14  libdispatch.dylib               0x0000000181a28ec8 _dispatch_mach_msg_async_reply_invoke + 348 (mach.c:2464)
15  libdispatch.dylib               0x0000000181a12cbc _dispatch_lane_serial_drain + 376 (inline_internal.h:0)
16  libdispatch.dylib               0x0000000181a1398c _dispatch_lane_invoke + 444 (queue.c:3937)
17  libdispatch.dylib               0x0000000181a1e1a8 _dispatch_workloop_worker_thread + 656 (queue.c:6727)
18  libsystem_pthread.dylib         0x00000001f29220f4 _pthread_wqthread + 288 (pthread.c:2541)
19  libsystem_pthread.dylib         0x00000001f2921e94 start_wqthread + 8

Thread 2:
0   libsystem_pthread.dylib         0x00000001f2921e8c start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib         0x00000001f2921e8c start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib         0x00000001f2921e8c start_wqthread + 0

Thread 5:
0   libsystem_pthread.dylib         0x00000001f2921e8c start_wqthread + 0

Thread 6 name:
Thread 6:
0   libsystem_kernel.dylib          0x00000001b8d38504 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001b8d38b9c mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                  0x0000000181d07688 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                  0x0000000181d0b97c __CFRunLoopRun + 1212 (CFRunLoop.c:3000)
4   CoreFoundation                  0x0000000181d1f3b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   Foundation                      0x000000018353a354 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236 (NSRunLoop.m:373)
6   Foundation                      0x000000018357bc28 -[NSRunLoop(NSRunLoop) runUntilDate:] + 92 (NSRunLoop.m:420)
7   UIKitCore                       0x00000001846388a4 -[UIEventFetcher threadMain] + 524 (UIEventFetcher.m:1167)
8   Foundation                      0x000000018358a36c __NSThread__start__ + 808 (NSThread.m:972)
9   libsystem_pthread.dylib         0x00000001f29229a4 _pthread_start + 148 (pthread.c:891)
10  libsystem_pthread.dylib         0x00000001f2921ea0 thread_start + 8

Thread 7 name:
Thread 7:
0   libsystem_kernel.dylib          0x00000001b8d38504 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001b8d38b9c mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                  0x0000000181d07688 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                  0x0000000181d0b97c __CFRunLoopRun + 1212 (CFRunLoop.c:3000)
4   CoreFoundation                  0x0000000181d1f3b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   Flutter                         0x0000000105d13ad0 fml::MessageLoopDarwin::Run() + 88 (message_loop_darwin.mm:46)
6   Flutter                         0x0000000105d134d4 fml::MessageLoopImpl::DoRun() + 28 (message_loop_impl.cc:96)
7   Flutter                         0x0000000105d134d4 fml::MessageLoop::Run() + 32 (message_loop.cc:49)
8   Flutter                         0x0000000105d134d4 fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0::operator()() const + 144 (thread.cc:35)
9   Flutter                         0x0000000105d134d4 decltype(std::__1::forward<fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>(fp)()) std::__1::__invoke<fml::Thread::Thread(std:... + 144 (type_traits:4425)
10  Flutter                         0x0000000105d134d4 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::cha... + 144 (thread:341)
11  Flutter                         0x0000000105d134d4 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::basic_string<char... + 196 (thread:351)
12  libsystem_pthread.dylib         0x00000001f29229a4 _pthread_start + 148 (pthread.c:891)
13  libsystem_pthread.dylib         0x00000001f2921ea0 thread_start + 8

Thread 8 name:
Thread 8:
0   libsystem_kernel.dylib          0x00000001b8d38504 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001b8d38b9c mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                  0x0000000181d07688 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                  0x0000000181d0b97c __CFRunLoopRun + 1212 (CFRunLoop.c:3000)
4   CoreFoundation                  0x0000000181d1f3b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   Flutter                         0x0000000105d13ad0 fml::MessageLoopDarwin::Run() + 88 (message_loop_darwin.mm:46)
6   Flutter                         0x0000000105d134d4 fml::MessageLoopImpl::DoRun() + 28 (message_loop_impl.cc:96)
7   Flutter                         0x0000000105d134d4 fml::MessageLoop::Run() + 32 (message_loop.cc:49)
8   Flutter                         0x0000000105d134d4 fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0::operator()() const + 144 (thread.cc:35)
9   Flutter                         0x0000000105d134d4 decltype(std::__1::forward<fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>(fp)()) std::__1::__invoke<fml::Thread::Thread(std:... + 144 (type_traits:4425)
10  Flutter                         0x0000000105d134d4 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::cha... + 144 (thread:341)
11  Flutter                         0x0000000105d134d4 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::basic_string<char... + 196 (thread:351)
12  libsystem_pthread.dylib         0x00000001f29229a4 _pthread_start + 148 (pthread.c:891)
13  libsystem_pthread.dylib         0x00000001f2921ea0 thread_start + 8

Thread 9 name:
Thread 9:
0   libsystem_kernel.dylib          0x00000001b8d38504 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001b8d38b9c mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                  0x0000000181d07688 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                  0x0000000181d0b97c __CFRunLoopRun + 1212 (CFRunLoop.c:3000)
4   CoreFoundation                  0x0000000181d1f3b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   Flutter                         0x0000000105d13ad0 fml::MessageLoopDarwin::Run() + 88 (message_loop_darwin.mm:46)
6   Flutter                         0x0000000105d134d4 fml::MessageLoopImpl::DoRun() + 28 (message_loop_impl.cc:96)
7   Flutter                         0x0000000105d134d4 fml::MessageLoop::Run() + 32 (message_loop.cc:49)
8   Flutter                         0x0000000105d134d4 fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0::operator()() const + 144 (thread.cc:35)
9   Flutter                         0x0000000105d134d4 decltype(std::__1::forward<fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>(fp)()) std::__1::__invoke<fml::Thread::Thread(std:... + 144 (type_traits:4425)
10  Flutter                         0x0000000105d134d4 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::cha... + 144 (thread:341)
11  Flutter                         0x0000000105d134d4 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::basic_string<char... + 196 (thread:351)
12  libsystem_pthread.dylib         0x00000001f29229a4 _pthread_start + 148 (pthread.c:891)
13  libsystem_pthread.dylib         0x00000001f2921ea0 thread_start + 8

Thread 10 name:
Thread 10:
0   libsystem_kernel.dylib          0x00000001b8d38f90 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x00000001f2929254 _pthread_cond_wait + 1228 (pthread_cond.c:636)
2   libc++.1.dylib                  0x000000019a4a7ddc std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (__threading_support:437)
3   Flutter                         0x0000000105d0ebdc void std::__1::condition_variable::wait<fml::ConcurrentMessageLoop::WorkerMain()::$_1>(std::__1::unique_lock<std::__1::mutex>&, fml::ConcurrentMessageLoop::WorkerMain()::$_1) + 40 (__mutex_base:374)
4   Flutter                         0x0000000105d0ebdc fml::ConcurrentMessageLoop::WorkerMain() + 80 (concurrent_message_loop.cc:80)
5   Flutter                         0x0000000105d0ebdc fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0::operator()() const + 184 (concurrent_message_loop.cc:26)
6   Flutter                         0x0000000105d0ebdc decltype(std::__1::forward<fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>(fp)()) std::__1::__invoke<fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>(fm... + 184 (type_traits:4425)
7   Flutter                         0x0000000105d0ebdc void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned lon... + 184 (thread:341)
8   Flutter                         0x0000000105d0ebdc 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::ConcurrentMessageLoop::ConcurrentMessageLo... + 256 (thread:351)
9   libsystem_pthread.dylib         0x00000001f29229a4 _pthread_start + 148 (pthread.c:891)
10  libsystem_pthread.dylib         0x00000001f2921ea0 thread_start + 8

Thread 11 name:
Thread 11:
0   libsystem_kernel.dylib          0x00000001b8d38f90 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x00000001f2929254 _pthread_cond_wait + 1228 (pthread_cond.c:636)
2   libc++.1.dylib                  0x000000019a4a7ddc std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (__threading_support:437)
3   Flutter                         0x0000000105d0ebdc void std::__1::condition_variable::wait<fml::ConcurrentMessageLoop::WorkerMain()::$_1>(std::__1::unique_lock<std::__1::mutex>&, fml::ConcurrentMessageLoop::WorkerMain()::$_1) + 40 (__mutex_base:374)
4   Flutter                         0x0000000105d0ebdc fml::ConcurrentMessageLoop::WorkerMain() + 80 (concurrent_message_loop.cc:80)
5   Flutter                         0x0000000105d0ebdc fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0::operator()() const + 184 (concurrent_message_loop.cc:26)
6   Flutter                         0x0000000105d0ebdc decltype(std::__1::forward<fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>(fp)()) std::__1::__invoke<fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>(fm... + 184 (type_traits:4425)
7   Flutter                         0x0000000105d0ebdc void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned lon... + 184 (thread:341)
8   Flutter                         0x0000000105d0ebdc 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::ConcurrentMessageLoop::ConcurrentMessageLo... + 256 (thread:351)
9   libsystem_pthread.dylib         0x00000001f29229a4 _pthread_start + 148 (pthread.c:891)
10  libsystem_pthread.dylib         0x00000001f2921ea0 thread_start + 8

Thread 12 name:
Thread 12:
0   libsystem_kernel.dylib          0x00000001b8d38f90 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x00000001f2929254 _pthread_cond_wait + 1228 (pthread_cond.c:636)
2   libc++.1.dylib                  0x000000019a4a7ddc std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (__threading_support:437)
3   Flutter                         0x0000000105d0ebdc void std::__1::condition_variable::wait<fml::ConcurrentMessageLoop::WorkerMain()::$_1>(std::__1::unique_lock<std::__1::mutex>&, fml::ConcurrentMessageLoop::WorkerMain()::$_1) + 40 (__mutex_base:374)
4   Flutter                         0x0000000105d0ebdc fml::ConcurrentMessageLoop::WorkerMain() + 80 (concurrent_message_loop.cc:80)
5   Flutter                         0x0000000105d0ebdc fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0::operator()() const + 184 (concurrent_message_loop.cc:26)
6   Flutter                         0x0000000105d0ebdc decltype(std::__1::forward<fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>(fp)()) std::__1::__invoke<fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>(fm... + 184 (type_traits:4425)
7   Flutter                         0x0000000105d0ebdc void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned lon... + 184 (thread:341)
8   Flutter                         0x0000000105d0ebdc 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::ConcurrentMessageLoop::ConcurrentMessageLo... + 256 (thread:351)
9   libsystem_pthread.dylib         0x00000001f29229a4 _pthread_start + 148 (pthread.c:891)
10  libsystem_pthread.dylib         0x00000001f2921ea0 thread_start + 8


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000000000210   x5: 0x000000010bf0aa90   x6: 0x000000000000002b   x7: 0x000000000000003e
    x8: 0x67fc621587314cce   x9: 0x67fc621483fd094e  x10: 0x00000000000bef80  x11: 0x0000000000179f41
   x12: 0x000000010bf00000  x13: 0x0000000000000000  x14: 0x00000000b1cc6aac  x15: 0x000000000000f2ce
   x16: 0x0000000000000148  x17: 0x0000000104cc4580  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000000103  x21: 0x0000000104cc4660  x22: 0x000000016bc86468  x23: 0x00000001061a8b48
   x24: 0x000000010c82c000  x25: 0x0000000106175b40  x26: 0x00000001061a4000  x27: 0x00000001084a4000
   x28: 0x00000001087b74b0   fp: 0x000000016bc86400   lr: 0x00000001f2928378
    sp: 0x000000016bc863e0   pc: 0x00000001b8d3e964 cpsr: 0x40000000
   esr: 0x56000080  Address size fault


Binary Images:
0x104174000 - 0x10485bfff Runner arm64  <495cd1eb9681314f8211ddfc72685f96> /private/var/containers/Bundle/Application/1B4255C6-3776-4C85-B6F1-8255B16D932F/Runner.app/Runner
0x104c60000 - 0x104cb7fff dyld arm64e  <c21dba379df93fc7b286734030e18bb1> /usr/lib/dyld
0x105a3c000 - 0x10613ffff Flutter arm64  <1a310b4c60b03835aafeea4f603dbf17> /private/var/containers/Bundle/Application/1B4255C6-3776-4C85-B6F1-8255B16D932F/Runner.app/Frameworks/Flutter.framework/Flutter
0x181a07000 - 0x181a4dfff libdispatch.dylib arm64e  <a5cbaab3e3893548baacfab18411b94a> /usr/lib/system/libdispatch.dylib
0x181d00000 - 0x182153fff CoreFoundation arm64e  <b2d21cfd378c36d5baf73f70599cfefc> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x183522000 - 0x183827fff Foundation arm64e  <d59c69755af237bc93be43b80b4293a5> /System/Library/Frameworks/Foundation.framework/Foundation
0x1841a6000 - 0x185a2afff UIKitCore arm64e  <8388eb03002b3b35a78a6a022894292e> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x18cbb7000 - 0x18cc35fff libsystem_c.dylib arm64e  <30a1668a329d30009f747b42b21fe0fd> /usr/lib/system/libsystem_c.dylib
0x193867000 - 0x193912fff FrontBoardServices arm64e  <6fdec0c3e5003e06948ee34bda520801> /System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices
0x19a49e000 - 0x19a501fff libc++.1.dylib arm64e  <255864c483d93bac8c7aad1b2d8a60cc> /usr/lib/libc++.1.dylib
0x19d6ae000 - 0x19d6b6fff GraphicsServices arm64e  <44e4515eb18737f18fe028e7b087daf5> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1b8d37000 - 0x1b8d6afff libsystem_kernel.dylib arm64e  <b1b942de75903c61980a19d80ed4da37> /usr/lib/system/libsystem_kernel.dylib
0x1f2921000 - 0x1f292cfff libsystem_pthread.dylib arm64e  <1a4a45fd1bb639df84140590ce103717> /usr/lib/system/libsystem_pthread.dylib
0x1f293c000 - 0x1f2973fff libxpc.dylib arm64e  <c4b164ee546f365786ee230d897ef6a0> /usr/lib/system/libxpc.dylib

EOF

【问题讨论】:

你有什么解决办法吗?我也面临着类似的问题。 是的。我在错误的时间使用了“清理构建文件夹”。 - 清理构建文件夹(来自 XCode);然后返回 Visual Code(或您使用的其他 ID)- Flutter clean ; - Flutter 构建 ios --release ;然后返回 XCode 并使用 Archive。在“Flutter build iOS --release”之后,我正在做干净的构建文件夹,然后 IPA 文件是从空的构建文件夹创建的。 同样的事情发生在这里。我会尝试上面的干净解决方案,但我对此表示怀疑。 【参考方案1】:

几天来我一直在为同样的问题苦苦挣扎,然后我发现这不是 Flutter 的问题,而是 X-Code 最新版本 13.2 的问题。 来自这些不同来源的这些帖子证实了这一点:

https://developer.apple.com/forums/thread/696197 iOS app crashes at launch on Testflight for iOS 14 and below but not iOS 15+ 最后,我只是用Code Magic 构建了我的项目,确切地说是不同的 Xcode 版本 12.5(因为我懒得降级我的操作系统来运行较低版本的 Xcode),它对我来说运行良好。

【讨论】:

以上是关于Flutter iOS 应用程序在从 ipa 文件启动时崩溃,但在从 xCode 运行时工作正常的主要内容,如果未能解决你的问题,请参考以下文章

如何减少 Flutter 中 IOS 构建的 .ipa 文件大小?

无法在 Xcode 中分发我的 iOS 版 Flutter 应用程序 - “包中的 ipa 包含无效字符”

是否可以在flutlab中生成flutter .ipa文件?

从 Windows 10 构建发布 Flutter ios 应用程序

如何使用 Android Studio 在 Windows 中为 Flutter 应用程序生成 IOS IPA?

如何使用 Android Studio 在 Flutter 中构建 .apk 和 .ipa?