Forum Xamarin.Forms

iOS works in Debug but mono crashes at splash screen in Release / AppStore

DavidPartingtonDavidPartington USMember ✭✭
edited July 16 in Xamarin.Forms

Sorry to bother you guys, but I've been struggling with this for several days now and I'm out of ideas!

I've been testing an app via TestFlight for a while, but the 90 day expired and I had to upload a new version to keep the beta testers alive.

What changed?

  • Code wise, nothing!
  • VS version updated
  • Xamarin updated
  • Some Nugets updated.

It all still runs (on all my devices) in debug mode, but in release mode, ad-hoc and AppStore mode is crashes at the splash screen.

I've tried all linker options but it makes no difference. I've tried to strip out as much code as possible but it happens with even a bare bones amount of code running. It looks like it's crashing on a mono invoke but I am quite willing to be corrected there.

Help!

The console shows this:

Launched application 'xxxappname' on 'iPad Air 2 Device' with pid 1175
2020-07-16 14:46:02.099 xxxappname'[1175:596388] error: * Assertion at /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mono/mini/mini-trampolines.c:1494, condition `invoke' not met

=================================================================

Native Crash Reporting

Got a abrt 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:

0x102d92cc8 - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102d89964 - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102d92214 - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x19434b894 - /usr/lib/system/libsystem_platform.dylib : <redacted>
0x1943501e8 - /usr/lib/system/libsystem_pthread.dylib : <redacted>
0x1942a3934 - /usr/lib/system/libsystem_c.dylib : abort
0x102eced50 - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : xamarin_find_protocol_wrapper_type
0x102ec90a4 - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102ec912c - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102ec915c - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102d9d4f0 - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102d947ac - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102d74c5c - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102d75cec - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102d75528 - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102d94e3c - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102d995f0 - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102e32b30 - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102e34738 - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x102ecefe4 - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : xamarin_find_protocol_wrapper_type
0x102ed5770 - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : xamarin_release_block_on_main_thread
0x100717e98 - /private/var/containers/Bundle/Application/C90B8695-455C-4C99-8B3C-8537AA5ABB65/xxxappname.iOS.app/xxxappname.iOS : 
0x1944428f0 - /usr/lib/system/libdyld.dylib : <redacted>

=================================================================

Basic Fault Address Reporting

Memory around native instruction pointer (0x194437d88):0x194437d78 c0 03 5f d6 c0 03 5f d6 10 29 80 d2 01 10 00 d4 .......)......
0x194437d88 e3 00 00 54 fd 7b bf a9 fd 03 00 91 4f 7b ff 97 ...T.{......O{..
0x194437d98 bf 03 00 91 fd 7b c1 a8 c0 03 5f d6 c0 03 5f d6 .....{........
0x194437da8 90 29 80 d2 01 10 00 d4 e3 00 00 54 fd 7b bf a9 .).........T.{..

=================================================================

Managed Stacktrace:

=================================================================
Application 'xxxappname' terminated.

Answers

  • DavidPartingtonDavidPartington USMember ✭✭

    I should probably have added that I completely uninstalled VS & all libraries and re-installed from scratch today (latest stable versions) as a last ditch hope that something was corrupted.

  • LandLuLandLu Member, Xamarin Team Xamurai

    It's better to stably reproduce this issue under debugging.
    We can't spot your issue through these stack traces.
    Does this device have a corresponding UDID to test your application?
    Have you tested this on another validate device?
    Try to integrate some analytic libraries to help us find the root cause. Additionally, App Center could be helpful.

  • DavidPartingtonDavidPartington USMember ✭✭

    @LandLu thanks for the reply.

    If I could reproduce under debugging I'd at least have a change, but it works 100% under the debugger.

    It works 100% under the debugger on all my (5) devices.

    It crashes 100% of the time in release mode on all my (5) devices.

    I haven't used App Center before, I'll look in to it. What other analytic libraries do you suggest?

  • LandLuLandLu Member, Xamarin Team Xamurai

    It's hard to say what caused this at startup time.
    We need to collect some information to spot this issue.
    Did you choose this architecture under release mode:

    Moreover, opening a free support ticket could be considered, if you really can't reproduce it on your side:
    https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=211dd84f-3474-c3c5-79bf-66db630c92a6

  • DavidPartingtonDavidPartington USMember ✭✭

    Hi Landlu,
    Thanks again. Yes I selected ARM64 and tried with all linker options. I also integrated App Center and in debug mode everything runs perfectly. In release mode I never get anything to the App Center so I assume it's crashing either before it gets initialised or before any events can be logged.

    I also extracted the crash log from the device. Not sure if this is helpful or not:

    Incident Identifier: FACBC6FA-AE31-4B40-B89A-89D4DE6E1825
    CrashReporter Key: ca6f1c721a83cb2b8d06d0d401f2a37e57b97712
    Hardware Model: iPad5,4
    Process: xxxxxx.iOS [1515]
    Path: /private/var/containers/Bundle/Application/BE11B2AC-78D6-40BC-xxxx-10B19D7A83E1/xxxxxx.iOS.app/xxxxxx.iOS
    Identifier: com.xxxxx.xxxxxx
    Version: 1.0.1.56 (1.0.2)
    Code Type: ARM-64 (Native)
    Role: Foreground
    Parent Process: launchd [1]
    Coalition: com.xxxxx.xxxxxx[883]

    Date/Time: 2020-07-20 21:50:57.6768 +0100
    Launch Time: 2020-07-20 21:50:57.5742 +0100
    OS Version: iPhone OS 13.5.1 (17F80)
    Release Type: User
    Baseband Version: 9.60.01
    Report Version: 104

    Exception Type: EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Exception Note: EXC_CORPSE_NOTIFY
    Triggered by Thread: 0

    Thread 0 name: tid_407 Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:
    0 libsystem_kernel.dylib 0x0000000194437d88 __pthread_kill + 8
    1 libsystem_pthread.dylib 0x00000001943501e8 pthread_kill$VARIANT$mp + 136
    2 libsystem_c.dylib 0x00000001942a39b0 __abort + 112
    3 libsystem_c.dylib 0x00000001942a3940 __abort + 0
    4 xxxxxx.iOS 0x000000010336732c print_callback(char const*, int) + 43004716 (runtime.m:1218)
    5 xxxxxx.iOS 0x0000000103354c14 monoeg_g_logv_nofree + 42929172 (goutput.c:167)
    6 xxxxxx.iOS 0x0000000103354ca8 monoeg_assertion_message + 42929320 (goutput.c:201)
    7 xxxxxx.iOS 0x0000000103354cec mono_assertion_message_unreachable + 42929388 (goutput.c:227)
    8 xxxxxx.iOS 0x0000000103209cac mono_class_create_from_typedef + 41573548 (class-init.c:418)
    9 xxxxxx.iOS 0x0000000103208488 mono_class_setup_fields + 41567368 (class-init.c:370)
    10 xxxxxx.iOS 0x0000000103214f84 mono_class_data_size + 41619332 (class.c:2219)
    11 xxxxxx.iOS 0x000000010328fa30 mono_class_vtable_checked + 42121776 (object.c:1949)
    12 xxxxxx.iOS 0x00000001031cdee4 mono_resolve_patch_target + 41328356 (mini-runtime.c:1471)
    13 xxxxxx.iOS 0x00000001031a68dc init_method + 41167068 (aot-runtime.c:4674)
    14 xxxxxx.iOS 0x00000001031a796c load_method + 41171308 (aot-runtime.c:4296)
    15 xxxxxx.iOS 0x00000001031a71a8 mono_aot_get_method + 41169320 (aot-runtime.c:4968)
    16 xxxxxx.iOS 0x00000001031ce9a0 mono_jit_compile_method_with_opt + 41331104 (mini-runtime.c:2383)
    17 xxxxxx.iOS 0x00000001031d33c8 mono_jit_runtime_invoke + 41350088 (mini-runtime.c:3056)
    18 xxxxxx.iOS 0x00000001032904ac mono_runtime_try_invoke + 42124460 (object.c:3161)xxxxxx.iOS
    19 xxxxxx.iOS 0x00000001032923c8 mono_runtime_invoke + 42132424 (object.c:3101)
    20 xxxxxx.iOS 0x00000001033675c0 xamarin_initialize + 43005376 (runtime.m:1364)
    21 xxxxxx.iOS 0x000000010336e96c xamarin_main + 43034988 (monotouch-main.m:435)
    22 xxxxxx.iOS 0x0000000100adf76c main + 505708 (main.m:184)
    23 libdyld.dylib 0x00000001944428f0 start + 4

    Thread 1:
    0 libsystem_pthread.dylib 0x000000019435c738 start_wqthread + 0

    Thread 2:
    0 libsystem_pthread.dylib 0x000000019435c738 start_wqthread + 0

    Thread 3:
    0 libsystem_pthread.dylib 0x000000019435c738 start_wqthread + 0

    Thread 4:
    0 libsystem_pthread.dylib 0x000000019435c738 start_wqthread + 0

    Thread 5:
    0 libsystem_pthread.dylib 0x000000019435c738 start_wqthread + 0

    Thread 6:
    0 libsystem_pthread.dylib 0x000000019435c738 start_wqthread + 0

    Thread 7 name: JavaScriptCore bmalloc scavenger
    Thread 7:
    0 libsystem_kernel.dylib 0x0000000194437b58 __psynch_cvwait + 8
    1 libsystem_pthread.dylib 0x0000000194351ce4 _pthread_cond_wait$VARIANT$mp + 680
    2 libc++.1.dylib 0x00000001944897ac std::__1::condition_variable::wait+ 51116 (std::__1::unique_lock&) + 24
    3 JavaScriptCore 0x00000001a352dab8 void std::__1::condition_variable_any::wait<std::__1::unique_lock >+ 563896 (std::__1::unique_lock&) + 108
    4 JavaScriptCore 0x00000001a3531790 bmalloc::Scavenger::threadRunLoop+ 579472 () + 160
    5 JavaScriptCore 0x00000001a35314a0 bmalloc::Scavenger::Scavenger+ 578720 (std::__1::lock_guard const&) + 0
    6 JavaScriptCore 0x00000001a35326e4 std::__1::__thread_specific_ptr::set_pointer+ 583396 (std::__1::__thread_struct*) + 0
    7 libsystem_pthread.dylib 0x0000000194358d98 _pthread_start + 156
    8 libsystem_pthread.dylib 0x000000019435c74c thread_start + 8

    Thread 8 name: WebThread
    Thread 8:
    0 libsystem_kernel.dylib 0x0000000194416198 mach_msg_trap + 8
    1 libsystem_kernel.dylib 0x000000019441560c mach_msg + 72
    2 CoreFoundation 0x00000001945c0468 __CFRunLoopServiceMachPort + 148
    3 CoreFoundation 0x00000001945bb49c __CFRunLoopRun + 1160
    4 CoreFoundation 0x00000001945bace8 CFRunLoopRunSpecific + 424
    5 WebCore 0x000000019cb35ac0 RunWebThread+ 10132160 (void*) + 612
    6 libsystem_pthread.dylib 0x0000000194358d98 _pthread_start + 156
    7 libsystem_pthread.dylib 0x000000019435c74c thread_start + 8

    Thread 9 name: SGen worker
    Thread 9:
    0 libsystem_kernel.dylib 0x0000000194437b58 __psynch_cvwait + 8
    1 libsystem_pthread.dylib 0x0000000194351ce4 _pthread_cond_wait$VARIANT$mp + 680
    2 xxxxxx.iOS 0x0000000103331f40 thread_func + 42786624 (sgen-thread-pool.c:196)
    3 libsystem_pthread.dylib 0x0000000194358d98 _pthread_start + 156
    4 libsystem_pthread.dylib 0x000000019435c74c thread_start + 8

    Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
    x4: 0x0000000000000000 x5: 0x0000000000989680 x6: 0x0000000000000000 x7: 0xffffffffffffffec
    x8: 0x00000001039d5840 x9: 0x68b8e610e81f331d x10: 0x00000000000003e8 x11: 0x00000000000007fb
    x12: 0x00000000000007fd x13: 0x0000000000000000 x14: 0x000000008d820800 x15: 0x0000000000000041
    x16: 0x0000000000000148 x17: 0x000000000d800000 x18: 0x0000000000000000 x19: 0x0000000000000006
    x20: 0x0000000000000407 x21: 0x0000000000000001 x22: 0x00000001039d5920 x23: 0x0000000000000000
    x24: 0x0000000000000000 x25: 0x00000000ffffffff x26: 0x0000000000000001 x27: 0x0000000000000080
    x28: 0x0000000000000080 fp: 0x000000016f399dc0 lr: 0x00000001943501e8
    sp: 0x000000016f399da0 pc: 0x0000000194437d88 cpsr: 0x40000000
    esr: 0x56000080 Address size fault

    Binary Images:
    0x100a64000 - 0x10347bfff xxxxxx.iOS arm64 /var/containers/Bundle/Application/BE11B2AC-78D6-40BC-B16C-10B19D7A83E1/xxxxxx.iOS.app/xxxxxx.iOS
    0x103888000 - 0x103893fff libobjc-trampolines.dylib arm64 <927690b4ce6e3dbb8d54d00bd46e211c> /usr/lib/libobjc-trampolines.dylib
    0x103968000 - 0x1039cbfff dyld arm64 /usr/lib/dyld
    0x1941e7000 - 0x1941fdfff libsystem_trace.dylib arm64 /usr/lib/system/libsystem_trace.dylib
    0x1941fe000 - 0x19422ffff libxpc.dylib arm64 /usr/lib/system/libxpc.dylib
    0x194230000 - 0x194230fff libsystem_blocks.dylib arm64 <5ecacf25aea7392db0edea47df03841f> /usr/lib/system/libsystem_blocks.dylib
    0x194231000 - 0x1942acfff libsystem_c.dylib arm64 <7de48f8fc80f3f6582e5438a038914de> /usr/lib/system/libsystem_c.dylib

    • lots more (too much to post)
Sign In or Register to comment.