sentry-dotnet
sentry-dotnet copied to clipboard
iOS app crash when use AttachScreenshot=true
Package
Sentry.Maui
.NET Flavor
Other
.NET Version
8.0.403
OS
iOS
SDK Version
4.13.-
Self-Hosted Sentry Version
No response
Steps to Reproduce
We have error report in Sentry that saying Application Specific Information: UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={810, 1080}, scale=2.000000, bitmapInfo=0x2002. Use UIGraphicsImageRenderer to avoid this assert. when we look at the thread that cause it also contain stack trace saying Sentry_Maui_Sentry_Maui_Internal_ScreenshotAttachmentContent__c__GetStreamb__2_1. I am not really sure actually if this is caused by Sentry or not but we do attach the attachment on sentry so it might be the cause. Here I also attach the crash report dbc983a62a9a4fb7bdef3f940462a18d-symbolicated.crash.zip
Expected Result
App should not crash or throwing exception
Actual Result
App throwing exception
Solution
The root cause is a problem with the MAUI ScreenshotImplementation class. Ideally this would be addressed in the MAUI repo then:
- https://github.com/dotnet/maui/pull/28682
For the time being, we've wrapped our usage of this API in a try..catch/log block. In these instances, no screenshot will be captured but at least the application won't crash.
- https://github.com/getsentry/sentry-dotnet/pull/4069
@albilaga are you able to reproduce this issue? If so, you could try setting options.AttachScreenshot = false when initialising Sentry to see if this has any impact? That would help narrow don't whether it might be a Sentry issue or not.
@jamescrosswell unfortunately not but we are setting the AttachScreenshot = false now and will monitoring for next release of our app
Hi @jamescrosswell after setting AttachScreenshot = false we don't see this error anymore so it might be related
@jamescrosswell that option just forwards to native code, right? If so, it may be worth moving the issue to sentry-cocoa.
My two cents: it may be due to memory pressure so the device is unable to allocate desired screenshot size.
The stack trace from the zip file:
OS Version: iOS 18.1.1 (22B91)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Crashed Thread: 0
Application Specific Information:
UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={810, 1080}, scale=2.000000, bitmapInfo=0x2002. Use UIGraphicsImageRenderer to avoid this assert.
Thread 0 Crashed:
0 CoreFoundation 0x31af427cc __exceptionPreprocess
1 libobjc.A.dylib 0x3155532e0 objc_exception_throw
2 Foundation 0x318f55a74 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
3 UIKitCore 0x31ff37558 _UIGraphicsBeginImageContextWithOptions
4 App.iOS 0x205776dd4 wrapper_managed_to_native_UIKit_UIGraphics_BeginImageContextWithOptions_CoreGraphics_CGSize_byte_System_Runtime_InteropServices_NFloat
5 App.iOS 0x209b0f03c Microsoft_iOS_UIKit_UIGraphics_BeginImageContextWithOptions_CoreGraphics_CGSize_bool_System_Runtime_InteropServices_NFloat (UIGraphics.cs:92)
6 App.iOS 0x207b4ce58 Sentry_Maui_Sentry_Maui_Internal_ScreenshotAttachmentContent__c__GetStreamb__2_1
7 App.iOS 0x20568e960 System_Runtime_CompilerServices_AsyncMethodBuilderCore_Start_TStateMachine_GSHAREDVT_TStateMachine_GSHAREDVT_
8 App.iOS 0x205710d78 gsharedvt_trampoline
9 App.iOS 0x2057113f8 gsharedvt_out_trampoline
10 App.iOS 0x205691890 System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Start_TStateMachine_GSHAREDVT_TStateMachine_GSHAREDVT_
11 App.iOS 0x204c7d544 Microsoft_Maui_ApplicationModel_MainThread__c__DisplayClass6_0_1_T_REF__InvokeOnMainThreadAsyncb__0
12 App.iOS 0x209aaa778 Microsoft_iOS_Foundation_NSAsyncActionDispatcher_Apply (NSAction.cs:153)
13 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
14 App.iOS 0x209e9322c [inlined] do_runtime_invoke (object.c:2576)
15 App.iOS 0x209e9322c mono_runtime_try_invoke (object.c:2733)
16 App.iOS 0x209e9627c mono_runtime_invoke (object.c:2659)
17 App.iOS 0x209f759b0 native_to_managed_trampoline_21 (registrar.mm:1387)
18 App.iOS 0x209fbaee0 -[__MonoMac_NSAsyncActionDispatcher xamarinApplySelector] (registrar.mm:31399)
19 Foundation 0x3187ede4c __NSThreadPerformPerform
20 CoreFoundation 0x31af16324 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
21 CoreFoundation 0x31af162b8 __CFRunLoopDoSource0
22 CoreFoundation 0x31af13dbc __CFRunLoopDoSources0
23 CoreFoundation 0x31af12fb8 __CFRunLoopRun
24 CoreFoundation 0x31af1282c CFRunLoopRunSpecific
25 GraphicsServices 0x3b2f231c0 GSEventRunModal
26 UIKitCore 0x32025eeac -[UIApplication _run]
27 UIKitCore 0x32030d5b0 UIApplicationMain
28 App.iOS 0x209bdd0a4 xamarin_UIApplicationMain (bindings.m:126)
29 App.iOS 0x205776aac wrapper_managed_to_native_UIKit_UIApplication_xamarin_UIApplicationMain_int_intptr_intptr_intptr_intptr_
30 App.iOS 0x209afcec0 Microsoft_iOS_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr (UIApplication.cs:61)
31 App.iOS 0x206574300 App_iOS_App_iOS_Application_Main_string__ (Main.cs:14)
32 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
33 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
34 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
35 App.iOS 0x209e9978c [inlined] do_exec_main_checked
36 App.iOS 0x209e9978c mono_runtime_exec_main_checked (object.c:4775)
37 App.iOS 0x209efcd14 [inlined] mono_jit_exec_internal (driver.c:1369)
38 App.iOS 0x209efcd14 mono_jit_exec (driver.c:1314)
39 App.iOS 0x209bf12e8 xamarin_main (monotouch-main.m:495)
40 App.iOS 0x209f6fa08 main (main.arm64.mm:494)
41 <unknown> 0x1bdb3eec8 <redacted>
Thread 0 name: tid_103 Crashed:
0 CoreFoundation 0x31af427cc __exceptionPreprocess
1 libobjc.A.dylib 0x3155532e0 objc_exception_throw
2 Foundation 0x318f55a74 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
3 UIKitCore 0x31ff37558 _UIGraphicsBeginImageContextWithOptions
4 App.iOS 0x205776dd4 wrapper_managed_to_native_UIKit_UIGraphics_BeginImageContextWithOptions_CoreGraphics_CGSize_byte_System_Runtime_InteropServices_NFloat
5 App.iOS 0x209b0f03c Microsoft_iOS_UIKit_UIGraphics_BeginImageContextWithOptions_CoreGraphics_CGSize_bool_System_Runtime_InteropServices_NFloat (UIGraphics.cs:92)
6 App.iOS 0x207b4ce58 Sentry_Maui_Sentry_Maui_Internal_ScreenshotAttachmentContent__c__GetStreamb__2_1
7 App.iOS 0x20568e960 System_Runtime_CompilerServices_AsyncMethodBuilderCore_Start_TStateMachine_GSHAREDVT_TStateMachine_GSHAREDVT_
8 App.iOS 0x205710d78 gsharedvt_trampoline
9 App.iOS 0x2057113f8 gsharedvt_out_trampoline
10 App.iOS 0x205691890 System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Start_TStateMachine_GSHAREDVT_TStateMachine_GSHAREDVT_
11 App.iOS 0x204c7d544 Microsoft_Maui_ApplicationModel_MainThread__c__DisplayClass6_0_1_T_REF__InvokeOnMainThreadAsyncb__0
12 App.iOS 0x209aaa778 Microsoft_iOS_Foundation_NSAsyncActionDispatcher_Apply (NSAction.cs:153)
13 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
14 App.iOS 0x209e9322c [inlined] do_runtime_invoke (object.c:2576)
15 App.iOS 0x209e9322c mono_runtime_try_invoke (object.c:2733)
16 App.iOS 0x209e9627c mono_runtime_invoke (object.c:2659)
17 App.iOS 0x209f759b0 native_to_managed_trampoline_21 (registrar.mm:1387)
18 App.iOS 0x209fbaee0 -[__MonoMac_NSAsyncActionDispatcher xamarinApplySelector] (registrar.mm:31399)
19 Foundation 0x3187ede4c __NSThreadPerformPerform
20 CoreFoundation 0x31af16324 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
21 CoreFoundation 0x31af162b8 __CFRunLoopDoSource0
22 CoreFoundation 0x31af13dbc __CFRunLoopDoSources0
23 CoreFoundation 0x31af12fb8 __CFRunLoopRun
24 CoreFoundation 0x31af1282c CFRunLoopRunSpecific
25 GraphicsServices 0x3b2f231c0 GSEventRunModal
26 UIKitCore 0x32025eeac -[UIApplication _run]
27 UIKitCore 0x32030d5b0 UIApplicationMain
28 App.iOS 0x209bdd0a4 xamarin_UIApplicationMain (bindings.m:126)
29 App.iOS 0x205776aac wrapper_managed_to_native_UIKit_UIApplication_xamarin_UIApplicationMain_int_intptr_intptr_intptr_intptr_
30 App.iOS 0x209afcec0 Microsoft_iOS_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr (UIApplication.cs:61)
31 App.iOS 0x206574300 App_iOS_App_iOS_Application_Main_string__ (Main.cs:14)
32 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
33 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
34 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
35 App.iOS 0x209e9978c [inlined] do_exec_main_checked
36 App.iOS 0x209e9978c mono_runtime_exec_main_checked (object.c:4775)
37 App.iOS 0x209efcd14 [inlined] mono_jit_exec_internal (driver.c:1369)
38 App.iOS 0x209efcd14 mono_jit_exec (driver.c:1314)
39 App.iOS 0x209bf12e8 xamarin_main (monotouch-main.m:495)
40 App.iOS 0x209f6fa08 main (main.arm64.mm:494)
41 <unknown> 0x1bdb3eec8 <redacted>
Thread 1 name: SGen worker
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a4c _pthread_cond_wait
2 App.iOS 0x209e1f470 [inlined] mono_os_cond_wait (mono-os-mutex.h:219)
3 App.iOS 0x209e1f470 [inlined] get_work (sgen-thread-pool.c:164)
4 App.iOS 0x209e1f470 thread_func (sgen-thread-pool.c:195)
5 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 2 name: Finalizer
0 libsystem_kernel.dylib 0x3bb6e7604 semaphore_wait_trap
1 App.iOS 0x209ed4878 [inlined] mono_os_sem_wait (mono-os-semaphore.h:85)
2 App.iOS 0x209ed4878 [inlined] mono_coop_sem_wait (mono-coop-semaphore.h:41)
3 App.iOS 0x209ed4878 finalizer_thread (gc.c:891)
4 App.iOS 0x209eacf78 [inlined] start_wrapper_internal (threads.c:1202)
5 App.iOS 0x209eacf78 start_wrapper (threads.c:1271)
6 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 3 name: com.apple.uikit.eventfetch-thread
0 libsystem_kernel.dylib 0x3bb6e7688 mach_msg2_trap
1 libsystem_kernel.dylib 0x3bb6ead94 mach_msg2_internal
2 libsystem_kernel.dylib 0x3bb6eacac mach_msg_overwrite
3 libsystem_kernel.dylib 0x3bb6eaaf8 mach_msg
4 CoreFoundation 0x31af13a80 __CFRunLoopServiceMachPort
5 CoreFoundation 0x31af1312c __CFRunLoopRun
6 CoreFoundation 0x31af1282c CFRunLoopRunSpecific
7 Foundation 0x3187fd4fc -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
8 Foundation 0x3187fd34c -[NSRunLoop(NSRunLoop) runUntilDate:]
9 UIKitCore 0x320272354 -[UIEventFetcher threadMain]
10 Foundation 0x31880e6c4 __NSThread__start__
11 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 4 name: .NET TP Worker
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a4c _pthread_cond_wait
2 App.iOS 0x209dccddc [inlined] mono_os_cond_wait (mono-os-mutex.h:219)
3 App.iOS 0x209dccddc mono_os_cond_timedwait (mono-os-mutex.c:32)
4 App.iOS 0x209eb20cc [inlined] mono_coop_cond_timedwait (mono-coop-mutex.h:103)
5 App.iOS 0x209eb20cc [inlined] mono_w32handle_timedwait_signal_naked (w32handle.c:514)
6 App.iOS 0x209eb20cc mono_w32handle_timedwait_signal_handle (w32handle.c:629)
7 App.iOS 0x209eb1f70 mono_w32handle_wait_one (w32handle.c:728)
8 App.iOS 0x209ed634c [inlined] mono_monitor_wait (monitor.c:1348)
9 App.iOS 0x209ed634c ves_icall_System_Threading_Monitor_Monitor_wait (monitor.c:1427)
10 App.iOS 0x209e61f94 ves_icall_System_Threading_Monitor_Monitor_wait_raw (icall-def.h:595)
11 App.iOS 0x20551ed74 wrapper_managed_to_native_System_Threading_Monitor_Monitor_wait_object_int_bool
12 App.iOS 0x2098ac6e0 corlib_System_Threading_Monitor_ObjWait_int_object
13 App.iOS 0x2051ecb20 System_Collections_Concurrent_BlockingCollection_1_T_REF_TryTakeWithNoTimeValidation_T_REF__int_System_Threading_CancellationToken_System_Threading_CancellationTokenSource (<unknown>:1)
14 App.iOS 0x208c7e318 System_Collections_Concurrent_System_Collections_Concurrent_BlockingCollection_1__GetConsumingEnumerabled__68_T_REF_MoveNext
15 App.iOS 0x20568e960 System_Runtime_CompilerServices_AsyncMethodBuilderCore_Start_TStateMachine_GSHAREDVT_TStateMachine_GSHAREDVT_
16 App.iOS 0x20886bc04 App_App_Notifications_NotificationPayloadManager__c__DisplayClass9_0__StartNotificationPayloadProcessorb__0
17 App.iOS 0x2098e1064 corlib_System_Threading_Tasks_Task_ExecuteEntryUnsafe_System_Threading_Thread
18 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
19 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
20 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
21 App.iOS 0x209ead070 [inlined] start_wrapper_internal (threads.c:1213)
22 App.iOS 0x209ead070 start_wrapper (threads.c:1271)
23 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 5 name: .NET TP Gate
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a78 _pthread_cond_wait
2 App.iOS 0x209c596a0 SystemNative_LowLevelMonitor_TimedWait (pal_threading.c:177)
3 App.iOS 0x2056ed918 wrapper_managed_to_native_Interop_Sys__LowLevelMonitor_TimedWaitg____PInvoke_67_0_intptr_int
4 App.iOS 0x20970cd10 corlib_Interop_Sys_LowLevelMonitor_TimedWait_intptr_int
5 App.iOS 0x2098ad910 corlib_System_Threading_Thread_StartCallback
6 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
7 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
8 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
9 App.iOS 0x209ead070 [inlined] start_wrapper_internal (threads.c:1213)
10 App.iOS 0x209ead070 start_wrapper (threads.c:1271)
11 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 6 name: .NET TP Worker
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a4c _pthread_cond_wait
2 App.iOS 0x209dccddc [inlined] mono_os_cond_wait (mono-os-mutex.h:219)
3 App.iOS 0x209dccddc mono_os_cond_timedwait (mono-os-mutex.c:32)
4 App.iOS 0x209eb20cc [inlined] mono_coop_cond_timedwait (mono-coop-mutex.h:103)
5 App.iOS 0x209eb20cc [inlined] mono_w32handle_timedwait_signal_naked (w32handle.c:514)
6 App.iOS 0x209eb20cc mono_w32handle_timedwait_signal_handle (w32handle.c:629)
7 App.iOS 0x209eb1f70 mono_w32handle_wait_one (w32handle.c:728)
8 App.iOS 0x209ed634c [inlined] mono_monitor_wait (monitor.c:1348)
9 App.iOS 0x209ed634c ves_icall_System_Threading_Monitor_Monitor_wait (monitor.c:1427)
10 App.iOS 0x209e61f94 ves_icall_System_Threading_Monitor_Monitor_wait_raw (icall-def.h:595)
11 App.iOS 0x20551ed74 wrapper_managed_to_native_System_Threading_Monitor_Monitor_wait_object_int_bool
12 App.iOS 0x2098ac6e0 corlib_System_Threading_Monitor_ObjWait_int_object
13 App.iOS 0x2051ecb20 System_Collections_Concurrent_BlockingCollection_1_T_REF_TryTakeWithNoTimeValidation_T_REF__int_System_Threading_CancellationToken_System_Threading_CancellationTokenSource (<unknown>:1)
14 App.iOS 0x208c7e318 System_Collections_Concurrent_System_Collections_Concurrent_BlockingCollection_1__GetConsumingEnumerabled__68_T_REF_MoveNext
15 App.iOS 0x2098e11c8 corlib_System_Threading_Tasks_Task_InnerInvoke
16 App.iOS 0x2098e1064 corlib_System_Threading_Tasks_Task_ExecuteEntryUnsafe_System_Threading_Thread
17 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
18 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
19 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
20 App.iOS 0x209ead070 [inlined] start_wrapper_internal (threads.c:1213)
21 App.iOS 0x209ead070 start_wrapper (threads.c:1271)
22 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 7 name: .NET Long Running Task
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a78 _pthread_cond_wait
2 App.iOS 0x209c596a0 SystemNative_LowLevelMonitor_TimedWait (pal_threading.c:177)
3 App.iOS 0x2056ed918 wrapper_managed_to_native_Interop_Sys__LowLevelMonitor_TimedWaitg____PInvoke_67_0_intptr_int
4 App.iOS 0x20970cd10 corlib_Interop_Sys_LowLevelMonitor_TimedWait_intptr_int
5 App.iOS 0x2098e11c8 corlib_System_Threading_Tasks_Task_InnerInvoke
6 App.iOS 0x2098e1064 corlib_System_Threading_Tasks_Task_ExecuteEntryUnsafe_System_Threading_Thread
7 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
8 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
9 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
10 App.iOS 0x209ead070 [inlined] start_wrapper_internal (threads.c:1213)
11 App.iOS 0x209ead070 start_wrapper (threads.c:1271)
12 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 8 name: .NET Timer
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a78 _pthread_cond_wait
2 App.iOS 0x209c596a0 SystemNative_LowLevelMonitor_TimedWait (pal_threading.c:177)
3 App.iOS 0x2056ed918 wrapper_managed_to_native_Interop_Sys__LowLevelMonitor_TimedWaitg____PInvoke_67_0_intptr_int
4 App.iOS 0x20970cd10 corlib_Interop_Sys_LowLevelMonitor_TimedWait_intptr_int
5 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
6 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
7 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
8 App.iOS 0x209ead070 [inlined] start_wrapper_internal (threads.c:1213)
9 App.iOS 0x209ead070 start_wrapper (threads.c:1271)
10 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 9
0 libsystem_kernel.dylib 0x3bb6ed1b0 __semwait_signal
1 libsystem_c.dylib 0x32aa0ba74 nanosleep
2 libsystem_c.dylib 0x32aa6954c sleep
3 Sentry 0x10b96f900 monitorCachedData
4 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 10 name: SentryCrash Exception Handler (Secondary)
0 libsystem_kernel.dylib 0x3bb6e7688 mach_msg2_trap
1 libsystem_kernel.dylib 0x3bb6ead94 mach_msg2_internal
2 libsystem_kernel.dylib 0x3bb6e8bf8 thread_suspend
3 Sentry 0x10b955d24 handleExceptions
4 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 11 name: SentryCrash Exception Handler (Primary)
0 libsystem_kernel.dylib 0x3bb6e7688 mach_msg2_trap
1 libsystem_kernel.dylib 0x3bb6ead94 mach_msg2_internal
2 libsystem_kernel.dylib 0x3bb6eacac mach_msg_overwrite
3 libsystem_kernel.dylib 0x3bb6eaaf8 mach_msg
4 Sentry 0x10b955d50 handleExceptions
5 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 12 name: io.sentry.app-hang-tracker
0 libsystem_kernel.dylib 0x3bb6ed1b0 __semwait_signal
1 libsystem_c.dylib 0x32aa0ba74 nanosleep
2 Foundation 0x318914af4 +[NSThread sleepForTimeInterval:]
3 Sentry 0x10b935ccc -[SentryANRTracker detectANRs]
4 Foundation 0x31880e6c4 __NSThread__start__
5 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 13 name: .NET TP Worker
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a4c _pthread_cond_wait
2 App.iOS 0x209dccddc [inlined] mono_os_cond_wait (mono-os-mutex.h:219)
3 App.iOS 0x209dccddc mono_os_cond_timedwait (mono-os-mutex.c:32)
4 App.iOS 0x209eb20cc [inlined] mono_coop_cond_timedwait (mono-coop-mutex.h:103)
5 App.iOS 0x209eb20cc [inlined] mono_w32handle_timedwait_signal_naked (w32handle.c:514)
6 App.iOS 0x209eb20cc mono_w32handle_timedwait_signal_handle (w32handle.c:629)
7 App.iOS 0x209eb1f70 mono_w32handle_wait_one (w32handle.c:728)
8 App.iOS 0x209ed634c [inlined] mono_monitor_wait (monitor.c:1348)
9 App.iOS 0x209ed634c ves_icall_System_Threading_Monitor_Monitor_wait (monitor.c:1427)
10 App.iOS 0x209e61f94 ves_icall_System_Threading_Monitor_Monitor_wait_raw (icall-def.h:595)
11 App.iOS 0x20551ed74 wrapper_managed_to_native_System_Threading_Monitor_Monitor_wait_object_int_bool
12 App.iOS 0x2098ac6e0 corlib_System_Threading_Monitor_ObjWait_int_object
13 App.iOS 0x2051ecb20 System_Collections_Concurrent_BlockingCollection_1_T_REF_TryTakeWithNoTimeValidation_T_REF__int_System_Threading_CancellationToken_System_Threading_CancellationTokenSource (<unknown>:1)
14 App.iOS 0x208c7e318 System_Collections_Concurrent_System_Collections_Concurrent_BlockingCollection_1__GetConsumingEnumerabled__68_T_REF_MoveNext
15 App.iOS 0x2089e08ac App_System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_AsyncStateMachineBox_1_System_Threading_Tasks_VoidTaskResult_App_DeferredQueues_DeferredActionQueue__c__DisplayClass8_0___StartProcessingb__0d_ExecutionContextCallback_object
16 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
17 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
18 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
19 App.iOS 0x209ead070 [inlined] start_wrapper_internal (threads.c:1213)
20 App.iOS 0x209ead070 start_wrapper (threads.c:1271)
21 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 14 name: .NET TP Worker
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a4c _pthread_cond_wait
2 App.iOS 0x209dccddc [inlined] mono_os_cond_wait (mono-os-mutex.h:219)
3 App.iOS 0x209dccddc mono_os_cond_timedwait (mono-os-mutex.c:32)
4 App.iOS 0x209eb20cc [inlined] mono_coop_cond_timedwait (mono-coop-mutex.h:103)
5 App.iOS 0x209eb20cc [inlined] mono_w32handle_timedwait_signal_naked (w32handle.c:514)
6 App.iOS 0x209eb20cc mono_w32handle_timedwait_signal_handle (w32handle.c:629)
7 App.iOS 0x209eb1f70 mono_w32handle_wait_one (w32handle.c:728)
8 App.iOS 0x209ed634c [inlined] mono_monitor_wait (monitor.c:1348)
9 App.iOS 0x209ed634c ves_icall_System_Threading_Monitor_Monitor_wait (monitor.c:1427)
10 App.iOS 0x209e61f94 ves_icall_System_Threading_Monitor_Monitor_wait_raw (icall-def.h:595)
11 App.iOS 0x20551ed74 wrapper_managed_to_native_System_Threading_Monitor_Monitor_wait_object_int_bool
12 App.iOS 0x2098ac6e0 corlib_System_Threading_Monitor_ObjWait_int_object
13 App.iOS 0x2051ecb20 System_Collections_Concurrent_BlockingCollection_1_T_REF_TryTakeWithNoTimeValidation_T_REF__int_System_Threading_CancellationToken_System_Threading_CancellationTokenSource (<unknown>:1)
14 App.iOS 0x208c7d740 System_Collections_Concurrent_System_Collections_Concurrent_BlockingCollection_1_T_REF_TryTake_T_REF__int_System_Threading_CancellationToken
15 App.iOS 0x20568e960 System_Runtime_CompilerServices_AsyncMethodBuilderCore_Start_TStateMachine_GSHAREDVT_TStateMachine_GSHAREDVT_
16 App.iOS 0x2065eb294 Akavache_Sqlite3_Akavache_Sqlite3_SqliteOperationQueue__c__DisplayClass18_0__Startb__0
17 App.iOS 0x2098e1064 corlib_System_Threading_Tasks_Task_ExecuteEntryUnsafe_System_Threading_Thread
18 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
19 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
20 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
21 App.iOS 0x209ead070 [inlined] start_wrapper_internal (threads.c:1213)
22 App.iOS 0x209ead070 start_wrapper (threads.c:1271)
23 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 15 name: com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x3bb6e7688 mach_msg2_trap
1 libsystem_kernel.dylib 0x3bb6ead94 mach_msg2_internal
2 libsystem_kernel.dylib 0x3bb6eacac mach_msg_overwrite
3 libsystem_kernel.dylib 0x3bb6eaaf8 mach_msg
4 CoreFoundation 0x31af13a80 __CFRunLoopServiceMachPort
5 CoreFoundation 0x31af1312c __CFRunLoopRun
6 CoreFoundation 0x31af1282c CFRunLoopRunSpecific
7 CFNetwork 0x31d95fedc +[__CFN_CoreSchedulingSetRunnable _run:]
8 Foundation 0x31880e6c4 __NSThread__start__
9 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 16 name: tid_e113
0 libsystem_kernel.dylib 0x3bb6e7410 __workq_kernreturn
1 libsystem_pthread.dylib 0x42b7b6cc4 _pthread_wqthread
Thread 17 name: .NET TP Worker
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a4c _pthread_cond_wait
2 App.iOS 0x209dccdb4 mono_os_cond_timedwait (mono-os-mutex.c:75)
3 App.iOS 0x209dd1718 [inlined] mono_coop_cond_timedwait (mono-coop-mutex.h:103)
4 App.iOS 0x209dd1718 mono_lifo_semaphore_timed_wait (lifo-semaphore.c:56)
5 App.iOS 0x20551fa2c wrapper_managed_to_native_System_Threading_LowLevelLifoSemaphore_TimedWaitInternal_intptr_int
6 App.iOS 0x2098afd14 corlib_System_Threading_LowLevelLifoSemaphore_WaitForSignal_int
7 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
8 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
9 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
10 App.iOS 0x209ead070 [inlined] start_wrapper_internal (threads.c:1213)
11 App.iOS 0x209ead070 start_wrapper (threads.c:1271)
12 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 18 name: .NET TP Worker
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a4c _pthread_cond_wait
2 App.iOS 0x209dccdb4 mono_os_cond_timedwait (mono-os-mutex.c:75)
3 App.iOS 0x209dd1718 [inlined] mono_coop_cond_timedwait (mono-coop-mutex.h:103)
4 App.iOS 0x209dd1718 mono_lifo_semaphore_timed_wait (lifo-semaphore.c:56)
5 App.iOS 0x20551fa2c wrapper_managed_to_native_System_Threading_LowLevelLifoSemaphore_TimedWaitInternal_intptr_int
6 App.iOS 0x2098afd14 corlib_System_Threading_LowLevelLifoSemaphore_WaitForSignal_int
7 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
8 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
9 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
10 App.iOS 0x209ead070 [inlined] start_wrapper_internal (threads.c:1213)
11 App.iOS 0x209ead070 start_wrapper (threads.c:1271)
12 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 19 name: tid_1750b
0 libsystem_pthread.dylib 0x42b7b3480 start_wqthread
Thread 20
0 libsystem_kernel.dylib 0x3bb6e7410 __workq_kernreturn
1 libsystem_pthread.dylib 0x42b7b6cc4 _pthread_wqthread
Thread 21 name: tid_f607
0 libsystem_pthread.dylib 0x42b7b3480 start_wqthread
Thread 22
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a4c _pthread_cond_wait
2 App.iOS 0x209dccddc [inlined] mono_os_cond_wait (mono-os-mutex.h:219)
3 App.iOS 0x209dccddc mono_os_cond_timedwait (mono-os-mutex.c:32)
4 App.iOS 0x209eb20cc [inlined] mono_coop_cond_timedwait (mono-coop-mutex.h:103)
5 App.iOS 0x209eb20cc [inlined] mono_w32handle_timedwait_signal_naked (w32handle.c:514)
6 App.iOS 0x209eb20cc mono_w32handle_timedwait_signal_handle (w32handle.c:629)
7 App.iOS 0x209eb1f70 mono_w32handle_wait_one (w32handle.c:728)
8 App.iOS 0x209ed634c [inlined] mono_monitor_wait (monitor.c:1348)
9 App.iOS 0x209ed634c ves_icall_System_Threading_Monitor_Monitor_wait (monitor.c:1427)
10 App.iOS 0x209e61f94 ves_icall_System_Threading_Monitor_Monitor_wait_raw (icall-def.h:595)
11 App.iOS 0x20551ed74 wrapper_managed_to_native_System_Threading_Monitor_Monitor_wait_object_int_bool
12 App.iOS 0x2098ac6e0 corlib_System_Threading_Monitor_ObjWait_int_object
13 App.iOS 0x205522a94 System_Threading_Tasks_Task_SpinThenBlockingWait_int_System_Threading_CancellationToken
14 App.iOS 0x2098e1d40 corlib_System_Threading_Tasks_Task_InternalWaitCore_int_System_Threading_CancellationToken
15 App.iOS 0x207a215ac Sentry_Sentry_SentryClient_DoSendEvent_Sentry_SentryEvent_Sentry_SentryHint_Sentry_Scope
16 App.iOS 0x2077bb858 NLog_NLog_Targets_Target_Write_NLog_Common_AsyncLogEventInfo
17 App.iOS 0x204f82a28 System_Reactive_Linq_ObservableImpl_SelectMany_2_ObservableSelector___TSource_REF_TResult_REF_OnNext_TSource_REF (<unknown>:1)
18 App.iOS 0x20827ec70 System_Reactive_System_Reactive_Sink_1_TTarget_REF_ForwardOnNext_TTarget_REF
19 App.iOS 0x204fb5294 System_Reactive_Concurrency_TaskPoolScheduler_ScheduledWorkItem_1__c_TState_GSHAREDVT___ctorb__4_0_object (<unknown>:1)
20 App.iOS 0x2098e11bc corlib_System_Threading_Tasks_Task_InnerInvoke
21 App.iOS 0x2098e1064 corlib_System_Threading_Tasks_Task_ExecuteEntryUnsafe_System_Threading_Thread
22 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
23 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
24 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
25 App.iOS 0x209ead070 [inlined] start_wrapper_internal (threads.c:1213)
26 App.iOS 0x209ead070 start_wrapper (threads.c:1271)
27 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 23
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a4c _pthread_cond_wait
2 App.iOS 0x209dccdb4 mono_os_cond_timedwait (mono-os-mutex.c:75)
3 App.iOS 0x209dd1718 [inlined] mono_coop_cond_timedwait (mono-coop-mutex.h:103)
4 App.iOS 0x209dd1718 mono_lifo_semaphore_timed_wait (lifo-semaphore.c:56)
5 App.iOS 0x20551fa2c wrapper_managed_to_native_System_Threading_LowLevelLifoSemaphore_TimedWaitInternal_intptr_int
6 App.iOS 0x2098afd14 corlib_System_Threading_LowLevelLifoSemaphore_WaitForSignal_int
7 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
8 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
9 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
10 App.iOS 0x209ead070 [inlined] start_wrapper_internal (threads.c:1213)
11 App.iOS 0x209ead070 start_wrapper (threads.c:1271)
12 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 24
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a4c _pthread_cond_wait
2 App.iOS 0x209dccdb4 mono_os_cond_timedwait (mono-os-mutex.c:75)
3 App.iOS 0x209dd1718 [inlined] mono_coop_cond_timedwait (mono-coop-mutex.h:103)
4 App.iOS 0x209dd1718 mono_lifo_semaphore_timed_wait (lifo-semaphore.c:56)
5 App.iOS 0x20551fa2c wrapper_managed_to_native_System_Threading_LowLevelLifoSemaphore_TimedWaitInternal_intptr_int
6 App.iOS 0x2098afd14 corlib_System_Threading_LowLevelLifoSemaphore_WaitForSignal_int
7 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
8 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
9 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
10 App.iOS 0x209ead070 [inlined] start_wrapper_internal (threads.c:1213)
11 App.iOS 0x209ead070 start_wrapper (threads.c:1271)
12 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 25
0 libsystem_kernel.dylib 0x3bb6e7410 __workq_kernreturn
1 libsystem_pthread.dylib 0x42b7b6cc4 _pthread_wqthread
Thread 26
0 libsystem_kernel.dylib 0x3bb6ecf90 __psynch_cvwait
1 libsystem_pthread.dylib 0x42b7b5a4c _pthread_cond_wait
2 App.iOS 0x209dccdb4 mono_os_cond_timedwait (mono-os-mutex.c:75)
3 App.iOS 0x209dd1718 [inlined] mono_coop_cond_timedwait (mono-coop-mutex.h:103)
4 App.iOS 0x209dd1718 mono_lifo_semaphore_timed_wait (lifo-semaphore.c:56)
5 App.iOS 0x20551fa2c wrapper_managed_to_native_System_Threading_LowLevelLifoSemaphore_TimedWaitInternal_intptr_int
6 App.iOS 0x2098afd14 corlib_System_Threading_LowLevelLifoSemaphore_WaitForSignal_int
7 App.iOS 0x209ef67b4 mono_jit_runtime_invoke (mini-runtime.c:3647)
8 App.iOS 0x209e9222c [inlined] do_runtime_invoke (object.c:2576)
9 App.iOS 0x209e9222c mono_runtime_invoke_checked (object.c:2792)
10 App.iOS 0x209ead070 [inlined] start_wrapper_internal (threads.c:1213)
11 App.iOS 0x209ead070 start_wrapper (threads.c:1271)
12 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
Thread 27
0 libsystem_kernel.dylib 0x3bb6e7688 mach_msg2_trap
1 libsystem_kernel.dylib 0x3bb6ead94 mach_msg2_internal
2 libsystem_kernel.dylib 0x3bb6eacac mach_msg_overwrite
3 libsystem_kernel.dylib 0x3bb6eaaf8 mach_msg
4 CoreFoundation 0x31af13a80 __CFRunLoopServiceMachPort
5 CoreFoundation 0x31af1312c __CFRunLoopRun
6 CoreFoundation 0x31af1282c CFRunLoopRunSpecific
7 CoreFoundation 0x31af7dce8 CFRunLoopRun
8 CoreMotion 0x335874084 <redacted>
9 libsystem_pthread.dylib 0x42b7b8378 _pthread_start
EOF
Thanks, so it is actually MAUI code. We could either do it ourselves properly (with reduced pixel ratio) or raise it upstream. In any case, we should wrap our call in try-catch
Does that make sense @jamescrosswell ?
Thanks @bruno-garcia @vaind
Thanks, so it is actually MAUI code. We could either do it ourselves properly (with reduced pixel ratio) or raise it upstream. In any case, we should wrap our call in try-catch
Does that make sense @jamescrosswell ?
Yes to both of these things. As this results in a crash, I'll bump the priority on this.
- We should wrap it in a try..catch..log ASAP
- Will see if we can raise an issue upstream... although that will be challenging without a minmal repro. At the very least, we can ask in the discord channels to see if anyone else has bumped into something like this
https://github.com/dotnet/maui/pull/18631
- https://github.com/dotnet/maui/pull/28682
We've got a try/catch around the offending code now, so it won't crash the app. Leaving this issue open here to track progress on the underlying bug in dotnet/maui.
It looks like this was resolve in the dotnet/maui repo. I think we can close this issue now.