mono / mono

Mono open source ECMA CLI, C# and .NET implementation.
https://www.mono-project.com
Other
11.14k stars 3.82k forks source link

Xamarin iOS application is crasing randomly Got a segv while executing native code. #20700

Open gsssubramanyam opened 3 years ago

gsssubramanyam commented 3 years ago

Steps to Reproduce

My Xamarin iOS application is crashing randomly.

Current Behavior

Application is crashing randomly

Expected Behavior

It should not crash randomly

On which platforms did you notice this

[x ] iOS [ ] Linux [ ] Windows

Version Used:

Stacktrace


Thread started:  #11
Thread started:  #12
Thread started:  #13
Thread started:  #14
2020-12-23 12:37:04.783 XXX[5281:1231513] CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer implemented and should not be called
Thread started:  #15
Thread started:  #16
Thread started:  #17
Thread started:  #18
Thread started:  #19
XXX   at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00013] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2029 
  at System.Threading.Tasks.Task`1[TResult].GetResultCore (System.Boolean waitCompletionNotification) [0x0002b] in <3fe48c4c600840c0ba57ff7c65150717>:0 
  at System.Threading.Tasks.Task`1[TResult].get_Result () [0x0000f] in <3fe48c4c600840c0ba57ff7c65150717>:0 
  at XXX.Tasks.HttpClientRequestTask`2[T3,T4].Job (T3 input, System.Collections.Generic.Dictionary`2[TKey,TValue] extras) [0x000c1] in <44d313e5aff74c09a4a01821c07c1cb5>:0 ***HttpClientRequestTask.cs90
XXX 249453 11/27/2019 8:41:55 AM***AbstractNotification.cs295
XXX 249452 11/27/2019 8:51:47 AM***AbstractNotification.cs295
XXX 249451 11/27/2019 9:41:07 AM***AbstractNotification.cs295
XXX 249450 11/27/2019 9:43:19 AM***AbstractNotification.cs295
XXX 249449 11/27/2019 9:51:33 AM***AbstractNotification.cs295
XXX 249448 11/27/2019 3:01:28 PM***AbstractNotification.cs295
XXX 249446 11/27/2019 3:11:04 PM***AbstractNotification.cs295
XXX 249445 12/3/2019 8:42:28 PM***AbstractNotification.cs295
XXX 249415 12/17/2019 9:43:06 AM***AbstractNotification.cs295
XXX 249368 9/3/2020 11:03:35 AM***AbstractNotification.cs295
XXX 249367 9/3/2020 11:23:00 AM***AbstractNotification.cs295
XXX 249478 12/13/2019 5:48:27 AM***AbstractNotification.cs295
XXX 249478 12/13/2019 5:49:11 AM***AbstractNotification.cs295
Thread started:  #20
Thread finished: <Thread Pool> #9

=================================================================
    Native Crash Reporting
=================================================================
Got a segv while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
    Native stacktrace:
=================================================================
    0x103e37b70 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : mono_dump_native_crash_info
    0x103e2dddc - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : mono_handle_native_crash
    0x103e3bf98 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : mono_sigsegv_signal_handler_debug
    0x1de0ce290 - /usr/lib/system/libsystem_platform.dylib : <redacted>
    0x195fe3978 - /System/Library/Frameworks/Foundation.framework/Foundation : <redacted>
    0x195fe0e18 - /System/Library/Frameworks/Foundation.framework/Foundation : <redacted>
    0x1980c6e5c - /System/Library/Frameworks/QuartzCore.framework/QuartzCore : <redacted>
    0x1980d5048 - /System/Library/Frameworks/QuartzCore.framework/QuartzCore : <redacted>
    0x1980d60c8 - /System/Library/Frameworks/QuartzCore.framework/QuartzCore : <redacted>
    0x197b9f728 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
    0x197b87f24 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
    0x103ff6c7c - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : xamarin_release_managed_ref
    0x10252ede8 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : wrapper_managed_to_native_Foundation_NSObject_xamarin_release_managed_ref_intptr_Foundation_NSObject
    0x10252f208 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : Foundation_NSObject_ReleaseManagedRef
    0x1025321b4 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : Foundation_NSObject_NSObject_Disposer_Drain_Foundation_NSObject
    0x101c66340 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
    0x103e3f408 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : mono_jit_runtime_invoke
    0x103efb664 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : mono_runtime_invoke_checked
    0x103efeec8 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : mono_runtime_invoke
    0x1013987bc - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : _ZL31native_to_managed_trampoline_60P11objc_objectP13objc_selectorPP11_MonoMethodS0_j
    0x10139860c - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : +[__NSObject_Disposer drain:]
    0x19604fb90 - /System/Library/Frameworks/Foundation.framework/Foundation : <redacted>
    0x194c3876c - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
    0x194c38668 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
    0x194c37960 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
    0x194c31a8c - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
    0x194c3121c - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : CFRunLoopRunSpecific
    0x1abcb0784 - /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices : GSEventRunModal
    0x19766a200 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
    0x19766fa74 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain
    0x102597848 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr
    0x1024efa30 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : UIKit_UIApplication_Main_string___intptr_intptr
    0x1024ef9b4 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : UIKit_UIApplication_Main_string___string_string
    0x1016cd0e8 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : XXX_iOS_Application_Main_string__
    0x101c66340 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
    0x103e3f408 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : mono_jit_runtime_invoke
    0x103efb664 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : mono_runtime_invoke_checked
    0x103f018bc - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : mono_runtime_exec_main_checked
    0x103e1d99c - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : mono_jit_exec
    0x104006c84 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : xamarin_main
    0x1013a5f40 - /private/var/containers/Bundle/Application/04D16D72-DF00-437E-BD10-AED97F902B93/XXX.app/XXX : main
    0x1948f16c0 - /usr/lib/system/libdyld.dylib : <redacted>

=================================================================
    Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x1a921113c):0x1a921112c  1f 04 00 f1 cb 00 00 54 08 00 40 f9 08 81 7d 92  .......T..@...}.
0x1a921113c  08 71 40 39 00 09 02 53 c0 03 5f d6 00 00 80 52  .q@9...S.._....R
0x1a921114c  c0 03 5f d6 00 01 00 b4 e8 03 00 aa 20 01 f8 b7  .._......... ...
0x1a921115c  08 01 40 f9 00 81 7d 92 60 00 00 b4 21 00 80 52  ..@...}.`...!..R

=================================================================
    Managed Stacktrace:
=================================================================
      at <unknown> <0xffffffff>
      at Foundation.NSObject:xamarin_release_managed_ref <0x00007>
      at Foundation.NSObject:ReleaseManagedRef <0x00017>
      at NSObject_Disposer:Drain <0x00173>
      at System.Object:runtime_invoke_dynamic <0x0010f>
      at <unknown> <0xffffffff>
      at UIKit.UIApplication:UIApplicationMain <0x00007>
      at UIKit.UIApplication:Main <0x0002f>
      at UIKit.UIApplication:Main <0x00043>
      at XXX.iOS.Application:Main <0x000a7>
      at System.Object:runtime_invoke_dynamic <0x0010f>
=================================================================
quin-q commented 3 years ago

i get a similar/same issue with SMAPI on mac - it seems to be not uncommon:

https://forums.xamarin.com/discussion/162978/got-a-sigsegv-while-executing-native-code-this-usually-indicates-a-fatal-error-in-the-mono-runtime#:~:text=This%20usually%20indicates%20a%20fatal%20error%20in%20the%20mono%20runtime,-rdacp https://forum.unity.com/threads/editor-crash-additional-information.865207/ https://stackoverflow.com/questions/43496483/got-a-sigsegv-while-executing-native-code-this-usually-indicates-a-fatal-error

it's honestly not my area, but as far as i can tell from reading about, it's an issue with the debugger being attached vs unattached