Dotnet Maui iOS app occasionally crashes on TestFlight on some devices

MT 10 Reputation points
2024-07-24T16:32:53.43+00:00

The MAUI app works fine on Android and most iOS devices, but a few users have reported that it crashes immediately after launch. However, I couldn't reproduce the error in my local environment.

It is built with the latest:

Xcode: 15.4

.Net 8.0.7

MAUI 8.0.70

Tested on Simulators/physical devices with 17.5.1, 17.4, 17.2 without issues

However, I do see crashes on the user's device through TestFlight. Here is a portion of the crash log. I do not fully understand the error message and would appreciate any help.

Exception Type:  EXC_CRASH (SIGABRT)

Exception Codes: 0x0000000000000000, 0x0000000000000000

Termination Reason: SIGNAL 6 Abort trap: 6

Terminating Process: AppName [12874]

Triggered by Thread:  0

Kernel Triage:

VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter

VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter

VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter

VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter

VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter

Thread 0 name:

Thread 0 name:

Thread 0 Crashed:

0   libsystem_kernel.dylib        	0x00000001da7a742c __pthread_kill + 8 (:-1)

1   libsystem_pthread.dylib       	0x00000001ee546c0c pthread_kill + 268 (pthread.c:1721)

2   libsystem_c.dylib             	0x000000019964aba0 abort + 180 (abort.c:118)

3   AppName                      	0x00000001029e7a98 0x1026b4000 + 3357336

4   AppName                      	0x00000001029598f0 0x1026b4000 + 2775280

5   libsystem_platform.dylib      	0x00000001ee48ae9c _sigtramp + 56 (sigtramp.c:116)

6   libsystem_pthread.dylib       	0x00000001ee546c0c pthread_kill + 268 (pthread.c:1721)

7   libsystem_c.dylib             	0x000000019964aba0 abort + 180 (abort.c:118)

8   AppName                      	0x00000001026e3a80 0x1026b4000 + 195200

9   AppName                      	0x00000001028955a0 0x1026b4000 + 1971616

10  AppName                      	0x000000010293008c 0x1026b4000 + 2605196

11  AppName                      	0x00000001026ec0a4 0x1026b4000 + 229540

12  AppName                      	0x00000001029981c0 0x1026b4000 + 3031488

13  dyld                          	0x00000001b4d6de4c start + 2240 (dyldMain.cpp:1298)

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0xffffffff9532841b   x5: 0x0000000000000018   x6: 0x000000016d74ad50   x7: 0x000000016d74a440
    x8: 0x8f0f7a9f1b3b9fcb   x9: 0x8f0f7a9ee905a10b  x10: 0x0000000000000200  x11: 0x000000016d74a4b0
   x12: 0x0000000000000000  x13: 0x00000001026e0d04  x14: 0x0000000000000010  x15: 0x0000000000000000
   x16: 0x0000000000000148  x17: 0x00000001f23e3ec0  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000000103  x21: 0x00000001f23e3fa0  x22: 0x0000000103957200  x23: 0x0000000000000001
   x24: 0x00000003034c8870  x25: 0x0000000000000000  x26: 0x0000000000000000  x27: 0x000000016d74bc65
   x28: 0x00000003022c8120   fp: 0x000000016d74ad60   lr: 0x00000001ee546c0c
    sp: 0x000000016d74ad40   pc: 0x00000001da7a742c cpsr: 0x40001000
   esr: 0x56000080  Address size fault


.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,607 questions
{count} vote

3 answers

Sort by: Most helpful
  1. MT 10 Reputation points
    2024-08-01T15:04:21.3633333+00:00

    It's a timmer issue in my case. It works fine in release mode with None settings

    <MtouchLink>None</MtouchLink>
    
    1 person found this answer helpful.

  2. Bruce (SqlWork.com) 66,866 Reputation points
    2024-07-24T21:40:22.97+00:00

    the exception type EXC_CRASH (SIGABRT) means the program triggered an abort. that means the .net code threw an uncaught exception. you probably need to add better exception handling and logging. it is probably your init code.

    0 comments No comments

  3. Richard Dufour 10 Reputation points
    2024-08-01T14:57:16.2433333+00:00

    What "fixed" it for me was to use this in project:

    <PropertyGroup>

    <MtouchInterpreter>all</MtouchInterpreter>

    <UseInterpreter>True</UseInterpreter>

    </PropertyGroup>


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.