objective-c - 单点触控设备只会崩溃

标签 objective-c ios xcode xamarin.ios

我有一个为 WEPopover 使用 btouch 绑定(bind)的应用程序。您可以在下面找到适用于设备模拟器的 SAMPLE 应用程序的绑定(bind):

https://github.com/anujb/monotouch-bindings

我在另一个应用程序中使用相同的 dll,它可以在模拟器上运行,但会导致设备崩溃:

崩溃日志:

Hardware Model:      iPad2,1
Process:         MyApp [2905]
Path:            /var/mobile/Applications/31F6EA63-F5B5-49A4-B78B-7A0EDE39FF6E/MyApp.app/MyApp
Identifier:      MyApp
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2012-01-11 20:56:08.238 -0600
OS Version:      iPhone OS 5.0.1 (9A405)
Report Version:  104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x3088932c 0x30878000 + 70444
1   libsystem_c.dylib               0x37d2af54 0x37cdd000 + 319316
2   libsystem_c.dylib               0x37d23fe4 0x37cdd000 + 290788
3   MyApp                       0x009c8048 mono_handle_native_sigsegv (mini-exceptions.c:2249)
4   MyApp                       0x009f53c4 sigabrt_signal_handler (mini-posix.c:196)
5   libsystem_c.dylib               0x37d35532 0x37cdd000 + 361778
6   libsystem_c.dylib               0x37d2af54 0x37cdd000 + 319316
7   libsystem_c.dylib               0x37d23fe4 0x37cdd000 + 290788
8   MyApp                       0x00b450c8 monoeg_g_logv (goutput.c:135)
9   MyApp                       0x00b4519c monoeg_assertion_message (goutput.c:155)
10  MyApp                       0x0099d080 mono_resolve_patch_target (mini.c:3179)
11  MyApp                       0x009bbf5c mono_aot_plt_resolve (aot-runtime.c:3134)
12  MyApp                       0x009ca640 mono_aot_plt_trampoline (mini-trampolines.c:768)
13  MyApp                       0x003fa930 generic_trampoline_aot_plt (mscorlib.dll.6.s:204591)
14  MyApp                       0x00ab3b6c mono_runtime_invoke (object.c:2757)
15  MyApp                       0x00a39894 create_exception_two_strings (exception.c:134)
16  MyApp                       0x00a3990c mono_exception_from_name_two_strings (exception.c:157)
17  MyApp                       0x009f6164 create_domain_objects (appdomain.c:177)
18  MyApp                       0x009f6430 mono_runtime_init (appdomain.c:261)
19  MyApp                       0x009a2b80 mini_init (mini.c:6584)
20  MyApp                       0x009ae728 mono_jit_init_version (driver.c:2233)
21  MyApp                       0x00996388 main (main.m:2423)
22  MyApp                       0x00008218 start + 32

更新:mtouch --logdev 崩溃报告:

Jan 11 21:16:55 unknown SpringBoard[15] <Warning>: Killing MyApp for termination assertion
Jan 11 21:17:00 unknown SpringBoard[15] <Warning>: Reloading application state for 'MyApp' as its modification date or path has changed
Jan 11 21:17:00 unknown SpringBoard[15] <Warning>: Reloading and rendering all application icons.
Jan 11 21:17:03 unknown SpringBoard[15] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=1
Jan 11 21:17:03 unknown SpringBoard[15] <Notice>: MultitouchHID: detection mode: 255->0 (deferring until bootloaded)
Jan 11 21:17:03 unknown SpringBoard[15] <Notice>: MultitouchHID: device bootloaded
Jan 11 21:17:03 unknown SpringBoard[15] <Notice>: MultitouchHID: detection mode: 0->0
Jan 11 21:17:03 unknown kernel[0] <Debug>: set_crc_notification_state 0
Jan 11 21:17:07 unknown kernel[0] <Debug>: AppleKeyStore:cp_key_store_action(1)
Jan 11 21:17:07 unknown kernel[0] <Debug>: AppleKeyStore:Sending lock change
Jan 11 21:17:09 unknown UIKitApplication:MyApp[0xba5e][2965] <Notice>: Successfully received USB connection from MonoDevelop on port 10001.
Jan 11 21:17:09 unknown kernel[0] <Debug>: launchd[2965] Builtin profile: container (sandbox)
Jan 11 21:17:09 unknown kernel[0] <Debug>: launchd[2965] Container: /private/var/mobile/Applications/31F6EA63-F5B5-49A4-B78B-7A0EDE39FF6E [69] (sandbox)
Jan 11 21:17:14 unknown ReportCrash[2967] <Notice>: Formulating crash report for process MyApp[2965]
Jan 11 21:17:14 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:MyApp[0xba5e]) Job appears to have crashed: Segmentation fault: 11
Jan 11 21:17:14 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:MyApp[0xba5e]) Throttling respawn: Will start in 2147483642 seconds
Jan 11 21:17:14 unknown SpringBoard[15] <Warning>: Application 'MyApp' exited abnormally with signal 11: Segmentation fault: 11
Jan 11 21:17:14 unknown ReportCrash[2967] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/MyApp_2012-01-11-211713_myipads-iPad.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0

最佳答案

这是一个 known bug在当前稳定版本 (5.0.*) 中。它在最新的测试版 (5.1.1) 中得到修复 - 请记住,虽然它是测试版并且存在已知的回归(例如,如果您的应用程序很大,则可能无法将其上传到设备)。

如果您更改链接器选项(以链接所有程序集),您可能成功解决该错误

关于objective-c - 单点触控设备只会崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8829644/

相关文章:

ios - Xcode 5 配置文件不可用

ios - 哪个 Xcode 对象用于显示从 SQL 语句中获取的简单表?

Objective-C - 测试对象实例被释放/释放

objective-c - 位图行宽的奇怪按位运算,这是什么意思? (以及为什么)

ios - 重新安装 xcode 模拟器运行时

ios - 收到 GMSServicesException 错误

ios - 在 Swift 2.3 中关闭 UIAlertController 键盘

ios - 获取核心数据关系的类型

iphone - xcode - 安排时间的本地通知(每天早上 6 点)

ios - XCTest 在 travis 尝试运行测试时崩溃