Skip to content

[mono2018-02] Unittest fail to launch on 32 bit device #3826

Closed

Description

@GouriKumari

Steps to Reproduce

  1. Install system with XI from mono-2018-02 branch. Update xamarin-macios with the same sample revision.
  2. Execute any unittest on 32 bit device

Expected Behavior

App launches and runs successfully

Actual Behavior

App launches with a black screen but fails with a stacktrace

Environment

Xamarin.iOS
Version: 11.11.0.155 (Visual Studio Community)
Hash: d458533

Build Logs

Build log: https://gist.github.com/GouriKumari/b1743a8dca173cf3db14cfc2e22f2369
Stacktrace:
monotouch-test: http://xqa.blob.core.windows.net/gist/report-627b3c1e82c44a6882e7d3c31da80d9f.txt
linksdk test: http://xqa.blob.core.windows.net/gist/report-2739bbe2fc744e75a436a2a44dd5b7d7.txt
linkalltest: http://xqa.blob.core.windows.net/gist/report-8d7550e89664400b83604c729b6eb063.txt
mini

Activity

  1. spouliot commented on Mar 28, 2018

    @spouliot
    Contributor

    @GouriKumari can you attach the crash reports please ? thanks!

  2. GouriKumari commented on Mar 28, 2018

    @GouriKumari
    ContributorAuthor
  3. spouliot commented on Mar 28, 2018

    @spouliot
    Contributor
    Exception Codes: 0x000000008badf00d
    Exception Note:  SIMULATED (this is NOT a crash)
    ...
    com.xamarin.mini failed to scene-create after 17.83s (launch took 2.17s of total time limit 20.00s)
    

    means it's the watchdog that killed it

    but something crashed

    10  mini                          	0x006499f0 monoeg_g_log + 6232560 (goutput.c:116)
    11  mini                          	0x00571216 mono_handle_native_crash + 5345814 (mini-exceptions.c:2694)
    12  mini                          	0x0057a50c mono_sigsegv_signal_handler + 5383436 (mini-runtime.c:3143)
    13  libsystem_platform.dylib      	0x23fce076 _sigtramp + 42
    

    and was trying to write in the device logs

    @GouriKumari can you attach the device logs too ? thanks!

  4. luhenry commented on Mar 29, 2018

    @luhenry
    Contributor
  5. added
    need-info
    on Mar 29, 2018
  6. added this to the Future milestone on Mar 29, 2018
  7. lewurm commented on Mar 29, 2018

    @lewurm
    Contributor

    I can reproduce this:

    Process 270 stopped
    * thread #1, name = 'tid_403', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN, address=0x16933124)
        frame #0: 0x0066f4b2 mini`mono_atomic_cas_i64(dest=0x16933124, exch=<unavailable>, comp=<unavailable>) at atomic.c:519 [opt]
       516 	gint64
       517 	mono_atomic_cas_i64(volatile gint64 *dest, gint64 exch, gint64 comp)
       518 	{
    -> 519 		return  __sync_val_compare_and_swap (dest, comp, exch);
       520 	}
       521
       522 	#elif defined (TARGET_ANDROID)
    Target 0: (mini) stopped.
    (lldb) bt
    * thread #1, name = 'tid_403', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN, address=0x16933124)
      * frame #0: 0x0066f4b2 mini`mono_atomic_cas_i64(dest=0x16933124, exch=<unavailable>, comp=<unavailable>) at atomic.c:519 [opt]
        frame #1: 0x006292ea mini`ves_icall_System_Threading_ThreadPool_NotifyWorkItemQueued [inlined] mono_atomic_inc_i64 at atomic.h:397 [opt]
        frame #2: 0x006292d6 mini`ves_icall_System_Threading_ThreadPool_NotifyWorkItemQueued at threadpool.c:743 [opt]
        frame #3: 0x00317170 mini`wrapper_managed_to_native_System_Threading_ThreadPool_NotifyWorkItemQueued + 64
        frame #4: 0x00313f28 mini`System_Threading_ThreadPoolWorkQueue_Enqueue_System_Threading_IThreadPoolWorkItem_bool + 536
        frame #5: 0x00316aa0 mini`System_Threading_ThreadPool_QueueUserWorkItemHelper_System_Threading_WaitCallback_object_System_Threading_StackCrawlMark__bool + 312
        frame #6: 0x0031690c mini`System_Threading_ThreadPool_QueueUserWorkItem_System_Threading_WaitCallback + 56
        frame #7: 0x00485d78 mini`MonoTouch_NUnit_UI_TouchRunner_GetViewController(this=0x02586cf0) at TouchRunner.cs:532
        frame #8: 0x001525f0 mini`mini_AppDelegate_FinishedLaunching_UIKit_UIApplication_Foundation_NSDictionary(this=0x025843f8, app=0x02585b08, options=0x00000000) at AppDelegate.cs:116
        frame #9: 0x00397ea8 mini`wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 232
        frame #10: 0x005b4f12 mini`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, exc=0x00000000, error=<unavailable>) at mini-runtime.c:2782 [opt]
        frame #11: 0x0060c732 mini`do_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=0x009ac770, exc=0x00000000, error=<unavailable>) at object.c:2922 [opt]
        frame #12: 0x0060c6cc mini`mono_runtime_invoke [inlined] mono_runtime_invoke_checked(method=<unavailable>, obj=0x025843f8, params=0x009ac770, error=0x00000000) at object.c:3075 [opt]
        frame #13: 0x0060c69e mini`mono_runtime_invoke(method=0x16976a68, obj=0x025843f8, params=0x009ac770, exc=<unavailable>) at object.c:2976 [opt]
        frame #14: 0x00095b80 mini`native_to_managed_trampoline_4(self=0x15e17c50, _cmd="application:didFinishLaunchingWithOptions:", managed_method_ptr=0x007890ac, p0=0x15d37e30, p1=0x00000000, token_ref=363008) at registrar.m:158
        frame #15: 0x00095980 mini`::-[AppDelegate application:didFinishLaunchingWithOptions:](self=0x15e17c50, _cmd="application:didFinishLaunchingWithOptions:", p0=0x15d37e30, p1=0x00000000) at registrar.m:2737
        frame #16: 0x203e55c4 UIKit`-[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 376
        frame #17: 0x205e6a4a UIKit`-[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3706
        frame #18: 0x205ebc1c UIKit`-[UIApplication _runWithMainScene:transitionContext:completion:] + 1640
        frame #19: 0x205fe7c4 UIKit`__84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke.3149 + 40
        frame #20: 0x205e935a UIKit`-[UIApplication workspaceDidEndTransaction:] + 142
        frame #21: 0x1ca24c12 FrontBoardServices`__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 18
        frame #22: 0x1ca24acc FrontBoardServices`-[FBSSerialQueue _performNext] + 220
        frame #23: 0x1ca24db6 FrontBoardServices`-[FBSSerialQueue _performNextFromRunLoopSource] + 44
        frame #24: 0x1b0fffdc CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
        frame #25: 0x1b0ffb04 CoreFoundation`__CFRunLoopDoSources0 + 424
        frame #26: 0x1b0fdf50 CoreFoundation`__CFRunLoopRun + 1160
        frame #27: 0x1b0511ae CoreFoundation`CFRunLoopRunSpecific + 470
        frame #28: 0x1b050fd0 CoreFoundation`CFRunLoopRunInMode + 104
        frame #29: 0x203dee2c UIKit`-[UIApplication _run] + 660
        frame #30: 0x203d9a52 UIKit`UIApplicationMain + 150
        frame #31: 0x00514d40 mini`wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr(param0=6, param1=0x02580a08, param2=0, param3=366169456) + 288
        frame #32: 0x004e1ab4 mini`UIKit_UIApplication_Main_string___intptr_intptr(args=0x02580a08, principal=0, delegate=366169456) at UIApplication.cs:79
        frame #33: 0x004e1a74 mini`UIKit_UIApplication_Main_string___string_string(args=0x02580a08, principalClassName=0x009adc4c, delegateClassName=0x030d4148) at UIApplication.cs:63
        frame #34: 0x001513a4 mini`mini_Application_Main_string__(args=0x02580a08) at Main.cs:17
        frame #35: 0x00397ea8 mini`wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 232
        frame #36: 0x005b4f12 mini`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, exc=0x00000000, error=<unavailable>) at mini-runtime.c:2782 [opt]
        frame #37: 0x0060c732 mini`do_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=0x009adfec, exc=0x00000000, error=<unavailable>) at object.c:2922 [opt]
        frame #38: 0x0060e9b0 mini`do_exec_main_checked [inlined] mono_runtime_invoke_checked(method=<unavailable>, obj=<unavailable>, error=0x009ae00c) at object.c:3075 [opt]
        frame #39: 0x0060e980 mini`do_exec_main_checked(method=0x161300b8, args=<unavailable>, error=0x009ae00c) at object.c:4819 [opt]
        frame #40: 0x005a164a mini`mono_jit_exec(domain=<unavailable>, assembly=<unavailable>, argc=7, argv=0x009ae054) at driver.g.c:1210 [opt]
        frame #41: 0x006998d8 mini`::xamarin_main(argc=9, argv=0x009ae984, launch_mode=XamarinLaunchModeApp) at monotouch-main.m:485
        frame #42: 0x0009e9b8 mini`main(argc=9, argv=0
    
  8. added
    bug
    iOS
    and removed
    need-info
    on Mar 29, 2018
  9. lewurm commented on Mar 30, 2018

    @lewurm
    Contributor

    should be fixed by 4aa8444

  10. GouriKumari commented on Apr 20, 2018

    @GouriKumari
    ContributorAuthor

    Verified with XI build Version: 11.11.0.317 (Visual Studio Community) Hash: f45440b. Apps are launching and executing successfully on 32 bit device.

    Logs:

    Build log: https://gist.github.com/GouriKumari/0b34927fd30db3565d2944e68a9bfd95
    Test Log: https://gist.github.com/GouriKumari/f3b3d1cace01bb61aa25f11502c12f65
    Test Env: https://gist.github.com/GouriKumari/63bd391f383286c9103ecd5d5e9c177b

  11. GouriKumari commented on Apr 20, 2018

    @GouriKumari
    ContributorAuthor

    Closing this issue.

  12. ghost locked as resolved and limited conversation to collaborators on May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugiOS

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions