简体   繁体   English

Xamarin应用程序在设备启动时崩溃,在模拟器中运行良好

[英]Xamarin app crashes on startup on device, works fine in simulator

Would appreciate any suggestions, using SDK6.1 with Xcode 5 on OS 10.8 非常感谢任何建议,在OS 10.8上使用SDK6.1和Xcode 5

The app crashes right after the splash and does not get to the debugger at all. 应用程序在启动后立即崩溃,根本没有进入调试器。 this happens on the TestFlight released version as well. 这也发生在TestFlight发布的版本上。 Tried on another computer with same results. 在另一台计算机上尝试了相同的结果。 Even tried to create a new sample Monotouch app and same results. 甚至试图创建一个新的样本Monotouch应用程序和相同的结果。

Jan 28 15:25:59 maimonphone backboardd[28] <Error>:     __hid_dispatch_pthread_root_queue_create_block_invoke: specific=0x14d832a0     pthread_self=0x4116000
Jan 28 15:25:59 maimonphone kernel[0] <Debug>: AppleSerialMultiplexer: mux-ad(eng)::setLinkQualityMetricGated: Setting link quality metric to 50
Jan 28 15:26:00 maimonphone kernel[0] <Debug>: launchd[695] Container: /private/var/mobile/Applications/C15EE9BA-4693-432B-899A-90340F54664E (sandbox)
Jan 28 15:26:00 maimonphone networkd[78] <Warning>: Analytics Engine: double ON for app: com.pacealert.app
Jan 28 15:26:00 maimonphone PaceAlert[695] <Warning>: MonoTouch: Added IP to look for MonoDevelop: 192.168.45.129
Jan 28 15:26:00 maimonphone PaceAlert[695] <Warning>: MonoTouch: MonoDevelop Port: 10000 Transport: WiFi
Jan 28 15:26:02 maimonphone PaceAlert[695] <Warning>: The assembly mscorlib.dll was not found or could not be loaded.
Jan 28 15:26:02 maimonphone PaceAlert[695] <Warning>: It should have been installed in the `/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/lib/mono/2.0/mscorlib.dll' directory.
Jan 28 15:26:02 maimonphone com.apple.launchd[1] (UIKitApplication:com.pacealert.app[0x1257][695]) <Error>: (UIKitApplication:com.pacealert.app[0x1257]) Exited with code: 1
Jan 28 15:26:02 maimonphone com.apple.launchd[1] (UIKitApplication:com.pacealert.app[0x1257]) <Notice>: (UIKitApplication:com.pacealert.app[0x1257]) Throttling respawn: Will start in 2147483645 seconds
Jan 28 15:26:02 maimonphone backboardd[28] <Warning>: Application 'UIKitApplication:com.pacealert.app[0x1257]' exited abnormally with exit status 1

It says something about a missing file but I am pretty sure it is there :-( 它说了一些丢失的文件,但我很确定它在那里:-(

------ some more from the console ---- Jan 28 16:30:12 maimonphone mobile_installation_proxy[261] : LaunchServices: Please include the kCFBundleIdentifierKey in the options dictionary when installing an app. ------更多来自控制台---- 1月28日16:30:12 maimonphone mobile_installation_proxy [261]:LaunchServices:安装应用时请在选项字典中包含kCFBundleIdentifierKey。 Jan 28 16:30:12 maimonphone mobile_installation_proxy[261] : LaunchServices: installing app for existing placeholder (null) Jan 28 16:30:12 maimonphone installd[225] : 0x201000 handle_install_for_ls: Install of "/var/mobile/Media/PublicStaging/PaceAlert.app" requested by mobile_installation_proxy Jan 28 16:30:12 maimonphone installd[225] : 0x201000 MobileInstallationInstall_Server: Installing app com.pacealert.app Jan 28 16:30:12 maimonphone SpringBoard[34] : Killing com.pacealert.app for termination assertion Jan 28 16:30:12 maimonphone installd[225] : 0x201000 install_application: Performing developer delta patch Jan 28 16:30:14 maimonphone installd[225] : 0x201000 MobileInstallationInstall_Server: Staging: 0.12s; 1月28日16:30:12 maimonphone mobile_installation_proxy [261]:LaunchServices:为现有占位符安装应用程序(null)1月28日16:30:12 maimonphone installd [225]:0x201000 handle_install_for_ls:安装“/ var / mobile / Media / PublicStaging /PaceAlert.app“由mobile_installation_proxy请求1月28日16:30:12 maimonphone installd [225]:0x201000 MobileInstallationInstall_Server:安装app com.pacealert.app 1月28日16:30:12 maimonphone SpringBoard [34]:杀死com.pacealert.app终止断言1月28日16:30:12 maimonphone installd [225]:0x201000 install_application:执行开发人员delta补丁1月28日16:30:14 maimonphone installd [225]:0x201000 MobileInstallationInstall_Server:Staging:0.12s; Waiting: 0.00s; 等待:0.00s; Installation: 2.46s; 安装:2.46s; LS Sync: 0.00s; LS同步:0.00s; Overall: 2.59s Jan 28 16:30:14 maimonphone lsd[221] : LaunchServices: Updating identifier store Jan 28 16:30:15 maimonphone SpringBoard[34] : libMobileGestalt MobileGestalt.c:835: nike-ipod is static and will never generate a notification Jan 28 16:30:15 maimonphone SpringBoard[34] : libMobileGestalt MobileGestalt.c:835: still-camera is static and will never generate a notification Jan 28 16:30:15 maimonphone SpringBoard[34] : libMobileGestalt MobileGestalt.c:835: magnetometer is static and will never generate a notification Jan 28 16:30:15 maimonphone SpringBoard[34] : libMobileGestalt MobileGestalt.c:835: any-telephony is static and will never generate a notification Jan 28 16:30:15 maimonphone SpringBoard[34] : libMobileGestalt MobileGestalt.c:835: stand-alone-contacts is static and will never generate a notification Jan 28 16:30:19 maimonphone MobileStorageMounter[770] : 0x3d5c218c digest_disk_image: Could not open /var/run/mobile_image_mounter/7MyG0L.dmg: No such file or directory 总体:2.59s 1月28日16:30:14 maimonphone lsd [221]:LaunchServices:更新标识符存储Jan 28 16:30:15 maimonphone SpringBoard [34]:libMobileGestalt MobileGestalt.c:835:nike-ipod是静态的,永远不会生成通知1月28日16:30:15 maimonphone SpringBoard [34]:libMobileGestalt MobileGestalt.c:835:静态相机是静态的,永远不会生成通知1月28日16:30:15 maimonphone SpringBoard [34]:libMobileGestalt MobileGestalt。 c:835:磁力计是静态的,永远不会产生通知Jan 28 16:30:15 maimonphone SpringBoard [34]:libMobileGestalt MobileGestalt.c:835:any-telephony是静态的,永远不会产生通知Jan 28 16:30: 15 maimonphone SpringBoard [34]:libMobileGestalt MobileGestalt.c:835:独立联系人是静态的,永远不会生成通知1月28日16:30:19 maimonphone MobileStorageMounter [770]:0x3d5c218c digest_disk_image:无法打开/ var / run /mobile_image_mounter/7MyG0L.dmg:没有这样的文件或目录 Jan 28 16:30:19 maimonphone MobileStorageMounter[770] : 0x3d5c218c reload_mount_map: /Developer - could not create digest Jan 28 16:30:19 maimonphone mobile_storage_proxy[769] : 0x3d5c218c handle_lookup_image: Entry 2 of 4 did not have a digest 1月28日16:30:19 maimonphone MobileStorageMounter [770]:0x3d5c218c reload_mount_map:/ Developer - 无法创建摘要1月28日16:30:19 maimonphone mobile_storage_proxy [769]:0x3d5c218c handle_lookup_image:第2条,共4条没有摘要

Jan 28 16:30:20 maimonphone MobileStorageMounter[770] <Error>: 0x3d5c218c handle_mount_disk_image: A disk image of type Developer is already mounted
Jan 28 16:30:20 maimonphone mobile_storage_proxy[769] <Error>: MobileStorageMount:355 Could not extract mount path from response message
Jan 28 16:30:20 maimonphone mobile_storage_proxy[769] <Error>: 0x3d5c218c handle_mount_image: Could not mount the disk image
Jan 28 16:30:20 maimonphone mobile_storage_proxy[769] <Error>: 0x3d5c218c main: Could not mount the image

Jan 28 16:30:23 maimonphone com.apple.debugserver-300.2[771] <Warning>: debugserver-300.2 for armv7.
Jan 28 16:30:23 maimonphone com.apple.debugserver-300.2[771] <Warning>: Connecting to com.apple.debugserver service...
Jan 28 16:30:25 maimonphone locationd[53] <Warning>: NStatManagerHandleSrcCounts:1549 couldn't find NStatSourceRef for 5522
Jan 28 16:30:25 maimonphone locationd[53] <Warning>: NStatManagerHandleSrcDescriptor:1214 update descriptor for invalid source
Jan 28 16:30:26 maimonphone com.apple.debugserver-300.2[772] <Warning>: debugserver-300.2 for armv7.
Jan 28 16:30:26 maimonphone com.apple.debugserver-300.2[772] <Warning>: Connecting to com.apple.debugserver service...
Jan 28 16:30:26 maimonphone com.apple.debugserver-300.2[772] <Warning>: Got a connection, waiting for process information for launching or attaching.
Jan 28 16:30:26 maimonphone com.apple.debugserver-300.2[772] <Warning>: About to launch process for bundle ID: com.pacealert.app
Jan 28 16:30:26 maimonphone backboardd[28] <Error>: __hid_dispatch_pthread_root_queue_create_block_invoke: specific=0x14d832a0 pthread_self=0x433d000
Jan 28 16:30:26 maimonphone backboardd[28] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=1
Jan 28 16:30:26 maimonphone wifid[15] <Notice>: WiFi:[412612226.455532]: ATJManager: setting ask-to-join interaction mode to Interactive
Jan 28 16:30:26 maimonphone wifid[15] <Notice>: WiFi:[412612226.456357]: ATJManager: no entries to purge
Jan 28 16:30:26 maimonphone wifid[15] <Notice>: WiFi:[412612226.456922]: Device is UNLOCKED
Jan 28 16:30:26 maimonphone wifid[15] <Notice>: WiFi:[412612226.457431]: Ignoring lock state
Jan 28 16:30:26 maimonphone wifid[15] <Notice>: WiFi:[412612226.457943]: problematic networks =  and potentially problematic networks =
Jan 28 16:30:26 maimonphone wifid[15] <Notice>: WiFi:[412612226.458562]: Unblacklisting
Jan 28 16:30:26 maimonphone wifid[15] <Notice>: WiFi:[412612226.463413]: No change in Background Scan candidates. Skip re-programming Background Scan
Jan 28 16:30:26 maimonphone wifid[15] <Notice>: WiFi:[412612226.509190]: Already connected to MY_NETWORK.
Jan 28 16:30:26 maimonphone wifid[15] <Notice>: WiFi:[412612226.510816]: Device display is ON
Jan 28 16:30:26 maimonphone wifid[15] <Notice>: WiFi:[412612226.513297]: Already connected to MY_NETWORK.
Jan 28 16:30:26 maimonphone kernel[0] <Debug>: set_crc_notification_state 0
Jan 28 16:30:26 maimonphone kernel[0] <Debug>: ALS: AppleARMBacklight::handleMessageGated - framebufferState -> 1
Jan 28 16:30:26 maimonphone kernel[0] <Debug>: ALS: AppleARMBacklight::setBacklightEnableGated 1 (set level to 0x68a)
Jan 28 16:30:26 maimonphone backboardd[28] <Notice>: MultitouchHID: device bootloaded
Jan 28 16:30:26 maimonphone backboardd[28] <Notice>: MultitouchHID: detection mode: 255->0 (deferring until bootloaded)
Jan 28 16:30:26 maimonphone backboardd[28] <Notice>: MultitouchHID: detection mode: 0->0
Jan 28 16:30:28 maimonphone wifid[15] <Notice>: WiFi:[412612228.766440]: BG Application: Not Present, BG Daemon: Present. Daemons: apsd networkd
Jan 28 16:30:28 maimonphone wifid[15] <Notice>: WiFi:[412612228.767826]: Already connected to MY_NETWORK.
Jan 28 16:30:29 maimonphone kernel[0] <Debug>: launchd[773] Container: /private/var/mobile/Applications/C15EE9BA-4693-432B-899A-90340F54664E (sandbox)
Jan 28 16:30:29 maimonphone networkd[78] <Warning>: Analytics Engine: double ON for app: com.pacealert.app
Jan 28 16:30:29 maimonphone com.apple.debugserver-300.2[772] <Warning>: In completion handler, got pid for bundle id, pid: 773.
Jan 28 16:30:29 maimonphone com.apple.debugserver-300.2[772] <Warning>: Got a connection, launched process /Developer/usr/bin/debugserver.

Jan 28 16:30:29 maimonphone com.apple.debugserver-300.2[772] <Warning>: 1 +0.000000 sec [0304/060b]: error: ::ptrace (request = PT_THUPDATE, pid = 0x0305, tid = 0x2503, signal = -1) err = Invalid argument (0x00000016)
Jan 28 16:30:29 maimonphone com.apple.debugserver-300.2[772] <Warning>: 2 +0.053023 sec [0304/1c0b]: error: ::read ( -1, 0x2849ec, 18446744069414585344 ) => -1 err = Bad file descriptor (0x00000009)
Jan 28 16:30:29 maimonphone com.apple.debugserver-300.2[771] <Warning>: 1 +0.000000 sec [0303/060b]: error: ::read ( 6, 0x27da5dcc, 1024 ) => 0 err = Function not implemented (0x0000004e)
Jan 28 16:30:29 maimonphone com.apple.debugserver-300.2[771] <Warning>: Exiting.
Jan 28 16:30:29 maimonphone mobile_installation_proxy[261] <Error>: 0x19c7000 handle_connection: Could not receive request from host.
Jan 28 16:30:29 maimonphone mobile_installation_proxy[261] <Error>: 0x181000 handle_connection: Could not receive request from host.
Jan 28 16:30:29 maimonphone com.apple.debugserver-300.2[772] <Warning>: Exiting.
Jan 28 16:30:30 maimonphone PaceAlert[773] <Warning>: MonoTouch: Added IP to look for MonoDevelop: 192.168.45.129
Jan 28 16:30:30 maimonphone PaceAlert[773] <Warning>: MonoTouch: MonoDevelop Port: 10000 Transport: USB
Jan 28 16:30:30 maimonphone PaceAlert[773] <Warning>: MonoTouch: Successfully received USB connection from MonoDevelop on port 10000, fd: 5
Jan 28 16:30:30 maimonphone PaceAlert[773] <Warning>: MonoTouch: Processing: 'start debugger: sdb'
Jan 28 16:30:30 maimonphone PaceAlert[773] <Warning>: MonoTouch: Successfully received USB connection from MonoDevelop on port 10000, fd: 6
Jan 28 16:30:30 maimonphone PaceAlert[773] <Warning>: MonoTouch: Processing: 'connect output'
Jan 28 16:30:30 maimonphone PaceAlert[773] <Warning>: MonoTouch: Debugger loaded with custom transport (fd: 5)
Jan 28 16:30:30 maimonphone PaceAlert[773] <Warning>: MonoTouch: Successfully received USB connection from MonoDevelop on port 10000, fd: 7
Jan 28 16:30:30 maimonphone PaceAlert[773] <Warning>: MonoTouch: Processing: 'start profiler: no'
Jan 28 16:30:30 maimonphone PaceAlert[773] <Warning>: The assembly mscorlib.dll was not found or could not be loaded.
Jan 28 16:30:30 maimonphone PaceAlert[773] <Warning>: It should have been installed in the `/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/lib/mono/2.0/mscorlib.dll' directory.
Jan 28 16:30:30 maimonphone com.apple.launchd[1] (UIKitApplication:com.pacealert.app[0x22ee][773]) <Error>: (UIKitApplication:com.pacealert.app[0x22ee]) Exited with code: 1
Jan 28 16:30:30 maimonphone com.apple.launchd[1] (UIKitApplication:com.pacealert.app[0x22ee]) <Notice>: (UIKitApplication:com.pacealert.app[0x22ee]) Throttling respawn: Will start in 2147483646 seconds
Jan 28 16:30:30 maimonphone backboardd[28] <Warning>: Application 'UIKitApplication:com.pacealert.app[0x22ee]' exited abnormally with exit status 1
Jan 28 16:30:30 maimonphone wifid[15] <Notice>: WiFi:[412612230.488133]: BG Application: Not Present, BG Daemon: Present. Daemons: apsd networkd

Jan 28 16:30:32 maimonphone backboardd[28] : __hid_dispatch_pthread_root_queue_create_block_invoke: specific=0x14d832a0 pthread_self=0x433d000 1月28日16:30:32 maimonphone backboardd [28]:__ hid_dispatch_pthread_root_queue_create_block_invoke:specific = 0x14d832a0 pthread_self = 0x433d000

Unbelievable... the solution was to install the Xcode command line tools . 令人难以置信......解决方案是安装Xcode命令行工具

This is (easily!) done from the Xcode->Preference->Downloads menu. 这是(轻松!)从Xcode-> Preference-> Downloads菜单完成的。

I have spent hours on this today, I hope this helps some other poor fellow. 我今天花了好几个小时,希望这有助于其他一些可怜的家伙。

I discovered my problem was actually something else. 我发现我的问题其实是别的。 This will happen if your app 'takes too long to start'. 如果您的应用“启动时间太长”,就会发生这种情况。 I was kind of aware of this, but my app had always started fine previously and I didn't realise this was the issue. 我有点意识到这一点,但我的应用程序以前一直很好,我没有意识到这是问题所在。

It seems I had turned on 'break on all exceptions' and a number of components I am now using (such as Xamarin Insights, the Initialize method) throw exceptions internally which cause the debugger to break (even though you can continue from the harmless exception). 看起来我已经打开'中断所有异常'和我现在使用的一些组件(例如Xamarin Insights,Initialize方法)在内部抛出异常导致调试器中断(即使你可以从无害的异常继续)。

The process of capturing the exceptions and marshalling them back to VS can take quite a while (seconds sometimes), and in my case two or three of these on start-up was enough to have iOS kill the app process for misbehaving. 捕获异常并将它们编组回VS的过程可能需要相当长的时间(有时是几秒),在我的情况下,启动时中的两个或三个足以让iOS因行为不端而导致应用程序进程无效。 I never actually saw the errors because the process terminated too soon for the data to come back to VS, so I didn't know what was going on. 我从来没有真正看到过这些错误,因为这个过程很快就终止了数据回到VS,所以我不知道发生了什么。

Turning off break on all exceptions, at least until after the app starts, works around this. 关闭所有异常中断,至少在应用程序启动之后,解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM