The Xamarin.iOS application instantly closes on the iPhone. The debugger will not be attached. The simulator does not start

I am trying to work with a small Xamarin.iOS application using Visual Studio 2013, Mac build host and physical iPhone for testing. Everything worked perfectly before the new years. I upgraded to Xamarin 4 on Mac, PC, and in Visual Studio. I do not know if this has anything to do with it. In the end, everything still works after the upgrade. The application started, the debugger connected and hit breakpoints or broke exceptions, Visual Studio connected to both the simulator and the physical device, etc.

I left for the New Year and returned today (Monday) to find out that for NO REASON WHATSOEVER - I made NO changes - the application immediately stops working when I try to run it for debugging on a physical iPhone. He was still working on a simulator. I tried to run the application on the iPhone itself (by touching its icon) with the same result. He flashes the shutter for a second and immediately goes to the main screen.

Starting from Visual Studio, SAYS that it started successfully, but will not hit breakpoints even in the main launch methods. The application also crashes while VS still says “Launch”, LONG before it says “Successfully Launched”.

I tried a few things to fix this. I checked the application ID in the Dummy Xcode project to make sure it told me to fix any problems - no problem. I tried deleting bin and obj files - no luck. I tried to manually remove the application from the iPhone before building and starting it again - it did not help. I tried to restart all systems: iPhone, Macintosh and Visual Studio ... and everything got GOOD.

Now I can’t even START iPhone simulator. Visual Studio says: “Failed to start iOS Simulator on mac: error on client vs2248Brock when executing message subject xvs / idb / 4.0.0.1717 / show-app”, and, of course, an attempt to start debugging on the simulator causes Visual Studio to hang on “Launch for debugging "for ages until it gets into debugging mode, as if it were attached to a running application - when it wasn’t - until I hit stop.

I can run the simulator manually in Xcode, but Visual Studio and / or the Xamarin build host that it works with can still not see that it even exists.

I don’t know which of these problems is connected, but I have nothing to do - nothing even gives me GUESS about where to start looking for the problem. Any ideas?

Note for answers: I have always been a PC / Windows fleet. I am brand new to Mac or iOS. So suppose I don’t know anything. If you offer me to check something, please do not just tell me what to check - tell me how to find and / or use a thing to check.

Examples. If you say that you want me to look at such a magazine, tell me how to view this magazine. Or, if you want me to "try to change this and this parameter to some value from xy-source that everyone knows about," suppose I don’t know anything about how to find either this parameter or the source of the value . Etc etc.

EDIT: A crash log from a recent attempt, up the stack trace. Asymmetrical lines in the track get stuck in this way. I tried manual symbolism. Found nothing 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 
+5
source share
1 answer

Do you have #if DEBUG instructions in your code? Try removing these instructions in your code.

-1
source

Source: https://habr.com/ru/post/1239837/


All Articles