Xamarin.iOS App quits instantly on iPhone. Debugger won't attach. Simulator won't launch

5

I'm trying to work on a small Xamarin.iOS app using Visual Studio 2013, a Mac build host, and a physical iPhone for testing. Everything was working fine before new years. I upgraded to Xamarin 4 on the Mac, the PC, and in Visual Studio. I don't know if that has anything to do with it though. After all, everything was still working after the upgrade. App ran, debugger attached and hit breakpoints or broke on exceptions, Visual Studio connected to both the simulator and physical device, etc.

I left for New Years and returned today (Monday) to find that for NO REASON WHATSOEVER--I made NO changes--the app quits immediately when I try to launch it for debugging on the physical iPhone. It still worked on the simulator. I tried launching the app on the iPhone itself (by touching its icon) with the same result. It flashes the splash screen for a split second and immediately quits to the home screen.

Launching from Visual Studio, it SAYS that it launched successfully, but will not hit any breakpoints, even in main startup methods. The app also quits while VS still says "Launching", LONG before it says "Successfully Launched".

I tried a few things to fix this. I checked the app identity in a dummy XCode project to see if it told me to fix any issues--no problem. I tried deleting bin and obj files--no luck. I tried manually uninstalling the app from the iPhone before re-building-and-launching it--didn't help. I tried restarting all systems: iPhone, Macintosh, and Visual Studio... and things got WORSE.

Now, i cannot even START the iPhone-simulator. Visual Studio says "Failed to start iOS Simulator in the mac: An error on client vs2248Brock while executing a post topic xvs/idb/4.0.0.1717/show-app", and of course attempting to start for debugging on the simulator causes Visual Studio to hang on "Launching for Debugging" for ages on end, until it sits in debug mode as if it were attached to a running app--when it isn't--until i press stop.

I can launch the simulator manually in XCode, but Visual Studio and/or the Xamarin build host it is working through still can't seem to see that it even exists.

I don't know which of these problems are related, but I have nothing to go on--nothing to even give me a GUESS as to where to start looking for the problem. Any ideas?

Note for answers: I've always been a PC/Windows guy. I'm pretty much brand new to Mac or iOS development. So assume that I know NOTHING. If suggesting that I check something, please don't just tell me what to check--tell me how to find and/or use the thing to check.

Examples: If say you want me to "Watch thus and such a log", tell me how to view that log. Or if you want me to "Try changing this and that setting to some value from x-y-source that everyone knows about", assume I know nothing about how to find either that setting or the value source. Etc, etc.

EDIT: Crash log from a recent attempt, up through stack trace. Un-symbolicated lines in trace are stuck that way. Tried manual symbolification. Didn't reveal anything more than what XCode did automatically.

    Incident Identifier: 10C2C0C2-CDCB-4D48-912C-474D8D149F59
    CrashReporter Key:   ca0f26f3bfe5523c1d44e218508047e188eda496
    Hardware Model:      iPhone4,1
    Process:             CameraTest [360]
    Path:                /private/var/mobile/Containers/Bundle/Application/B3B7A636-5422-4851-8503-1A918E36DDA1/CameraTest.app/CameraTest
    Identifier:          com.perrinormalcreations.CameraDemo
    Version:             1.0 (1.0)
    Code Type:           ARM (Native)
    Parent Process:      launchd [1]

    Date/Time:           2016-01-05 17:11:53.489 -0600
    Launch Time:         2016-01-05 17:11:52.921 -0600
    OS Version:          iOS 8.4.1 (12H321)
    Report Version:      104

    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000
    Triggered by Thread:  0

    Thread 0 name:  Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:
    0   ???                             0000000000 0 + 0
    1   CameraTest                      0x0036ded4 0xe1000 + 2674388
    2   CameraTest                      0x002ab59e 0xe1000 + 1877406
    3   CameraTest                      0x002ac834 0xe1000 + 1882164
    4   UIKit                           0x2c5f75de -[UINib instantiateWithOwner:options:] + 1678
    5   UIKit                           0x2c772fdc -[UIStoryboard instantiateViewControllerWithIdentifier:] + 196
    6   UIKit                           0x2c48b4f8 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 64
    7   UIKit                           0x2c48a810 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1152
    8   UIKit                           0x2c4955e8 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 36
    9   UIKit                           0x2c4890c6 -[UIApplication workspaceDidEndTransaction:] + 130
    10  FrontBoardServices              0x2f699ec0 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 16
    11  CoreFoundation                  0x28b8b034 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    12  CoreFoundation                  0x28b8a2f8 __CFRunLoopDoBlocks + 216
    13  CoreFoundation                  0x28b88e52 __CFRunLoopRun + 1714
    14  CoreFoundation                  0x28ad46d0 CFRunLoopRunSpecific + 476
    15  CoreFoundation                  0x28ad44e2 CFRunLoopRunInMode + 106
    16  UIKit                           0x2c28b866 -[UIApplication _run] + 558
    17  UIKit                           0x2c286444 UIApplicationMain + 1440
    18  CameraTest                      0x002ae974 0xe1000 + 1890676
    19  CameraTest                      0x003856c0 0xe1000 + 2770624
    20  CameraTest                      0x002aeabc 0xe1000 + 1891004
    21  libdyld.dylib                   0x37625aae start + 2

    Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
    Thread 1:
    0   libsystem_kernel.dylib          0x376d824c kevent64 + 24
    1   libdispatch.dylib               0x375f84ec _dispatch_mgr_invoke + 276
    2   libdispatch.dylib               0x375f821e _dispatch_mgr_thread$VARIANT$mp + 34

    Thread 2:
    0   libsystem_kernel.dylib          0x376ec9c0 __workq_kernreturn + 8
    1   libsystem_pthread.dylib         0x37769e14 _pthread_wqthread + 788
    2   libsystem_pthread.dylib         0x37769aec start_wqthread + 4

    Thread 3:
    0   libsystem_kernel.dylib          0x376ec9c0 __workq_kernreturn + 8
    1   libsystem_pthread.dylib         0x37769e14 _pthread_wqthread + 788
    2   libsystem_pthread.dylib         0x37769aec start_wqthread + 4

    Thread 4 name:  Dispatch queue: FBSSerialQueue
    Thread 4:
    0   libsystem_kernel.dylib          0x376d84ec semaphore_wait_trap + 8
    1   libdispatch.dylib               0x375f5b8e _dispatch_semaphore_wait_slow + 186
    2   FrontBoardServices              0x2f699e9e __31-[FBSSerialQueue performAsync:]_block_invoke + 142
    3   libdispatch.dylib               0x375e7c80 _dispatch_call_block_and_release + 8
    4   libdispatch.dylib               0x375f24ce _dispatch_queue_drain$VARIANT$mp + 1458
    5   libdispatch.dylib               0x375f1d9c _dispatch_queue_invoke$VARIANT$mp + 80
    6   libdispatch.dylib               0x375f448e _dispatch_root_queue_drain + 386
    7   libdispatch.dylib               0x375f589e _dispatch_worker_thread3 + 102
    8   libsystem_pthread.dylib         0x37769d9a _pthread_wqthread + 666
    9   libsystem_pthread.dylib         0x37769aec start_wqthread + 4

    Thread 5:
    0   libsystem_kernel.dylib          0x376ec9c0 __workq_kernreturn + 8
    1   libsystem_pthread.dylib         0x37769e14 _pthread_wqthread + 788
    2   libsystem_pthread.dylib         0x37769aec start_wqthread + 4

    Thread 0 crashed with ARM Thread State (32-bit):
        r0: 0x16d715b0    r1: 0x00000000      r2: 0x004f01a4      r3: 0x004cbd17
        r4: 0x00000006    r5: 0x00000009      r6: 0x2c9cffaa      r7: 0x009df68c
        r8: 0x16d715b0    r9: 0x16d75ea8     r10: 0x00000001     r11: 0x2c9da936
        ip: 0x002ac5dd    sp: 0x009df684      lr: 0x0036d998      pc: 0x00000000
      cpsr: 0x60000010
ios
iphone
visual-studio-2013
xamarin
asked on Stack Overflow Jan 4, 2016 by Perrin Larson • edited Jan 5, 2016 by Perrin Larson

1 Answer

-1

Do you have use statements #if DEBUG in your code? Try to remove these statements on your code.

answered on Stack Overflow Nov 3, 2016 by Corrado Sortino • edited Nov 4, 2016 by Corrado Sortino

User contributions licensed under CC BY-SA 3.0