我有一個iPad應用程序,我一直在模擬器上開發(xcode 4,md 2.8,mt 5)。但是,當我嘗試部署到設備時,應用程序在啓動時崩潰。 xcode中沒有崩潰日誌,控制檯窗口不顯示任何錯誤。Monotouch應用程序不會在設備上啓動,但在模擬器中工作正常
然而,當我從終端我得到以下輸出運行的MonoTouch:
富的MacBook-Pro的:〜rich3 $ /開發商/ MonoTouch中的/ usr/bin中/ mTouch觸摸--debugsim = $ /私營/ VAR /移動/應用/ 31A80564-0CEF-4F4B-AE9D-6A1938510393 無效指定SDK:3.2 堆棧跟蹤:
在(包裝管理到本機)MonoTouch.ObjCRuntime.Messaging.void_objc_msgSend_intptr_intptr_bool(IntPtr的,IntPtr的,IntPtr的,intptr,bool)< 0xffffffff> at MonoTouch.Foundation.NSObject.Dispose(bool)< 0x0009f> 在MonoTouch.Foundation.NSObject.Finalize()< 0x00016> 在(包裝紙運行時調用)object.runtime_invoke_virtual_void_ 此 _(對象,IntPtr的,IntPtr的,IntPtr的)<爲0xffffffff>
母語堆棧跟蹤:
從GDB0 mtouch 0x000ec183 WriteZStream + 955779
1 mtouch 0x0001bd4f WriteZStream + 102735
2 libsystem_c.dylib 0x9020459b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 Foundation 0x9a0603de -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 160
5 ??? 0x027d5884 0x0 + 41769092
6 ??? 0x027d0e40 0x0 + 41750080
7 ??? 0x027d559f 0x0 + 41768351
8 ??? 0x025e5551 0x0 + 39736657
9 mtouch 0x001a76c4 WriteZStream + 1723076
10 mtouch 0x001a968a WriteZStream + 1731210
11 mtouch 0x001a98c4 WriteZStream + 1731780
12 mtouch 0x002735c1 WriteZStream + 2558401
13 mtouch 0x00273677 WriteZStream + 2558583
14 mtouch 0x002b8b0e WriteZStream + 2842382
15 mtouch 0x002f31d8 WriteZStream + 3081688
16 libsystem_c.dylib 0x901aced9 _pthread_start + 335
17 libsystem_c.dylib 0x901b06de thread_start + 34
調試信息:
/tmp/mono-gdb-commands.1eukTW:1: Error in sourced command file:
unable to debug self
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Abort trap: 6
更新: 我終於我的問題明確了兩件事情。當使用AOT(而這需要在iOS設備 執行)
泛型和值類型不玩 得很好。所以我需要改變一個查詢: 來自:'CSDatabase.RunQuery(「select max(VersionNbr)from schema_version」)。FirstOrDefault();' 致:CSDatabase.RunQuery(「select max(VersionNbr)from schema_version」)。First();
接下來,我需要在構建過程中爲蹦牀(-aot「nimt-trampolines = 2048」)添加參數並且僅鏈接monodouch sdk。這清除了我的其他問題。
添加--sdk = 5.0肯定有幫助。但是我在啓動時看到的是mono.data.sqlite中的問題 線程啓動: at Mono.Data.Sqlite.SqliteStatement.BindParameter(Int32 index,Mono.Data.Sqlite.SqliteParameter param)[0x00000] in:0 at Mono.Data.Sqlite.SqliteCommand.BuildNextCommand()[0x00000] in :0 開始線程: –
很高興幫助。但是,其餘消息只顯示不完整的堆棧跟蹤(缺少異常類型/消息)。請按照我的步驟和**編輯**您自己的問題(因爲其中的錯誤是不感興趣/修復)或填寫錯誤報告。謝謝! – poupou