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

Maui iOS crashes on launch in release mode #18438

Closed
jeryllei opened this issue Oct 30, 2023 · 1 comment
Closed

Maui iOS crashes on launch in release mode #18438

jeryllei opened this issue Oct 30, 2023 · 1 comment
Labels
platform/iOS 🍎 t/bug Something isn't working

Comments

@jeryllei
Copy link

jeryllei commented Oct 30, 2023

Description

While in release mode, launching our Maui app on Apple devices results in the app immediately. Attached crash log given by Apple.

I've tried clearing out bin/obj folders before launching it but the same issue occurs. Happens to both the simulator device and physical Apple devices when launching the published app. Currently creating archives through VS on Windows while paired to a Mac Mini, trying to create and archive either through VS Mac or the CLI both result in errors such as ios-arm64 runtime not set and no project file found, but that's a separate issue. I have already setup development and distribution profiles for iOS.

Debug mode works completely fine on the simulator and a physical Apple device. Debug and release modes also work without issue on Android devices and emulators.

Both Mac and Windows Visual Studio are on the latest versions with the same Maui versions installed. (7.0.96) XCode is version 14.3.

The relevant portion of the Maui csproj file:

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-ios|AnyCPU'">
  <CreatePackage>false</CreatePackage>
  <RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
  <CodesignProvision>Automatic</CodesignProvision>
  <CodesignKey>iPhone Distribution</CodesignKey>
</PropertyGroup>

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

7.0.96

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 16.5.1, 17.0.3

Did you find any workaround?

No response

Relevant log output

Incident Identifier: 574B2510-A1EC-4B08-857F-C4131BE4F587
Hardware Model:      iPad13,16
Process:             TTB.Maui [3213]
Path:                /private/var/containers/Bundle/Application/CB03E599-92D8-4DC5-B310-443903C949BB/TTB.Maui.app/TTB.Maui
Identifier:          com.companyname.ttb.maui
Version:             1.39 (40)
AppStoreTools:       15A240a
AppVariant:          1:iPad13,16:16
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.companyname.ttb.maui [803]

Date/Time:           2023-10-30 13:01:21.7491 -0700
Launch Time:         2023-10-30 13:01:21.2773 -0700
OS Version:          iPhone OS 16.5.1 (20F75)
Release Type:        User
Report Version:      104

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


Thread 0 name:
Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001c6dab558 __pthread_kill + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001e7a79118 pthread_kill + 268 (pthread.c:1670)
2   libsystem_c.dylib             	0x000000018fc93178 abort + 180 (abort.c:118)
3   TTB.Maui                      	0x000000010f281a50 0x104b74000 + 175168080
4   TTB.Maui                      	0x000000010f206540 0x104b74000 + 174662976
5   libsystem_platform.dylib      	0x00000001e79dd214 _sigtramp + 56 (sigtramp.c:116)
6   libsystem_pthread.dylib       	0x00000001e7a79118 pthread_kill + 268 (pthread.c:1670)
7   libsystem_c.dylib             	0x000000018fc93178 abort + 180 (abort.c:118)
8   TTB.Maui                      	0x000000010eef028c 0x104b74000 + 171426444
9   TTB.Maui                      	0x000000010f2425c0 0x104b74000 + 174908864
10  TTB.Maui                      	0x000000010f242678 0x104b74000 + 174909048
11  TTB.Maui                      	0x000000010f2426bc 0x104b74000 + 174909116
12  TTB.Maui                      	0x000000010f1ecb68 0x104b74000 + 174558056
13  TTB.Maui                      	0x000000010f1ecfb0 0x104b74000 + 174559152
14  TTB.Maui                      	0x000000010f1ecd80 0x104b74000 + 174558592
15  TTB.Maui                      	0x000000010608a708 0x104b74000 + 22112008
16  TTB.Maui                      	0x000000010e49e80c 0x104b74000 + 160606220
17  TTB.Maui                      	0x000000010eeefb44 0x104b74000 + 171424580
18  TTB.Maui                      	0x000000010eeeffe0 0x104b74000 + 171425760
19  TTB.Maui                      	0x000000010f24a4a8 0x104b74000 + 174941352
20  TTB.Maui                      	0x000000010f24a138 0x104b74000 + 174940472
21  UIKitCore                     	0x000000018ab2b76c -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 180 (UIApplication.m:2526)
22  UIKitCore                     	0x000000018ab2af1c -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 2848 (UIApplication.m:2968)
23  UIKitCore                     	0x000000018ab29ef8 -[UIApplication _runWithMainScene:transitionContext:completion:] + 856 (UIApplication.m:4782)
24  UIKitCore                     	0x000000018ab29b44 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 132 (_UISceneLifecycleMultiplexer.m:451)
25  UIKitCore                     	0x000000018a871df4 _UIScenePerformActionsWithLifecycleActionMask + 112 (_UISceneLifecycleState.m:109)
26  UIKitCore                     	0x000000018abaffe0 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 216 (_UISceneLifecycleMultiplexer.m:567)
27  UIKitCore                     	0x000000018aa623ec -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 220 (_UISceneLifecycleMultiplexer.m:516)
28  UIKitCore                     	0x000000018aa62214 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 620 (_UISceneLifecycleMultiplexer.m:566)
29  UIKitCore                     	0x000000018aa61dc4 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 252 (_UISceneLifecycleMultiplexer.m:469)
30  UIKitCore                     	0x000000018aa61c90 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block... + 148 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:73)
31  UIKitCore                     	0x000000018b14ef50 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 736 (BSAnimationSettings+UIKit.m:54)
32  UIKitCore                     	0x000000018b1ed49c _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 224 (_UISceneSettingsDiffAction.m:27)
33  UIKitCore                     	0x000000018a90f400 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 316 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:58)
34  UIKitCore                     	0x000000018ad808e0 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.223 + 556 (UIScene.m:2007)
35  UIKitCore                     	0x000000018a9e03f0 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 216 (UIScene.m:1683)
36  UIKitCore                     	0x000000018a9e0260 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 244 (UIScene.m:1969)
37  UIKitCore                     	0x000000018a9df7b8 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 520 (UIApplication.m:4231)
38  UIKitCore                     	0x000000018a9df544 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 288 (UIApplicationSceneClientAgent.m:47)
39  FrontBoardServices            	0x000000019e7ad220 -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 344 (FBSScene.m:440)
40  FrontBoardServices            	0x000000019e7ecfe0 __92-[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:]_block_invoke.80 + 120 (FBSWorkspaceScenesClient.m:394)
41  FrontBoardServices            	0x000000019e7b105c -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168 (FBSWorkspace.m:359)
42  FrontBoardServices            	0x000000019e7ecc38 __92-[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:]_block_invoke + 360 (FBSWorkspaceScenesClient.m:393)
43  libdispatch.dylib             	0x000000018fc32eac _dispatch_client_callout + 20 (object.m:560)
44  libdispatch.dylib             	0x000000018fc3691c _dispatch_block_invoke_direct + 264 (queue.c:496)
45  FrontBoardServices            	0x000000019e7bb188 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52 (FBSSerialQueue.m:157)
46  FrontBoardServices            	0x000000019e7bad24 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220 (FBSSerialQueue.m:181)
47  FrontBoardServices            	0x000000019e7bd5d0 -[FBSSerialQueue _performNextFromRunLoopSource] + 28 (FBSSerialQueue.m:194)
48  CoreFoundation                	0x000000018883a128 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1957)
49  CoreFoundation                	0x00000001888467b4 __CFRunLoopDoSource0 + 176 (CFRunLoop.c:2001)
50  CoreFoundation                	0x00000001887cb648 __CFRunLoopDoSources0 + 340 (CFRunLoop.c:2046)
51  CoreFoundation                	0x00000001887e10d4 __CFRunLoopRun + 828 (CFRunLoop.c:2953)
52  CoreFoundation                	0x00000001887e63ec CFRunLoopRunSpecific + 612 (CFRunLoop.c:3418)
53  GraphicsServices              	0x00000001c337b35c GSEventRunModal + 164 (GSEvent.c:2196)
54  UIKitCore                     	0x000000018ab736e8 -[UIApplication _run] + 888 (UIApplication.m:3782)
55  UIKitCore                     	0x000000018ab7334c UIApplicationMain + 340 (UIApplication.m:5372)
56  TTB.Maui                      	0x000000010eee5180 0x104b74000 + 171381120
57  TTB.Maui                      	0x0000000106267e30 0x104b74000 + 24067632
58  TTB.Maui                      	0x000000010e770a04 0x104b74000 + 163564036
59  TTB.Maui                      	0x000000010f1d048c 0x104b74000 + 174441612
60  TTB.Maui                      	0x000000010f10e1fc 0x104b74000 + 173646332
61  TTB.Maui                      	0x000000010f115e0c 0x104b74000 + 173678092
62  TTB.Maui                      	0x000000010f1d6474 0x104b74000 + 174466164
63  TTB.Maui                      	0x000000010eef9524 0x104b74000 + 171463972
64  TTB.Maui                      	0x000000010f2499c8 0x104b74000 + 174938568
65  dyld                          	0x00000001a7caedec start + 2220 (dyldMain.cpp:1165)

Thread 1:
0   libsystem_pthread.dylib       	0x00000001e7a72b74 start_wqthread + 0 (:-1)

Thread 2 name:
Thread 2:
0   libsystem_kernel.dylib        	0x00000001c6da5558 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001e7a7a078 _pthread_cond_wait + 1232 (pthread_cond.c:862)
2   TTB.Maui                      	0x000000010f1c08fc 0x104b74000 + 174377212
3   libsystem_pthread.dylib       	0x00000001e7a736b8 _pthread_start + 148 (pthread.c:893)
4   libsystem_pthread.dylib       	0x00000001e7a72b88 thread_start + 8 (:-1)

Thread 3 name:
Thread 3:
0   libsystem_kernel.dylib        	0x00000001c6da4c00 semaphore_wait_trap + 8 (:-1)
1   TTB.Maui                      	0x000000010f14cf98 0x104b74000 + 173903768
2   TTB.Maui                      	0x000000010f127c58 0x104b74000 + 173751384
3   TTB.Maui                      	0x000000010f127ae0 0x104b74000 + 173751008
4   libsystem_pthread.dylib       	0x00000001e7a736b8 _pthread_start + 148 (pthread.c:893)
5   libsystem_pthread.dylib       	0x00000001e7a72b88 thread_start + 8 (:-1)

Thread 4 name:
Thread 4:
0   libsystem_kernel.dylib        	0x00000001c6da57bc __ulock_wait + 8 (:-1)
1   libdispatch.dylib             	0x000000018fc3389c _dlock_wait + 56 (lock.c:326)
2   libdispatch.dylib             	0x000000018fc33650 _dispatch_thread_event_wait_slow + 56 (lock.c:558)
3   libdispatch.dylib             	0x000000018fc42714 __DISPATCH_WAIT_FOR_QUEUE__ + 368 (queue.c:1683)
4   libdispatch.dylib             	0x000000018fc422c0 _dispatch_sync_f_slow + 148 (queue.c:1769)
5   UIKitCore                     	0x000000018ab739bc __37-[_UIRemoteKeyboards startConnection]_block_invoke_3 + 156 (_UIRemoteKeyboards.m:1140)
6   CoreFoundation                	0x00000001887d9c04 __invoking___ + 148 (:-1)
7   CoreFoundation                	0x0000000188787cb4 -[NSInvocation invoke] + 428 (NSForwarding.m:3377)
8   Foundation                    	0x0000000182b42718 __NSXPCCONNECTION_IS_CALLING_OUT_TO_REPLY_BLOCK__ + 16 (NSXPCConnection.m:170)
9   Foundation                    	0x0000000182b13a7c -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:] + 520 (NSXPCConnection.m:316)
10  Foundation                    	0x0000000183084a00 __88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_5 + 188 (NSXPCConnection.m:1662)
11  libxpc.dylib                  	0x00000001e7ad2ee4 _xpc_connection_reply_callout + 124 (serializer.c:119)
12  libxpc.dylib                  	0x00000001e7ac5ee8 _xpc_connection_call_reply_async + 88 (connection.c:891)
13  libdispatch.dylib             	0x000000018fc32f2c _dispatch_client_callout3 + 20 (object.m:586)
14  libdispatch.dylib             	0x000000018fc50e38 _dispatch_mach_msg_async_reply_invoke + 344 (mach.c:3102)
15  libdispatch.dylib             	0x000000018fc3a40c _dispatch_lane_serial_drain + 372 (queue.c:3885)
16  libdispatch.dylib             	0x000000018fc3b0d8 _dispatch_lane_invoke + 436 (queue.c:3976)
17  libdispatch.dylib             	0x000000018fc45cdc _dispatch_workloop_worker_thread + 648 (queue.c:6507)
18  libsystem_pthread.dylib       	0x00000001e7a72ddc _pthread_wqthread + 288 (pthread.c:2618)
19  libsystem_pthread.dylib       	0x00000001e7a72b7c start_wqthread + 8 (:-1)

Thread 5:
0   libsystem_pthread.dylib       	0x00000001e7a72b74 start_wqthread + 0 (:-1)

Thread 6:
0   libsystem_pthread.dylib       	0x00000001e7a72b74 start_wqthread + 0 (:-1)

Thread 7:
0   libsystem_pthread.dylib       	0x00000001e7a72b74 start_wqthread + 0 (:-1)

Thread 8 name:
Thread 8:
0   libsystem_kernel.dylib        	0x00000001c6da4c84 mach_msg2_trap + 8 (:-1)
1   libsystem_kernel.dylib        	0x00000001c6db7b54 mach_msg2_internal + 80 (mach_msg.c:201)
2   libsystem_kernel.dylib        	0x00000001c6db7e2c mach_msg_overwrite + 540 (mach_msg.c:0)
3   libsystem_kernel.dylib        	0x00000001c6da51c8 mach_msg + 24 (mach_msg.c:323)
4   CoreFoundation                	0x00000001887e0024 __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2622)
5   CoreFoundation                	0x00000001887e1250 __CFRunLoopRun + 1208 (CFRunLoop.c:3005)
6   CoreFoundation                	0x00000001887e63ec CFRunLoopRunSpecific + 612 (CFRunLoop.c:3418)
7   Foundation                    	0x0000000182ae2fd4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (NSRunLoop.m:373)
8   Foundation                    	0x0000000182ae2ebc -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 (NSRunLoop.m:420)
9   UIKitCore                     	0x000000018aca63fc -[UIEventFetcher threadMain] + 416 (UIEventFetcher.m:1376)
10  Foundation                    	0x0000000182afc544 __NSThread__start__ + 716 (NSThread.m:963)
11  libsystem_pthread.dylib       	0x00000001e7a736b8 _pthread_start + 148 (pthread.c:893)
12  libsystem_pthread.dylib       	0x00000001e7a72b88 thread_start + 8 (:-1)

Thread 9:
0   libsystem_pthread.dylib       	0x00000001e7a72b74 start_wqthread + 0 (:-1)

Thread 10:
0   libsystem_pthread.dylib       	0x00000001e7a72b74 start_wqthread + 0 (:-1)


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0xffffffffa46a412f   x5: 0x0000000000000018   x6: 0x000000016b287a90   x7: 0x000000016b287180
    x8: 0x4763dece0f8e6916   x9: 0x4763decfd1796a96  x10: 0x0000000000000200  x11: 0x000000016b2871f0
   x12: 0x0000000000000000  x13: 0x000000010573b010  x14: 0x00000000000000a8  x15: 0x000000010f33dd77
   x16: 0x0000000000000148  x17: 0x00000001def70380  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000000103  x21: 0x00000001def70460  x22: 0x00000002808f27c0  x23: 0x00000002808f27c8
   x24: 0x0000000111c1ba68  x25: 0x0000000106ae167c  x26: 0x0000000112019400  x27: 0x000000002b870064
   x28: 0x000000011200ee00   fp: 0x000000016b287aa0   lr: 0x00000001e7a79118
    sp: 0x000000016b287a80   pc: 0x00000001c6dab558 cpsr: 0x40001000
   esr: 0x56000080  Address size fault


Binary Images:
        0x104b74000 -         0x10f95bfff TTB.Maui arm64  <c26a831508453b439643d1fcdc1df76b> /private/var/containers/Bundle/Application/CB03E599-92D8-4DC5-B310-443903C949BB/TTB.Maui.app/TTB.Maui
        0x110980000 -         0x110ab3fff libHarfBuzzSharp arm64  <9963a21c847c33409c756a1056a8a6b3> /private/var/containers/Bundle/Application/CB03E599-92D8-4DC5-B310-443903C949BB/TTB.Maui.app/Frameworks/libHarfBuzzSharp.framework/libHarfBuzzSharp
        0x1110d8000 -         0x111667fff libSkiaSharp arm64  <a3389983874b3be0b7deeeb8a1de8bcb> /private/var/containers/Bundle/Application/CB03E599-92D8-4DC5-B310-443903C949BB/TTB.Maui.app/Frameworks/libSkiaSharp.framework/libSkiaSharp
        0x11763c000 -         0x117647fff libobjc-trampolines.dylib arm64e  <695a8449aae838b6851cced0b1176f03> /private/preboot/Cryptexes/OS/usr/lib/libobjc-trampolines.dylib
        0x182aa1000 -         0x18337efff Foundation arm64e  <6e76dc9611af3b2eb71e215f9cc6e822> /System/Library/Frameworks/Foundation.framework/Foundation
        0x188767000 -         0x188b4efff CoreFoundation arm64e  <4230c12242e8383bbeecee7b61f8bb61> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
        0x18a7d6000 -         0x18bffafff UIKitCore arm64e  <b3834960244b34e49ea0ca4bb44ef0f3> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
        0x18fc2f000 -         0x18fc75fff libdispatch.dylib arm64e  <bb347f0ef21c360782e6c8d750fdbf8c> /usr/lib/system/libdispatch.dylib
        0x18fc76000 -         0x18fcf3ff3 libsystem_c.dylib arm64e  <3548f8ee7a073b678d699c7d42096513> /usr/lib/system/libsystem_c.dylib
        0x19e7aa000 -         0x19e851fff FrontBoardServices arm64e  <11a9f887776b31e985578a24a587dd1b> /System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices
        0x1a7c99000 -         0x1a7d1ea23 dyld arm64e  <6987370ac3853135a27f6731706bcbd8> /usr/lib/dyld
        0x1c337a000 -         0x1c3382fff GraphicsServices arm64e  <e830ad84d6123b6b8de7ea61a786d132> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
        0x1c6da4000 -         0x1c6ddbff7 libsystem_kernel.dylib arm64e  <75da6452934e3f80b181d47074378e83> /usr/lib/system/libsystem_kernel.dylib
        0x1e79db000 -         0x1e79e1ff7 libsystem_platform.dylib arm64e  <ad4b465ff4d23fafa9f8b112cb0c63d6> /usr/lib/system/libsystem_platform.dylib
        0x1e7a72000 -         0x1e7a7dff3 libsystem_pthread.dylib arm64e  <56698309210a313797d414e4604b1117> /usr/lib/system/libsystem_pthread.dylib
        0x1e7ab5000 -         0x1e7af6fff libxpc.dylib arm64e  <e999664a486837668787f501fde376e3> /usr/lib/system/libxpc.dylib

EOF
@jeryllei jeryllei added the t/bug Something isn't working label Oct 30, 2023
@jeryllei
Copy link
Author

Enabling mono interpreter in release mode fixes the issue.

<PropertyGroup Condition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Release'">
    <UseInterpreter>true</UseInterpreter>
</PropertyGroup>

@ghost ghost locked as resolved and limited conversation to collaborators Nov 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants