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

How to decipher a crash call stack #19493

Open
NerijusN opened this issue Nov 20, 2023 · 1 comment
Open

How to decipher a crash call stack #19493

NerijusN opened this issue Nov 20, 2023 · 1 comment
Labels
question The issue is a question
Milestone

Comments

@NerijusN
Copy link

NerijusN commented Nov 20, 2023

Help!

Can anyone help me understand how I could detect issue in my code, as those addresses are outside of code. I suspect that all point is

MarketPrimeTool.Net                  0x0000000104c42a00 +[__NSObject_Disposer drain:] (registrar.mm:20968)

but unable to nail the cause in C# code. If anyone has slightest idea, would be very very appreciated for any advice.
Please,

Steps to Reproduce

  1. Being reported in out appCenter a lot of customers getting this crash.

Expected Behavior

Not seeing the crash, or at least understand what code of MarketPrimeTool.Net made it to happen

Actual Behavior

Seeing the crash

Environment

Production

BiometryService                                           0.4.0-dev.118
Uno.Fonts.Fluent                                          2.2.2
Uno.WinUI                                                 4.9.49
Uno.WinUI.RemoteControl                                   4.9.49
Uno.UI.Adapter.Microsoft.Extensions.Logging               4.9.49
Uno.Microsoft.Xaml.Behaviors.Interactivity.WinUI          2.3.1-uno.2
Uno.Microsoft.Xaml.Behaviors.WinUI.Managed                2.3.1-uno.2
Reactive.Annex.Uno.WinUI                                  0.6.0-dev.50
Microsoft.Extensions.Logging.Console                      6.0.0
Chinook.BackButtonManager                                 1.1.3
Chinook.BackButtonManager.Uno.WinUI                       1.1.3
Chinook.DataLoader.Uno.WinUI                              1.2.0
Chinook.DataLoader.DynamicMvvm                            1.2.0
Chinook.DynamicMvvm.Uno.WinUI                             1.2.0
Chinook.DynamicMvvm                                       1.2.0
Chinook.DynamicMvvm.CollectionTracking                    1.2.0
Chinook.DynamicMvvm.Reactive                              1.2.0
Chinook.DynamicMvvm.FluentValidation                      1.2.0
Serilog.Sinks.Xamarin                                     1.0.0
Uno.CodeGen                                               2.0.0-dev.10
Uno.Injectable                                            2.0.0-dev.10
Uno.SourceGenerationTasks                                 4.2.0
MallardMessageHandlers                                    1.2.0
Chinook.StackNavigation.Abstractions                      2.0.0
Chinook.SectionsNavigation.Uno.WinUI                      2.0.0
Chinook.SectionsNavigation.Reactive                       2.0.0
MessageDialogService.Uno.WinUI                            0.6.0-dev.58
Uno.Material.WinUI                                        2.6.1
Uno.Toolkit.WinUI                                         3.0.4
Uno.Toolkit.WinUI.Material                                3.0.4
Nventive.Persistence.Reactive                             0.4.0-dev.36
Nventive.Persistence.Uno.WinUI                            0.4.0-dev.36
Nventive.View.Uno.WinUI                                   0.5.0-dev.66
ExtendedSplashScreen.Uno.WinUI                            0.5.0-dev.60
Uno.WinUI.Lottie                                          4.9.49
Uno.CommunityToolkit.WinUI.DeveloperTools                 7.1.100
Uno.CommunityToolkit.WinUI.UI.Controls                    7.1.100

Crash Log

Incident Identifier: c24dab10-71b0-4922-85ff-c29a72375be4
CrashReporter Key:   77CA78F2-5022-43D2-BBDB-AF308A5C7EC6
Hardware Model:      iPhone13,3
Process:         StockWaveApp.Mob [11303]
Path:            /private/var/containers/Bundle/Application/1A94A7B8-7A8D-4102-BBD9-8DA55F80E32A/MarketPrimeTool.Net.app/MarketPrimeTool.Net
Identifier:      com.DataStream.app
Version:         3.3.1 (5635)
Code Type:       arm64
Parent Process:   [1]

Date/Time:       2023-11-17T00:25:15.999Z
Launch Time:     2023-11-16T21:24:42Z
OS Version:      iPhone OS 17.1.1 (21B91)
Report Version:  104

Exception Type:  SIGTRAP
Exception Codes: #0 at 0x1a6f6e7f8
Crashed Thread:  0

Thread 0 Crashed:
0   libobjc.A.dylib                      0x00000001a6f6e7f8 object_getClass + 48
1   MarketPrimeTool.Net                  0x0000000104b90a68 do_icall (interp.c:2273)
2   MarketPrimeTool.Net                  0x0000000104b8f838 do_icall_wrapper (interp.c:2361)
3   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
4   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
5   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
6   MarketPrimeTool.Net                  0x0000000104a8b874 mono_runtime_try_invoke (object.c:2415)
7   MarketPrimeTool.Net                  0x0000000104a8d8a0 mono_runtime_invoke (object.c:2464)
8   MarketPrimeTool.Net                  0x0000000104c42b68 native_to_managed_trampoline_68(objc_object*, objc_selector*, _MonoMethod**, objc_object*, unsigned int) (registrar.mm:4511)
9   MarketPrimeTool.Net                  0x0000000104c42a00 +[__NSObject_Disposer drain:] (registrar.mm:20968)
10  Foundation                           0x00000001adc13b14 __NSThreadPerformPerform + 260
11  CoreFoundation                       0x00000001aebb731c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
12  CoreFoundation                       0x00000001aebb6598 __CFRunLoopDoSource0 + 172
13  CoreFoundation                       0x00000001aebb4dac __CFRunLoopDoSources0 + 336
14  CoreFoundation                       0x00000001aebb3a88 __CFRunLoopRun + 824
15  CoreFoundation                       0x00000001aebb3668 CFRunLoopRunSpecific + 604
16  GraphicsServices                     0x00000001f1f7e5ec GSEventRunModal + 160
17  UIKitCore                            0x00000001b0fd02b4 -[UIApplication _run] + 884
18  UIKitCore                            0x00000001b0fcf8f0 UIApplicationMain + 336
19  MarketPrimeTool.Net                  0x0000000104861240 xamarin_UIApplicationMain (bindings.m:126)
20  MarketPrimeTool.Net                  0x0000000104b90b18 do_icall (interp.c:2321)
21  MarketPrimeTool.Net                  0x0000000104b8f838 do_icall_wrapper (interp.c:2361)
22  MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
23  MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
24  MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
25  MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
26  MarketPrimeTool.Net                  0x0000000104a91ae8 do_exec_main_checked (object.c:0)
27  MarketPrimeTool.Net                  0x0000000104b50fec mono_jit_exec (driver.c:1365)
28  MarketPrimeTool.Net                  0x00000001048755e4 xamarin_main (monotouch-main.m:490)
29  MarketPrimeTool.Net                  0x0000000104c073f8 main (main.arm64.mm:82)
30  ???                                  0x00000001d1606dcc 0x0 + 0

Thread 1:
0   libsystem_kernel.dylib               0x00000001f6094730 __workq_kernreturn + 8
1   libsystem_pthread.dylib              0x00000002185dda04 start_wqthread + 4

Thread 2:
0   libsystem_kernel.dylib               0x00000001f6094730 __workq_kernreturn + 8
1   libsystem_pthread.dylib              0x00000002185dda04 start_wqthread + 4

Thread 3:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x0000000104b3b474 thread_func (mono-os-mutex.h:219)
2   libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
3   libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 4:
0   libsystem_kernel.dylib               0x00000001f608c154 semaphore_wait_trap + 8
1   MarketPrimeTool.Net                  0x0000000104aa3934 start_wrapper_internal (threads.c:1202)
2   MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
3   libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
4   libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 5:
0   libsystem_kernel.dylib               0x00000001f6094730 __workq_kernreturn + 8
1   libsystem_pthread.dylib              0x00000002185dda04 start_wqthread + 4

Thread 6:
0   libsystem_kernel.dylib               0x00000001f608c1d8 mach_msg2_trap + 8
1   libsystem_kernel.dylib               0x00000001f608be88 mach_msg_overwrite + 432
2   libsystem_kernel.dylib               0x00000001f608bcc8 mach_msg + 20
3   CoreFoundation                       0x00000001aebb5d0c __CFRunLoopServiceMachPort + 156
4   CoreFoundation                       0x00000001aebb3c04 __CFRunLoopRun + 1204
5   CoreFoundation                       0x00000001aebb3668 CFRunLoopRunSpecific + 604
6   Foundation                           0x00000001adb4c54c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 208
7   Foundation                           0x00000001adb7a27c -[NSRunLoop(NSRunLoop) runUntilDate:] + 60
8   UIKitCore                            0x00000001b0f31fc8 -[UIEventFetcher threadMain] + 416
9   Foundation                           0x00000001adbd1184 __NSThread__start__ + 728
10  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
11  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 7:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x00000001048c7150 SystemNative_LowLevelMonitor_TimedWait (pal_threading.c:177)
2   MarketPrimeTool.Net                  0x0000000104b90a8c do_icall (interp.c:2285)
3   MarketPrimeTool.Net                  0x0000000104b8f838 do_icall_wrapper (interp.c:2361)
4   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
5   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
6   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
7   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
8   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
9   MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
10  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
11  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 8:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x0000000104aef79c mono_os_cond_timedwait (mono-os-mutex.c:75)
2   MarketPrimeTool.Net                  0x0000000104af3e2c mono_lifo_semaphore_timed_wait (mono-coop-mutex.h:103)
3   MarketPrimeTool.Net                  0x0000000104b90a8c do_icall (interp.c:2285)
4   MarketPrimeTool.Net                  0x0000000104b8f870 do_icall_wrapper (interp.c:2365)
5   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
6   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
7   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
8   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
9   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
10  MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
11  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
12  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 9:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x00000001048c7150 SystemNative_LowLevelMonitor_TimedWait (pal_threading.c:177)
2   MarketPrimeTool.Net                  0x0000000104b90a8c do_icall (interp.c:2285)
3   MarketPrimeTool.Net                  0x0000000104b8f838 do_icall_wrapper (interp.c:2361)
4   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
5   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
6   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
7   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
8   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
9   MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
10  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
11  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 10:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x0000000104aef79c mono_os_cond_timedwait (mono-os-mutex.c:75)
2   MarketPrimeTool.Net                  0x0000000104af3e2c mono_lifo_semaphore_timed_wait (mono-coop-mutex.h:103)
3   MarketPrimeTool.Net                  0x0000000104b90a8c do_icall (interp.c:2285)
4   MarketPrimeTool.Net                  0x0000000104b8f870 do_icall_wrapper (interp.c:2365)
5   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
6   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
7   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
8   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
9   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
10  MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
11  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
12  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 11:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x00000001048c7150 SystemNative_LowLevelMonitor_TimedWait (pal_threading.c:177)
2   MarketPrimeTool.Net                  0x0000000104b90a8c do_icall (interp.c:2285)
3   MarketPrimeTool.Net                  0x0000000104b8f838 do_icall_wrapper (interp.c:2361)
4   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
5   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
6   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
7   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
8   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
9   MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
10  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
11  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 12:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x00000001048c7150 SystemNative_LowLevelMonitor_TimedWait (pal_threading.c:177)
2   MarketPrimeTool.Net                  0x0000000104b90a8c do_icall (interp.c:2285)
3   MarketPrimeTool.Net                  0x0000000104b8f838 do_icall_wrapper (interp.c:2361)
4   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
5   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
6   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
7   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
8   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
9   MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
10  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
11  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 13:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x00000001048c7150 SystemNative_LowLevelMonitor_TimedWait (pal_threading.c:177)
2   MarketPrimeTool.Net                  0x0000000104b90a8c do_icall (interp.c:2285)
3   MarketPrimeTool.Net                  0x0000000104b8f838 do_icall_wrapper (interp.c:2361)
4   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
5   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
6   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
7   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
8   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
9   MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
10  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
11  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 14:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x0000000104aef7c4 mono_os_cond_timedwait (mono-os-mutex.h:219)
2   MarketPrimeTool.Net                  0x0000000104aa85cc mono_w32handle_timedwait_signal_handle (mono-coop-mutex.h:103)
3   MarketPrimeTool.Net                  0x0000000104aa8470 mono_w32handle_wait_one (w32handle.c:728)
4   MarketPrimeTool.Net                  0x0000000104aca74c ves_icall_System_Threading_Monitor_Monitor_wait (monitor.c:1364)
5   MarketPrimeTool.Net                  0x0000000104a5bc30 ves_icall_System_Threading_Monitor_Monitor_wait_raw (icall-def.h:570)
6   MarketPrimeTool.Net                  0x0000000104b90ab8 do_icall (interp.c:2297)
7   MarketPrimeTool.Net                  0x0000000104b8f870 do_icall_wrapper (interp.c:2365)
8   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
9   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
10  MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
11  MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
12  MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
13  MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
14  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
15  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 15:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x00000001048c7150 SystemNative_LowLevelMonitor_TimedWait (pal_threading.c:177)
2   MarketPrimeTool.Net                  0x0000000104b90a8c do_icall (interp.c:2285)
3   MarketPrimeTool.Net                  0x0000000104b8f838 do_icall_wrapper (interp.c:2361)
4   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
5   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
6   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
7   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
8   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
9   MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
10  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
11  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 16:
0   libsystem_kernel.dylib               0x00000001f6099f6c kevent + 8
1   MarketPrimeTool.Net                  0x0000000104b90ab8 do_icall (interp.c:2297)
2   MarketPrimeTool.Net                  0x0000000104b8f838 do_icall_wrapper (interp.c:2361)
3   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
4   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
5   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
6   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
7   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
8   MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
9   libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
10  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 17:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x0000000104aef7c4 mono_os_cond_timedwait (mono-os-mutex.h:219)
2   MarketPrimeTool.Net                  0x0000000104aa85cc mono_w32handle_timedwait_signal_handle (mono-coop-mutex.h:103)
3   MarketPrimeTool.Net                  0x0000000104aa8470 mono_w32handle_wait_one (w32handle.c:728)
4   MarketPrimeTool.Net                  0x0000000104aca74c ves_icall_System_Threading_Monitor_Monitor_wait (monitor.c:1364)
5   MarketPrimeTool.Net                  0x0000000104a5bc30 ves_icall_System_Threading_Monitor_Monitor_wait_raw (icall-def.h:570)
6   MarketPrimeTool.Net                  0x0000000104b90ab8 do_icall (interp.c:2297)
7   MarketPrimeTool.Net                  0x0000000104b8f870 do_icall_wrapper (interp.c:2365)
8   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
9   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
10  MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
11  MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
12  MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
13  MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
14  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
15  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 18:
0   libsystem_kernel.dylib               0x00000001f608c22c swtch_pri + 8
1   MarketPrimeTool.Net                  0x0000000104afb2d0 mono_threads_platform_yield (mono-threads-posix.c:127)
2   MarketPrimeTool.Net                  0x0000000104a542a4 ves_icall_System_Threading_Thread_YieldInternal (icall.c:7179)
3   MarketPrimeTool.Net                  0x0000000104b90a44 do_icall (interp.c:2261)
4   MarketPrimeTool.Net                  0x0000000104b8f870 do_icall_wrapper (interp.c:2365)
5   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
6   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
7   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
8   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
9   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
10  MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
11  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
12  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 19:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x0000000104aef79c mono_os_cond_timedwait (mono-os-mutex.c:75)
2   MarketPrimeTool.Net                  0x0000000104af3e2c mono_lifo_semaphore_timed_wait (mono-coop-mutex.h:103)
3   MarketPrimeTool.Net                  0x0000000104b90a8c do_icall (interp.c:2285)
4   MarketPrimeTool.Net                  0x0000000104b8f870 do_icall_wrapper (interp.c:2365)
5   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
6   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
7   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
8   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
9   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
10  MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
11  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
12  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 20:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x0000000104aef7c4 mono_os_cond_timedwait (mono-os-mutex.h:219)
2   MarketPrimeTool.Net                  0x0000000104aa85cc mono_w32handle_timedwait_signal_handle (mono-coop-mutex.h:103)
3   MarketPrimeTool.Net                  0x0000000104aa8470 mono_w32handle_wait_one (w32handle.c:728)
4   MarketPrimeTool.Net                  0x0000000104aca74c ves_icall_System_Threading_Monitor_Monitor_wait (monitor.c:1364)
5   MarketPrimeTool.Net                  0x0000000104a5bc30 ves_icall_System_Threading_Monitor_Monitor_wait_raw (icall-def.h:570)
6   MarketPrimeTool.Net                  0x0000000104b90ab8 do_icall (interp.c:2297)
7   MarketPrimeTool.Net                  0x0000000104b8f870 do_icall_wrapper (interp.c:2365)
8   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
9   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
10  MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
11  MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
12  MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
13  MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
14  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
15  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 21:
0   libsystem_kernel.dylib               0x00000001f608c1d8 mach_msg2_trap + 8
1   libsystem_kernel.dylib               0x00000001f608be88 mach_msg_overwrite + 432
2   libsystem_kernel.dylib               0x00000001f608bcc8 mach_msg + 20
3   CoreFoundation                       0x00000001aebb5d0c __CFRunLoopServiceMachPort + 156
4   CoreFoundation                       0x00000001aebb3c04 __CFRunLoopRun + 1204
5   CoreFoundation                       0x00000001aebb3668 CFRunLoopRunSpecific + 604
6   CFNetwork                            0x00000001afea7780 _CFURLStorageSessionCopyIdentifier + 69128
7   Foundation                           0x00000001adbd1184 __NSThread__start__ + 728
8   libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
9   libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 22:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x0000000104aef79c mono_os_cond_timedwait (mono-os-mutex.c:75)
2   MarketPrimeTool.Net                  0x0000000104af3e2c mono_lifo_semaphore_timed_wait (mono-coop-mutex.h:103)
3   MarketPrimeTool.Net                  0x0000000104b90a8c do_icall (interp.c:2285)
4   MarketPrimeTool.Net                  0x0000000104b8f870 do_icall_wrapper (interp.c:2365)
5   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
6   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
7   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
8   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
9   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
10  MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
11  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
12  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 23:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x0000000104aef79c mono_os_cond_timedwait (mono-os-mutex.c:75)
2   MarketPrimeTool.Net                  0x0000000104af3e2c mono_lifo_semaphore_timed_wait (mono-coop-mutex.h:103)
3   MarketPrimeTool.Net                  0x0000000104b90a8c do_icall (interp.c:2285)
4   MarketPrimeTool.Net                  0x0000000104b8f870 do_icall_wrapper (interp.c:2365)
5   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
6   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
7   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
8   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
9   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
10  MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
11  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
12  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 24:
0   libsystem_platform.dylib             0x0000000218532ea0 _platform_memmove + 0
1   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
2   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
3   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
4   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
5   MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
6   libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
7   libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 25:
0   libsystem_kernel.dylib               0x00000001f608cb7c __psynch_cvwait + 8
1   MarketPrimeTool.Net                  0x0000000104aef79c mono_os_cond_timedwait (mono-os-mutex.c:75)
2   MarketPrimeTool.Net                  0x0000000104af3e2c mono_lifo_semaphore_timed_wait (mono-coop-mutex.h:103)
3   MarketPrimeTool.Net                  0x0000000104b90a8c do_icall (interp.c:2285)
4   MarketPrimeTool.Net                  0x0000000104b8f870 do_icall_wrapper (interp.c:2365)
5   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
6   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
7   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
8   MarketPrimeTool.Net                  0x0000000104a89ed8 mono_runtime_invoke_checked (object.c:2415)
9   MarketPrimeTool.Net                  0x0000000104aa3a2c start_wrapper_internal (threads.c:1213)
10  MarketPrimeTool.Net                  0x0000000104aa37bc start_wrapper (threads.c:1264)
11  libsystem_pthread.dylib              0x00000002185de4d4 _pthread_start + 132
12  libsystem_pthread.dylib              0x00000002185dda10 thread_start + 4

Thread 26:
0   libsystem_kernel.dylib               0x00000001f6094730 __workq_kernreturn + 8
1   libsystem_pthread.dylib              0x00000002185dda04 start_wqthread + 4

Thread 27:
0   ???                                  0x0000000000000000 0x0 + 0

Thread 0 crashed with arm64 Thread State:
   x21: 0x0000000000000000     x2: 0x00000001051282b8    x16: 0x0074706d65747440     x3: 0x00000001051282c0
   x22: 0x00000001a6f6e7c8     x4: 0x00000001a6f6e7c8    x17: 0x0000006d65747440   cpsr: 0x0000000020001000
    x5: 0x0000000000000000    x23: 0x00000001051282c0     x6: 0x0000000000000000    x18: 0x0000000000000000
   x10: 0x0000000104b90a60     lr: 0x0000000104b90a68     x7: 0x000000016b6056ec    x24: 0x000000000000022c
   x11: 0x000000000000000b     x8: 0x6974706d65747441    x19: 0x00000001051282b8    x25: 0x0000000143aa5762
    x9: 0x0000000104d8b524    x12: 0x0000000000000200     fp: 0x000000016b605150    x26: 0x0000000143aa5754
   x13: 0x0000000000000002     pc: 0x00000001a6f6e7f8    x27: 0x000000016b6055e0    x14: 0x01000001ffca0d0b
   x20: 0x0000000143a89840     x0: 0x000000014bf08cf0     sp: 0x000000016b605120    x28: 0x0000000281f66738
   x15: 0x00000001ffca0d08     x1: 0x000000000000022c

Binary Images:
0x00000001047f8000 -        0x0000000104dabfff +MarketPrimeTool.Net arm64  <1d4e5d9f95e73987963a3646b1640456> /private/var/containers/Bundle/Application/1A94A7B8-7A8D-4102-A239-8DA55F80E32A/MarketPrimeTool.Net.app/MarketPrimeTool.Net
0x0000000105778000 -        0x0000000105d07fff +libSkiaSharp arm64  <a3389983874b3be0b7deeeb8a1de8bcb> /private/var/containers/Bundle/Application/1A94A7B8-7A8D-4102-A239-8DA55F80E32A/MarketPrimeTool.Net.app/Frameworks/libSkiaSharp.framework/libSkiaSharp
0x00000001a6f60000 -        0x00000001a6fadf00  libobjc.A.dylib arm64e  <4af3b26f95f53a0cbe43ddd978e6bc2f> /usr/lib/libobjc.A.dylib
0x00000001adb20000 -        0x00000001ae685fff  Foundation arm64e  <8ddf9bdaf5fb30209be105bc15fcfba1> /System/Library/Frameworks/Foundation.framework/Foundation
0x00000001aeb80000 -        0x00000001af0acfff  CoreFoundation arm64e  <b37a1273b0c2312e9e0b7143fb645c69> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x00000001afc4f000 -        0x00000001b0028fff  CFNetwork arm64e  <d0b06b1a16bf37d680fda783c24a8bf4> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x00000001b0da4000 -        0x00000001b286ffff  UIKitCore arm64e  <f1a8bd619cf23054b622cb63d6ceb4cb> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x00000001f1f7b000 -        0x00000001f1f83fff  GraphicsServices arm64e  <4be6d9c687253c03b3f9b9a7a5b1ec06> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x00000001f608b000 -        0x00000001f60c3fff  libsystem_kernel.dylib arm64e  <77ac893d8258332b9dfcb7ba2439af97> /usr/lib/system/libsystem_kernel.dylib
0x0000000218532000 -        0x0000000218538fe7  libsystem_platform.dylib arm64e  <939b1878c4cb34d0b12655ae30d21efc> /usr/lib/system/libsystem_platform.dylib
0x00000002185dc000 -        0x00000002185e7ff3  libsystem_pthread.dylib arm64e  <810e428af26d37bbbb0f609cbb4718c7> /usr/lib/system/libsystem_pthread.dylib
@NerijusN NerijusN changed the title Can't detect the problem How to decipher a crash call stack Nov 20, 2023
@rolfbjarne
Copy link
Member

Unfortunately this particular crash (with [__NSObject_Disposer drain:] in the stack trace) is quite hard to track down, because it's a memory corruption issue. Most likely a native object has been freed earlier than expected, and when managed code tries to access it later, the process crashes. Additionally, the crash location is very generic, so there's no hint in the stack trace about what kind of object it was.

The most important step is to be able to reproduce the crash locally, and hopefully create a test project.

One trick that sometimes make it easier to reproduce is to run the GC in a background thread in a loop, to aggressively free stuff as soon as possible with the idea that it'll crash sooner if something's wrong:

static void Main ()
{
    var thread = new Thread (() =>
    {
        while (true) {
            Thread.Sleep (1000); // Run GC.Collect every second
            GC.Collect ();
            Console.WriteLine ("Collected");
        }
    });
    thread.Start ();
    UIApplicationMain (...);
}

As a sidenote, I'm working on being able to detect this kind of memory corruption issues before they crash the process, and hopefully give better diagnostics, but it will be a while until that's been released.

@rolfbjarne rolfbjarne added this to the Future milestone Nov 21, 2023
@rolfbjarne rolfbjarne added the question The issue is a question label Nov 21, 2023
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Jan 4, 2024
This will hopefully make it easier to diagnose these kinds of crashes:

    Thread 0 Crashed:
    0   libobjc.A.dylib                      0x00000001a6f6e7f8 object_getClass + 48
    1   MarketPrimeTool.Net                  0x0000000104b90a68 do_icall (interp.c:2273)
    2   MarketPrimeTool.Net                  0x0000000104b8f838 do_icall_wrapper (interp.c:2361)
    3   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
    4   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
    5   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
    6   MarketPrimeTool.Net                  0x0000000104a8b874 mono_runtime_try_invoke (object.c:2415)
    7   MarketPrimeTool.Net                  0x0000000104a8d8a0 mono_runtime_invoke (object.c:2464)
    8   MarketPrimeTool.Net                  0x0000000104c42b68 native_to_managed_trampoline_68(objc_object*, objc_selector*, _MonoMethod**, objc_object*, unsigned int) (registrar.mm:4511)
    9   MarketPrimeTool.Net                  0x0000000104c42a00 +[__NSObject_Disposer drain:] (registrar.mm:20968)
    10  Foundation                           0x00000001adc13b14 __NSThreadPerformPerform + 260

This happens because we try to access freed/invalid memory, but unfortunately
the crash report / stack trace does not contain any hint whatsoever about the
memory that triggered the crash.

By adding an opt-in to validate the memory for a given object, we might be
able to detect this crash in a few cases, and instead throw a managed
exception with much more information.

Ref: dotnet#19493
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Jan 5, 2024
This will hopefully make it easier to diagnose these kinds of crashes:

    Thread 0 Crashed:
    0   libobjc.A.dylib                      0x00000001a6f6e7f8 object_getClass + 48
    1   MarketPrimeTool.Net                  0x0000000104b90a68 do_icall (interp.c:2273)
    2   MarketPrimeTool.Net                  0x0000000104b8f838 do_icall_wrapper (interp.c:2361)
    3   MarketPrimeTool.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
    4   MarketPrimeTool.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
    5   MarketPrimeTool.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
    6   MarketPrimeTool.Net                  0x0000000104a8b874 mono_runtime_try_invoke (object.c:2415)
    7   MarketPrimeTool.Net                  0x0000000104a8d8a0 mono_runtime_invoke (object.c:2464)
    8   MarketPrimeTool.Net                  0x0000000104c42b68 native_to_managed_trampoline_68(objc_object*, objc_selector*, _MonoMethod**, objc_object*, unsigned int) (registrar.mm:4511)
    9   MarketPrimeTool.Net                  0x0000000104c42a00 +[__NSObject_Disposer drain:] (registrar.mm:20968)
    10  Foundation                           0x00000001adc13b14 __NSThreadPerformPerform + 260

This happens because we try to access freed/invalid memory, but unfortunately
the crash report / stack trace does not contain any hint whatsoever about the
memory that triggered the crash.

By adding an opt-in to validate the memory for a given object, we might be
able to detect this crash in a few cases, and instead throw a managed
exception with much more information.

Ref: dotnet#19493
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Jun 7, 2024
…d pointers.

This will hopefully make it easier to diagnose these kinds of crashes:

    Thread 0 Crashed:
    0   libobjc.A.dylib                      0x00000001a6f6e7f8 object_getClass + 48
    1   MyTestDotNetApp.Net                  0x0000000104b90a68 do_icall (interp.c:2273)
    2   MyTestDotNetApp.Net                  0x0000000104b8f838 do_icall_wrapper (interp.c:2361)
    3   MyTestDotNetApp.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
    4   MyTestDotNetApp.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
    5   MyTestDotNetApp.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
    6   MyTestDotNetApp.Net                  0x0000000104a8b874 mono_runtime_try_invoke (object.c:2415)
    7   MyTestDotNetApp.Net                  0x0000000104a8d8a0 mono_runtime_invoke (object.c:2464)
    8   MyTestDotNetApp.Net                  0x0000000104c42b68 native_to_managed_trampoline_68(objc_object*, objc_selector*, _MonoMethod**, objc_object*, unsigned int) (registrar.mm:4511)
    9   MyTestDotNetApp.Net                  0x0000000104c42a00 +[__NSObject_Disposer drain:] (registrar.mm:20968)
    10  Foundation                           0x00000001adc13b14 __NSThreadPerformPerform + 260

This happens because we try to access freed/invalid memory, but unfortunately
the crash report / stack trace does not contain any hint whatsoever about the
memory that triggered the crash.

By adding an opt-in to validate the memory for a given object, we might be
able to detect this crash in a few cases, and instead throw a managed
exception with much more information.

A project opts-in by setting `_ValidateObjectPointers=true` in the csproj.

Ref: dotnet#19493
rolfbjarne added a commit that referenced this issue Aug 12, 2024
…d pointers. (#21001)

This will hopefully make it easier to diagnose these kinds of crashes:

    Thread 0 Crashed:
    0   libobjc.A.dylib                      0x00000001a6f6e7f8 object_getClass + 48
    1   MyTestDotNetApp.Net                  0x0000000104b90a68 do_icall (interp.c:2273)
    2   MyTestDotNetApp.Net                  0x0000000104b8f838 do_icall_wrapper (interp.c:2361)
    3   MyTestDotNetApp.Net                  0x0000000104b85214 interp_exec_method (interp.c:3885)
    4   MyTestDotNetApp.Net                  0x0000000104b82de8 interp_runtime_invoke (interp.c:2122)
    5   MyTestDotNetApp.Net                  0x0000000104b4aedc mono_jit_runtime_invoke (mini-runtime.c:3650)
    6   MyTestDotNetApp.Net                  0x0000000104a8b874 mono_runtime_try_invoke (object.c:2415)
    7   MyTestDotNetApp.Net                  0x0000000104a8d8a0 mono_runtime_invoke (object.c:2464)
    8   MyTestDotNetApp.Net                  0x0000000104c42b68 native_to_managed_trampoline_68(objc_object*, objc_selector*, _MonoMethod**, objc_object*, unsigned int) (registrar.mm:4511)
    9   MyTestDotNetApp.Net                  0x0000000104c42a00 +[__NSObject_Disposer drain:] (registrar.mm:20968)
    10  Foundation                           0x00000001adc13b14 __NSThreadPerformPerform + 260

This happens because we try to access freed/invalid memory, but unfortunately
the crash report / stack trace does not contain any hint whatsoever about the
memory that triggered the crash.

By adding an opt-in to validate the memory for a given object, we might be
able to detect this crash in a few cases, and instead throw a managed
exception with much more information.

A project opts-in by setting `_ValidateObjectPointers=true` in the csproj.

Ref: #19493

---------

Co-authored-by: Manuel de la Pena <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question The issue is a question
Projects
None yet
Development

No branches or pull requests

2 participants