'Xamarin iOS Crash on Launch mono_handle_exception_internal mini-exceptions.c EXC_BAD_ACCESS (SIGABRT)
When I submit the app to the AppStore, I get an error from Apple, can I ask a question here
After a while trying to read the crashlog file Apple attached (I use AppCenter) to see it. I get error content like this:
mono_handle_exception_internal
mini-exceptions.c, line 2791
EXC_BAD_ACCESS (SIGABRT)
MAIN THREAD - CRASHED
libsystem_kernel.dylib
__pthread_kill
libsystem_pthread.dylib
pthread_kill
libsystem_c.dylib
abort
MyApp.iOS
xamarin_unhandled_exception_handler runtime.m:1099
MyApp.iOS
mono_invoke_unhandled_exception_hook exception.c:1265
MyApp.iOS
mono_handle_exception_internal mini-exceptions.c:2791
MyApp.iOS
mono_handle_exception mini-exceptions.c:3116
MyApp.iOS
handle_signal_exception exceptions-arm64.c:526
MyApp.iOS
Dashboard.xaml.cs:187
MyApp.iOS
Xamarin_Forms_Page_SendAppearing (D:\a\1\s\Xamarin.Forms.Core\Page.cs:452)
MyApp.iOS
Xamarin_Forms_Page_SendAppearing (D:\a\1\s\Xamarin.Forms.Core\Page.cs:456)
MyApp.iOS
Xamarin_Forms_Page_SendAppearing (D:\a\1\s\Xamarin.Forms.Core\Page.cs:456)
MyApp.iOS
Xamarin_Forms_Platform_iOS_NavigationRenderer_ViewDidAppear_bool (D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:138)
MyApp.iOS
wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
MyApp.iOS
mono_jit_runtime_invoke mini-runtime.c:3190
MyApp.iOS
mono_runtime_invoke_checked object.c:3052
MyApp.iOS
mono_runtime_invoke object.c:3107
MyApp.iOS
native_to_managed_trampoline_12(objc_object*, objc_selector*, _MonoMethod**, bool, unsigned int) registrar.m:532
MyApp.iOS
-[Xamarin_Forms_Platform_iOS_NavigationRenderer viewDidAppear:] registrar.m:8529
UIKitCore
-[UIViewController _setViewAppearState:isAnimating:]
UIKitCore
-[UIViewController _setViewAppearState:isAnimating:]
UIKitCore
-[UIViewController _setViewAppearState:isAnimating:]
CoreFoundation
__NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__
CoreFoundation
-[__NSSingleObjectArrayI enumerateObjectsWithOptions:usingBlock:]
UIKitCore
-[UIViewController _setViewAppearState:isAnimating:]
UIKitCore
-[UIViewController __viewDidAppear:]
UIKitCore
-[UIViewController _endAppearanceTransition:]
UIKitCore
-[UIPresentationController transitionDidFinish:]
UIKitCore
-[_UIAfterCACommitBlock run]
UIKitCore
-[_UIAfterCACommitQueue flush]
UIKitCore
_runAfterCACommitDeferredBlocks
UIKitCore
_cleanUpAfterCAFlushAndRunDeferredBlocks
UIKitCore
_afterCACommitHandler
CoreFoundation
__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
CoreFoundation
__CFRunLoopDoObservers
CoreFoundation
__CFRunLoopRun
CoreFoundation
CFRunLoopRunSpecific
GraphicsServices
GSEventRunModal
UIKitCore
-[UIApplication _run]
UIKitCore
UIApplicationMain
MyApp.iOS
wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr
MyApp.iOS
UIApplication.cs:79
MyApp.iOS
Main.cs:17
MyApp.iOS
wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
MyApp.iOS
mono_jit_runtime_invoke mini-runtime.c:3190
MyApp.iOS
mono_runtime_invoke_checked object.c:3052
MyApp.iOS
mono_runtime_exec_main_checked object.c:0
MyApp.iOS
mono_jit_exec driver.c:1383
MyApp.iOS
xamarin_main monotouch-main.m:485
MyApp.iOS
main main.m:186
dyld
0x10689c000 + 105700
I don't know what that error means. I can only view the file Main.cs
static void Main(string[] args)
{
    // if you want to use a different Application Delegate class from "AppDelegate"
    UIApplication.Main(args, null, typeof(AppDelegate));
}
I searched for related keywords: mono_handle_exception_internal, but no match was found. Looking forward to everyone's help.
Update
protected override void OnAppearing()
{
    base.OnAppearing();
    var statusbar = DependencyService.Get<IStatusBarPlatformSpecific>();
    statusbar.SetStatusBarColor(Color.FromHex("f1f1f1"));
}
IStatusBarPlatformSpecific.cs
public interface IStatusBarPlatformSpecific
{
    void SetStatusBarColor(Color color);
}
							
						Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source | 
|---|




