0
我在這裏遇到了一些問題。我已經在Monotouch中完全開發了我的應用程序並在模擬器上進行了測試。一切工作,因爲它是假設。當我在調試或發佈時將應用程序發佈到我的iPhone上時,它會將應用程序上傳到設備,但我接受了以下堆棧跟蹤,當我嘗試在設備上啓動應用程序時,顯示啓動圖像,然後它只是意外退出。對不起,但這是我所有的信息,我希望有人能幫助我。當發佈到iPhone時,MonoTouch應用程序無法正常工作
堆棧跟蹤:
Please ensure your device is connected...
Connected to: JJ iPhone
2012-08-27 19:48:24.841 mtouch[1070:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
*** Call stack at first throw:
(
0 CoreFoundation 0x9769eb67 __raiseError + 231
1 libobjc.A.dylib 0x9a622149 objc_exception_throw + 155
2 CoreFoundation 0x975a7bc6 -[__NSArrayM insertObject:atIndex:] + 150
3 CoreFoundation 0x975a7b20 -[__NSArrayM addObject:] + 64
4 DTDeviceKitBase 0x03cdfdaf __DTDKDeviceSupportSearchPathURLs_block_invoke_0 + 451
5 libdispatch.dylib 0x962dca6f dispatch_once_f + 50
6 libdispatch.dylib 0x962dca38 dispatch_once + 31
7 DTDeviceKitBase 0x03cdfe95 DTDKDeviceSupportURLs + 104
8 DTDeviceKitBase 0x03ce0348 __DTDKMappedDeveloperDiskImageURLs_block_invoke_0 + 23
9 libdispatch.dylib 0x962dca6f dispatch_once_f + 50
10 libdispatch.dylib 0x962dca38 dispatch_once + 31
11 DTDeviceKitBase 0x03ce11be __72+[DTDKDeviceSupportFiles _inexactDeveloperDiskImageForVersion:andBuild:]_block_invoke_0141 + 125
12 libdispatch.dylib 0x962db126 _dispatch_barrier_sync_f_invoke + 30
13 libdispatch.dylib 0x962db5b6 dispatch_barrier_sync_f + 87
14 libdispatch.dylib 0x962db70c dispatch_sync + 45
15 DTDeviceKitBase 0x03ce0fea +[DTDKDeviceSupportFiles _inexactDeveloperDiskImageForVersion:andBuild:] + 228
16 DTDeviceKitBase 0x03ce0ef8 +[DTDKDeviceSupportFiles idealDeveloperDiskImageForVersion:andBuild:allowFallback:] + 54
17 ??? 0x02797d2c 0x0 + 41516332
18 ??? 0x02796d74 0x0 + 41512308
19 ??? 0x02796764 0x0 + 41510756
20 ??? 0x02796260 0x0 + 41509472
21 ??? 0x02796218 0x0 + 41509400
22 ??? 0x02795230 0x0 + 41505328
23 ??? 0x02795037 0x0 + 41504823
24 ??? 0x027d6048 0x0 + 41771080
25 MobileDevice 0x03b58bcf _AMDDeviceAttachedCallbackv3 + 163
26 MobileDevice 0x03b0e22d USBMuxIntCFSocketCallback + 1633
27 CoreFoundation 0x975b7edb __CFSocketPerformV0 + 1163
28 CoreFoundation 0x9756b3df __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
29 CoreFoundation 0x9756ad96 __CFRunLoopDoSources0 + 246
30 CoreFoundation 0x97594c68 __CFRunLoopRun + 1112
31 CoreFoundation 0x9759447c CFRunLoopRunSpecific + 332
32 CoreFoundation 0x975a51a1 CFRunLoopRun + 129
33 ??? 0x02794f4c 0x0 + 41504588
34 ??? 0x02794f14 0x0 + 41504532
35 ??? 0x02755c98 0x0 + 41245848
36 ??? 0x02755b98 0x0 + 41245592
37 ??? 0x0218cf60 0x0 + 35180384
38 ??? 0x02186db0 0x0 + 35155376
39 ??? 0x02189216 0x0 + 35164694
40 mtouch 0x0001caef WriteZStream + 102623
41 mtouch 0x0022f61a WriteZStream + 2276362
42 mtouch 0x0023213c WriteZStream + 2287404
43 mtouch 0x002313a1 WriteZStream + 2283921
44 mtouch 0x000b878f WriteZStream + 740735
45 mtouch 0x000b89e0 WriteZStream + 741328
46 mtouch 0x000bae4f WriteZStream + 750655
47 mtouch 0x00002eb3 mtouch + 7859
48 mtouch 0x00002755 mtouch + 5973
49 ??? 0x0000000b 0x0 + 11
)
我現在知道我可能聽起來愚蠢的,但我是新來的iPhone和MonoTouch的發展,而且不知道如何閱讀或解釋這一點。任何幫助將不勝感激。
使用mtouch堆棧跟蹤特別困難。根據我的經驗,單步執行代碼並找到引發錯誤的部分要容易得多。 – Candide
嗨@Ingenu。你看這就是問題所在。只有在發佈到設備時纔會發生這種情況。即使在發佈到設備時以調試模式遍歷代碼時,我也不會到達第一個斷點。它發生在那之前。 –
我發現模擬器在開發過程中不可靠。這種問題幾乎總是在最終在真實設備上進行測試時纔會出現。我的建議是你應該只開發/測試真正的iphones/ipads /或ipod遊戲。 – mark