MonoTouch绑定库-EXC_BAD_ACCESS(SIGSEGV) [英] MonoTouch Binding Library - EXC_BAD_ACCESS (SIGSEGV)

查看:92
本文介绍了MonoTouch绑定库-EXC_BAD_ACCESS(SIGSEGV)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用Kiip MonoTouch绑定时,我的应用程序仅在我的实时设备上崩溃.它在模拟器上工作正常.这是我的堆栈跟踪的一部分:

My app crashes on my live device only, when I use the Kiip MonoTouch bindings. It works fine on the simulator. Here is part of my stack trace:

0   libsystem_c.dylib               0x30eb293c memset$VARIANT$CortexA8 + 52
1   sample                          0x002b5738 GC_clear_stack_inner (misc.c:298)
2   sample                          0x002b574c GC_clear_stack_inner (misc.c:299)
3   sample                          0x002b574c GC_clear_stack_inner (misc.c:299)
4   sample                          0x002b574c GC_clear_stack_inner (misc.c:299)
5   sample                          0x002b574c GC_clear_stack_inner (misc.c:299)
6   sample                          0x002b574c GC_clear_stack_inner (misc.c:299)
7   sample                          0x002b574c GC_clear_stack_inner (misc.c:299)
8   sample                          0x002b574c GC_clear_stack_inner (misc.c:299)
9   sample                          0x002b574c GC_clear_stack_inner (misc.c:299)
10  sample                          0x002b574c GC_clear_stack_inner (misc.c:299)
11  sample                          0x002b57b8 GC_clear_stack (misc.c:344)
12  sample                          0x002b2bd8 GC_malloc_atomic (malloc.c:270)
13  sample                          0x0026f374 mono_object_new_ptrfree_box (object.c:4416)
14  sample                          0x00102290 wrapper_managed_to_native_object___icall_wrapper_mono_object_new_ptrfree_box_intptr (mscorlib.dll.6.s:92590)
15  sample                          0x0001da78 System_Collections_Generic_Dictionary_2_intptr_System_WeakReference_TryGetValue_intptr_System_WeakReference_ (monotouch.dll.6.s:14642)
16  sample                          0x0000d1e4 MonoTouch_ObjCRuntime_Runtime_TryGetNSObject_intptr (monotouch.dll.6.s:6354)
17  sample                          0x0000d2f0 MonoTouch_ObjCRuntime_Runtime_GetNSObject_intptr (monotouch.dll.6.s:6380)
18  sample                          0x0000d3a4 MonoTouch_ObjCRuntime_Runtime_GetNSObjectWrapped_intptr (monotouch.dll.6.s:6415)
19  sample                          0x00023e08 wrapper_native_to_managed_MonoTouch_ObjCRuntime_Runtime_GetNSObjectWrapped_intptr (monotouch.dll.6.s:17991)
20  sample                          0x002bea2c get_managed_object_for_ptr_fast (monotouch-glue.m:346)
21  sample                          0x001ca1fc native_to_managed_trampoline_Kiip_KPManager_set_SharedManager (registrar.m:823)

这是SDK:

www.jmawebtechnologies.com/files/archive.zip

www.jmawebtechnologies.com/files/archive.zip

这是示例项目

https://github.com/mono/monotouch-bindings/tree/主人/基普(Kiip)

以下是软件崩溃的代码:

Here is the code where the software crashes:

AppDelegate> KPManager.SharedManager =新的KPManager(

AppDelegate > KPManager.SharedManager = new KPManager(

这是完整的崩溃日志:

www.jmawebtechnologies.com/files/crash.zip

www.jmawebtechnologies.com/files/crash.zip

推荐答案

这是因为您使用的libKiip.a库没有要构建的体系结构.例如,如果libKiip.a具有armv6和i386代码,而您正在为armv7构建,则会发生这种情况.

This is because the libKiip.a library you're using doesn't have the architecture you're building for. This would happen for instance if the libKiip.a has armv6 and i386 code, but you're building for armv7.

在构建时应导致以下警告:

At build time it should result in this warning:

warning MT1301: Native library `libKiip.a` (i386, ARMv7) was ignored since it does not match the current build architecture(s) (ARMv6)

解决方案是更改您的MonoTouch项目以使用libKiip.a库中可用的体系结构,或者确保您在该库中具有正确的体系结构(我相信通用libKiip.a二进制文件可以做到).

The solution is either to change your MonoTouch project to use the architecture available in the libKiip.a library, or make sure you have the right architecture in the library (I believe the universal libKiip.a binary will do).

这篇关于MonoTouch绑定库-EXC_BAD_ACCESS(SIGSEGV)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆