This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 32947 - App just hangs on iOS9 device with iOS9 SDK
Summary: App just hangs on iOS9 device with iOS9 SDK
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll (show other bugs)
Version: XI 8.99 (iOS9 previews)
Hardware: PC Mac OS
: --- normal
Target Milestone: ios9/Xcode7/OSX10.11
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-08-11 05:22 UTC by Christer Nordvik
Modified: 2015-11-24 08:00 UTC (History)
5 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Crash (19.96 KB, application/zip)
2015-08-11 05:23 UTC, Christer Nordvik
Details
zipped test project (6.34 KB, application/zip)
2015-08-11 09:18 UTC, Rolf Bjarne Kvinge
Details

Description Christer Nordvik 2015-08-11 05:22:42 UTC
It's terminated due to the 20 sec timeout. Attached logs. On the simulator the app starts fine (but crashes after a while).
Comment 1 Christer Nordvik 2015-08-11 05:23:02 UTC
Created attachment 12443 [details]
Crash
Comment 2 Rolf Bjarne Kvinge 2015-08-11 06:45:25 UTC
The NDC2010 crash report seems to be about PLCrashReporter:

> 0   NDC2010                       	0x00057bb0 plcrash_async_macho_next_command + 88
> 1   NDC2010                       	0x00057bb1 plcrash_async_macho_next_command + 89
> 2   NDC2010                       	0x00057a05 plcrash_nasync_macho_init + 289
> 3   NDC2010                       	0x000572ed plcrash_nasync_image_list_append + 37
> 4   NDC2010                       	0x000503cf image_add_callback + 39
> 5   dyld                          	0x1fe978d5 dyld::registerAddCallback(void (*)(mach_header const*, long)) + 225
> 6   libdyld.dylib                 	0x365bb8e3 _dyld_register_func_for_add_image + 51
> 7   NDC2010                       	0x00050399 +[PLCrashReporter initialize] + 117

can you try disabling PLCrashReporter?

The other crash report (hang_device.crash) is an iOS process, not your own:

> Process:             hangtracerd [100]
> Path:                /usr/libexec/hangtracerd

so this is not related to your app (or maybe it is, but it's an iOS bug we can do nothing about).
Comment 3 Christer Nordvik 2015-08-11 06:52:14 UTC
Is it Xamarin Insights that uses PLCrashReporter? I'll give it a go and remove that one.
Comment 4 Rolf Bjarne Kvinge 2015-08-11 06:53:18 UTC
Yes, Insights is using PLCrashReporter.
Comment 5 Christer Nordvik 2015-08-11 08:24:35 UTC
I removed it and the app started in flight mode. I turned off flight mode but then the app crashes on launch. Seems the .NET backgroundworker code when registering with Urban Airship and our server is having some issues. 

2015-08-11 14:14:29.721 NDC2010[506:82757] error: * Assertion at ../../../../../mono/mono/metadata/threadpool-ms-io.c:478, condition `async_read_handler_class' not met
2015-08-11 14:14:29.721 NDC2010[506:82757] critical: Stacktrace:

2015-08-11 14:14:29.721 NDC2010[506:82757] critical:   at <unknown> <0xffffffff>
2015-08-11 14:14:29.722 NDC2010[506:82757] critical:   at (wrapper managed-to-native) object.__icall_wrapper_mono_delegate_begin_invoke (object,intptr) <0xffffffff>
2015-08-11 14:14:29.722 NDC2010[506:82757] critical:   at (wrapper delegate-begin-invoke) <Module>.begin_invoke_IAsyncResult__this___object_AsyncCallback_object (object,System.AsyncCallback,object) <0xffffffff>
2015-08-11 14:14:29.722 NDC2010[506:82757] critical:   at System.ComponentModel.BackgroundWorker.RunWorkerAsync (object) [0x00035] in /Users/builder/data/lanes/1898/76b48304/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System/compmod/system/componentmodel/BackgroundWorker.cs:192
2015-08-11 14:14:29.722 NDC2010[506:82757] critical:   at System.ComponentModel.BackgroundWorker.RunWorkerAsync () [0x00000] in /Users/builder/data/lanes/1898/76b48304/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System/compmod/system/componentmodel/BackgroundWorker.cs:178
2015-08-11 14:14:29.722 NDC2010[506:82757] critical:   at NDC2010.AppDelegate.RegisteredForRemoteNotifications (UIKit.UIApplication,Foundation.NSData) [0x00073] in /Users/cnordvik/projects/git/FotMob-iOS/NDC2010/AppDelegate.cs:100
2015-08-11 14:14:29.722 NDC2010[506:82757] critical:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
2015-08-11 14:14:29.722 NDC2010[506:82757] critical:   at <unknown> <0xffffffff>
2015-08-11 14:14:29.723 NDC2010[506:82757] critical:   at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0xffffffff>
2015-08-11 14:14:29.723 NDC2010[506:82757] critical:   at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Users/builder/data/lanes/1898/76b48304/source/maccore/src/UIKit/UIApplication.cs:74
2015-08-11 14:14:29.723 NDC2010[506:82757] critical:   at UIKit.UIApplication.Main (string[],string,string) [0x0001c] in /Users/builder/data/lanes/1898/76b48304/source/maccore/src/UIKit/UIApplication.cs:57
2015-08-11 14:14:29.723 NDC2010[506:82757] critical:   at NDC2010.NDC2010Application.Main (string[]) [0x00106] in /Users/cnordvik/projects/git/FotMob-iOS/NDC2010/AppDelegate.cs:1618
2015-08-11 14:14:29.723 NDC2010[506:82757] critical:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
2015-08-11 14:14:29.723 NDC2010[506:82757] critical: 
Native stacktrace:

2015-08-11 14:14:29.788 NDC2010[506:82757] critical: 	0   NDC2010                             0x0135fd6d mono_handle_native_sigsegv + 240
2015-08-11 14:14:29.788 NDC2010[506:82757] critical: 	1   NDC2010                             0x01364aa1 sigabrt_signal_handler + 100
2015-08-11 14:14:29.788 NDC2010[506:82757] critical: 	2   libsystem_platform.dylib            0x3672785f _sigtramp + 42
2015-08-11 14:14:29.788 NDC2010[506:82757] critical: 	3   libsystem_pthread.dylib             0x3672bb5b pthread_kill + 62
2015-08-11 14:14:29.789 NDC2010[506:82757] critical: 	4   libsystem_c.dylib                   0x36623f51 abort + 108
2015-08-11 14:14:29.789 NDC2010[506:82757] critical: 	5   NDC2010                             0x01433410 _ZL12log_callbackPKcS0_S0_iPv + 80
2015-08-11 14:14:29.789 NDC2010[506:82757] critical: 	6   NDC2010                             0x0140f325 log_adapter + 164
2015-08-11 14:14:29.789 NDC2010[506:82757] critical: 	7   NDC2010                             0x0141a959 monoeg_assertion_message + 84
2015-08-11 14:14:29.789 NDC2010[506:82757] critical: 	8   NDC2010                             0x013d4315 mono_threadpool_ms_io_cleanup + 0
2015-08-11 14:14:29.789 NDC2010[506:82757] critical: 	9   NDC2010                             0x013d59f9 mono_threadpool_ms_begin_invoke + 232
2015-08-11 14:14:29.789 NDC2010[506:82757] critical: 	10  NDC2010                             0x013a3b6f mono_delegate_begin_invoke + 90
2015-08-11 14:14:29.789 NDC2010[506:82757] critical: 	11  NDC2010                             0x007f0ba0 wrapper_managed_to_native_object___icall_wrapper_mono_delegate_begin_invoke_object_intptr + 100
2015-08-11 14:14:29.790 NDC2010[506:82757] critical: 	12  NDC2010                             0x0094a9e4 wrapper_delegate_begin_invoke__Module_begin_invoke_IAsyncResult__this___object_AsyncCallback_object_object_System_AsyncCallback_object + 120
2015-08-11 14:14:29.790 NDC2010[506:82757] critical: 	13  NDC2010                             0x008637c0 System_ComponentModel_BackgroundWorker_RunWorkerAsync_object + 108
2015-08-11 14:14:29.790 NDC2010[506:82757] critical: 	14  NDC2010                             0x00863748 System_ComponentModel_BackgroundWorker_RunWorkerAsync + 32
2015-08-11 14:14:29.790 NDC2010[506:82757] critical: 	15  NDC2010                             0x001018f0 NDC2010_AppDelegate_RegisteredForRemoteNotifications_UIKit_UIApplication_Foundation_NSData + 1116
2015-08-11 14:14:29.790 NDC2010[506:82757] critical: 	16  NDC2010                             0x007ee304 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 256
2015-08-11 14:14:29.791 NDC2010[506:82757] critical: 	17  NDC2010                             0x0136906b mono_jit_runtime_invoke + 1150
2015-08-11 14:14:29.791 NDC2010[506:82757] critical: 	18  NDC2010                             0x013b8a91 mono_runtime_invoke + 88
2015-08-11 14:14:29.791 NDC2010[506:82757] critical: 	19  NDC2010                             0x01197455 _ZL31native_to_managed_trampoline_14P11objc_objectP13objc_selectorPP11_MonoMethodS0_S0_PKcS7_S7_S7_ + 424
2015-08-11 14:14:29.791 NDC2010[506:82757] critical: 	20  NDC2010                             0x0119f241 -[AppDelegate application:didRegisterForRemoteNotificationsWithDeviceToken:] + 100
2015-08-11 14:14:29.791 NDC2010[506:82757] critical: 	21  libdispatch.dylib                   0x36593f8f <redacted> + 10
2015-08-11 14:14:29.791 NDC2010[506:82757] critical: 	22  libdispatch.dylib                   0x36593f7b <redacted> + 22
2015-08-11 14:14:29.791 NDC2010[506:82757] critical: 	23  libdispatch.dylib                   0x36598789 _dispatch_main_queue_callback_4CF + 1532
2015-08-11 14:14:29.791 NDC2010[506:82757] critical: 	24  CoreFoundation                      0x246d2175 <redacted> + 8
2015-08-11 14:14:29.791 NDC2010[506:82757] critical: 	25  CoreFoundation                      0x246d066f <redacted> + 1590
2015-08-11 14:14:29.791 NDC2010[506:82757] critical: 	26  CoreFoundation                      0x24622d89 CFRunLoopRunSpecific + 516
2015-08-11 14:14:29.792 NDC2010[506:82757] critical: 	27  CoreFoundation                      0x24622b7d CFRunLoopRunInMode + 108
2015-08-11 14:14:29.792 NDC2010[506:82757] critical: 	28  GraphicsServices                    0x2d62caf9 GSEventRunModal + 160
2015-08-11 14:14:29.792 NDC2010[506:82757] critical: 	29  UIKit                               0x2884b99d UIApplicationMain + 144
2015-08-11 14:14:29.792 NDC2010[506:82757] critical: 	30  NDC2010                             0x005d58dc wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 272
2015-08-11 14:14:29.792 NDC2010[506:82757] critical: 	31  NDC2010                             0x00565904 UIKit_UIApplication_Main_string___intptr_intptr + 52
2015-08-11 14:14:29.792 NDC2010[506:82757] critical: 	32  NDC2010                             0x005658c4 UIKit_UIApplication_Main_string___string_string + 204
2015-08-11 14:14:29.792 NDC2010[506:82757] critical: 	33  NDC2010                             0x00124c2c NDC2010_NDC2010Application_Main_string__ + 2232
2015-08-11 14:14:29.793 NDC2010[506:82757] critical: 	34  NDC2010                             0x007ee304 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 256
2015-08-11 14:14:29.793 NDC2010[506:82757] critical: 	35  NDC2010                             0x0136906b mono_jit_runtime_invoke + 1150
2015-08-11 14:14:29.793 NDC2010[506:82757] critical: 	36  NDC2010                             0x013b8a91 mono_runtime_invoke + 88
2015-08-11 14:14:29.793 NDC2010[506:82757] critical: 	37  NDC2010                             0x013bc153 mono_runtime_exec_main + 282
2015-08-11 14:14:29.793 NDC2010[506:82757] critical: 	38  NDC2010                             0x013bbf9d mono_runtime_run_main + 460
2015-08-11 14:14:29.793 NDC2010[506:82757] critical: 	39  NDC2010                             0x013562c5 mono_jit_exec + 48
2015-08-11 14:14:29.793 NDC2010[506:82757] critical: 	40  NDC2010                             0x0144bb48 xamarin_main + 2072
2015-08-11 14:14:29.793 NDC2010[506:82757] critical: 	41  NDC2010                             0x011bf4f9 main + 112
2015-08-11 14:14:29.793 NDC2010[506:82757] critical: 	42  libdyld.dylib                       0x365bc873 <redacted> + 2
2015-08-11 14:14:29.793 NDC2010[506:82757] critical: 
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Comment 6 Rolf Bjarne Kvinge 2015-08-11 08:47:30 UTC
That's a bug in our code, you can reproduce on the simulator by linking all assemblies, not only SDK assemblies.
Comment 7 Rolf Bjarne Kvinge 2015-08-11 09:18:15 UTC
Created attachment 12446 [details]
zipped test project

Attaching simpler test project.
Comment 8 Rolf Bjarne Kvinge 2015-08-11 09:19:26 UTC
PRs for mono created: https://github.com/mono/mono/pull/1973 and https://github.com/mono/mono/pull/1974
Comment 9 Christer Nordvik 2015-08-11 16:36:38 UTC
Is there any way to work around this bug while we wait for a fix? Or is it possible to get a version built of Mono with this pull request included?
Comment 10 Sebastien Pouliot 2015-08-13 11:46:33 UTC
For workarounds (until the next preview) try adding

> var x = typeof (System.Net.Sockets.SocketAsyncCallback);
> var y = typeof (System.Diagnostics.Process);

to your FinishedLaunching method.

If it does not work add `linkskip=System` to your "Additional mtouch arguments".
Comment 11 Rolf Bjarne Kvinge 2015-08-13 11:51:15 UTC
Fixed.

maccore/master: 91d4cae4c80bb19bea1ee5777284bd4d8094f86b
maccore/xcode7: 492d0eb5345c4643a3a27479c9470b1b31ea8d63
Comment 12 Shane 2015-11-02 18:06:00 UTC
I have this exact same crash currently but it's only happening on iPhone 6s PLUS. I'm hitting it RIGHT NOW on 1.11.1. Do you know if 1.11.2 fixes this? 1.11.2 was posted today and this bug report is a month and a half old so it seems that it would have been fixed earlier.
Comment 13 Shane 2015-11-02 18:13:47 UTC
Note: I'm using both Flurry and insights, so it's possible that it's flurry and not insights causing the exact same issue. I'll look into it further.
Comment 14 Shane 2015-11-02 21:32:35 UTC
I updated to latest on both and it was fixed. Sorry to bother.
Comment 15 Seifer 2015-11-24 08:00:47 UTC
Just faced on the issue.

Update Xamarin.Insights NuGet package from 1.11.1 to 1.11.2 fixes the issue!

Note You need to log in before you can comment on or make changes to this bug.