maui
maui copied to clipboard
Startup project crashes after splashscreen on iPadOS and .NET8.0 in release mode
Description
I want to point out the the bug reported in #19522 ist still occuring. Please reopen that issue and investigate. To my understanding it is not possible to get a working iOS release build of the Hello World .NET Maui app or any other .NET 8 Maui app. How shall I investigate the error in my app if even the offical template crashes?
Steps to Reproduce
- Start Visual Studio 2022 - Create a new project
- Select template .NET MAUI App
- Leave all defaults, ensure .NET 8.0 is selected.
- Pair to a mac
- Connect an iPhone or iPad to the local machine
- Build and run the app in relase mode on the iPhone/iPad
Link to public reproduction project repository
No response
Version with bug
8.0.20 SR4
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
7.0.96
Affected platforms
iOS
Affected platform versions
iOS 17 Visual Studio 17.9.6
Did you find any workaround?
Using .NET7, but is not feasable for my project, as it uses .NET 8 features and I would need to change the implementation
Relevant log output
This crash log is from my app, not from the hello world app, as the only log I could get was from a test flight release crash report:
Date/Time: 2024-04-17 18:53:24.5320 +0200
Launch Time: 2024-04-17 18:53:23.8005 +0200
OS Version: iPhone OS 17.4.1 (21E236)
Release Type: User
Baseband Version: 6.00.00
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: MauiApp1 [670]
Triggered by Thread: 0
Thread 0 name:
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001ef2c2974 __pthread_kill + 8 (:-1)
1 libsystem_pthread.dylib 0x0000000202d010ec pthread_kill + 268 (pthread.c:1717)
2 libsystem_c.dylib 0x00000001aed7bb80 abort + 180 (abort.c:118)
3 MauiApp1 0x000000010265bbfc 0x100d34000 + 26377212
4 MauiApp1 0x00000001025e48b8 0x100d34000 + 25888952
5 libsystem_platform.dylib 0x0000000202c4b834 _sigtramp + 56 (sigtramp.c:116)
6 libsystem_pthread.dylib 0x0000000202d010ec pthread_kill + 268 (pthread.c:1717)
7 libsystem_c.dylib 0x00000001aed7bb80 abort + 180 (abort.c:118)
8 MauiApp1 0x000000010231fd88 0x100d34000 + 22986120
9 MauiApp1 0x000000010231ffc8 0x100d34000 + 22986696
10 MauiApp1 0x0000000102623304 0x100d34000 + 26145540
11 MauiApp1 0x0000000102328a4c 0x100d34000 + 23022156
12 MauiApp1 0x0000000102623464 0x100d34000 + 26145892
13 dyld 0x00000001ca31ad84 start + 2240 (dyldMain.cpp:1298)
Thread 1:
0 libsystem_pthread.dylib 0x0000000202cfcfb8 start_wqthread + 0 (:-1)
Thread 2 name:
Thread 2:
0 libsystem_kernel.dylib 0x00000001ef2ba49c __psynch_cvwait + 8 (:-1)
1 libsystem_pthread.dylib 0x0000000202cfc590 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2 MauiApp1 0x00000001024f50c0 0x100d34000 + 24907968
3 libsystem_pthread.dylib 0x0000000202cfda90 _pthread_start + 136 (pthread.c:927)
4 libsystem_pthread.dylib 0x0000000202cfcfcc thread_start + 8 (:-1)
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0xffffffff936fce02 x5: 0x0000000000000008 x6: 0x000000016f0caa60 x7: 0x000000016f0ca150
x8: 0x4172866b383afc7c x9: 0x417286693010437c x10: 0x0000000000000200 x11: 0x000000016f0ca1c0
x12: 0x0000000000000000 x13: 0x0000000101d05c08 x14: 0x0000000000000010 x15: 0x0000000000000000
x16: 0x0000000000000148 x17: 0x00000002082abf00 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000000000103 x21: 0x00000002082abfe0 x22: 0x000000016f0cb7c0 x23: 0x0000000000000001
x24: 0x000000010279d6ae x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x000000016f0cbc8b
x28: 0x0000000302cb84e0 fp: 0x000000016f0caa70 lr: 0x0000000202d010ec
sp: 0x000000016f0caa50 pc: 0x00000001ef2c2974 cpsr: 0x40000000
esr: 0x56000080 Address size fault
Binary Images:
0x100d34000 - 0x1027f3fff MauiApp1 arm64 <8e163af0d9f33791b7356e41ee55ca0c> /private/var/containers/Bundle/Application/97977409-AABA-4150-AA17-5827991681E5/MauiApp1.app/MauiApp1
0x10397c000 - 0x103edffff libSkiaSharp arm64 <649ef09dce4e3167a06b4c7ae3801717> /private/var/containers/Bundle/Application/97977409-AABA-4150-AA17-5827991681E5/MauiApp1.app/Frameworks/libSkiaSharp.framework/libSkiaSharp
0x1aed06000 - 0x1aed83fff libsystem_c.dylib arm64e <3b5201c515d0335fa91d0c63e1f6c6dc> /usr/lib/system/libsystem_c.dylib
0x1ca315000 - 0x1ca3a1be3 dyld arm64e <7be2b7573b3d3e918cb774f3887660c7> /usr/lib/dyld
0x1ef2b8000 - 0x1ef2f1fef libsystem_kernel.dylib arm64e <db493af363b132209dd8dd4f86bddfc8> /usr/lib/system/libsystem_kernel.dylib
0x202c46000 - 0x202c4cfeb libsystem_platform.dylib arm64e <e29c0ee481183a92bff81c343f8885ad> /usr/lib/system/libsystem_platform.dylib
0x202cfb000 - 0x202d07fff libsystem_pthread.dylib arm64e <a70c0def058c3cb09ec1453aa7f39df9> /usr/lib/system/libsystem_pthread.dylib
Verified this issue with Visual Studio17.10.0 Preview4(8.0.20 & 8.0.14), can repro on iOS local device and not repro on remote device, local device ,it can only deploy apps that use the debug build configuration, please refer ro https://learn.microsoft.com/en-us/dotnet/maui/ios/hot-restart?view=net-maui-8.0
Indeed, when building and running in relased mode to a connected ios remote device, the app starts. However I tried to upload this build to testflight and after downloading the app from there it again crashed with the same log as I put above. So I still am not able to publish a working version to app store.
I also see this on both iphone and iPad 12.5.7, but my app works on iPhone6 iOS 15.8.2. Is this only iOS 12?
This did not help me (but I learned my problem is not related -- see below)....
<PropertyGroup Condition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Release'">
<UseInterpreter>true</UseInterpreter>
</PropertyGroup>
Nevermind. My Maui apps are all working on all iOS versions. Live in the app store too. I was calling
StoreKit.SKAdNetwork.UpdatePostback(0, _ => { });
which isn't supported before iOS 15.4