EXC_BREAKPOINT崩溃。可能是越狱问题?

8
今天我从Crashlytics收到了一份崩溃报告,但是我无法确定问题出在哪里。我的应用程序已经上线数月而没有任何问题,所以这似乎只是个例外。
崩溃的类型是Exception Type EXC_BREAKPOINT Code UNKNOWN at 0xdefe
1    UIKit   _shadowImageInRectForSlice + 258
2    UIKit   _shadowImageInRectForSlice + 258
3    UIKit   -[UIActionSheet(Private) layout] + 3586
4    UIKit   -[UIActionSheet(Private) presentSheetInView:] + 268
5    myapp   GraphViewController.m line 135
             -[GraphViewController graphButtonPressed:] + 135
6    UIKit   -[UIApplication sendAction:to:from:forEvent:] + 72
7    UIKit   -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 120
8    UIKit   -[UIApplication sendAction:to:from:forEvent:] + 72
9    UIKit  -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
10   UIKit  -[UIControl sendAction:to:forEvent:] + 44
11   UIKit  -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 502
12   UIKit  -[UIControl touchesEnded:withEvent:] + 488
13   UIKit  -[UIWindow _sendTouchesForEvent:] + 524
14   UIKit  -[UIApplication sendEvent:] + 380
15   UIKit  _UIApplicationHandleEvent + 6154
16   GraphicsServices   _PurpleEventCallback + 590
17   GraphicsServices   PurpleEventCallback + 34
18   CoreFoundation     __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
19   CoreFoundation     __CFRunLoopDoSource1 + 138
20   CoreFoundation     __CFRunLoopRun + 1384
21   CoreFoundation     CFRunLoopRunSpecific + 356
22   CoreFoundation     CFRunLoopRunInMode + 104
23   GraphicsServices   GSEventRunModal + 74
24   UIKit  UIApplicationMain + 1120
25   myapp   main.m line 16
             main + 16

现在ViewController的第135行只是简单地使用[actionSheet showInView:self.view];来显示UIActionSheet

崩溃发生在iPad2.5上(不确定是哪个型号),但我的应用程序仅支持iPhone,所以可能会有窗口化的问题。iOS版本是6.1。

另外需要注意的是,该设备已经越狱。这可能导致了崩溃吗?我知道他们可能安装了任何一种操纵视图的插件。

---------- 附加 ----------

在写这篇文章的同时,我收到了第二个崩溃报告,看起来是来自不同的用户,因为这次是在iPhone4.1上的iOS 5.1.1。这部手机也被越狱了。

异常类型EXC_BAD_ACCESS代码KERN_INVALID_ADDRESS位于0x4003109b

0    libobjc.A.dylib     objc_msgSend + 15
1    UIKit   -[UIActionSheet(Private) _buttonClicked:] + 250
2    CoreFoundation  -[NSObject performSelector:withObject:withObject:] + 52
3    UIKit   -[UIApplication sendAction:to:from:forEvent:] + 62
4    UIKit   -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
5    UIKit   -[UIControl sendAction:to:forEvent:] + 44
6    UIKit   -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492
7    UIKit   -[UIControl touchesEnded:withEvent:] + 476
8    UIKit   -[UIWindow _sendTouchesForEvent:] + 318
9    UIKit   -[UIWindow sendEvent:] + 380
10   UIKit   -[UIApplication sendEvent:] + 356
11   UIKit   _UIApplicationHandleEvent + 5826
12   GraphicsServices    PurpleEventCallback + 882
13   CoreFoundation  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
14   CoreFoundation  __CFRunLoopDoSource1 + 140
15   CoreFoundation  __CFRunLoopRun + 1370
16   CoreFoundation  CFRunLoopRunSpecific + 300
17   CoreFoundation  CFRunLoopRunInMode + 104
18   GraphicsServices    GSEventRunModal + 136
19   UIKit   UIApplicationMain + 1080
20   myapp  main.m line 16
            main + 16

这个问题甚至没有显示哪个ViewController导致了崩溃!有什么想法吗?

你是否曾经解决过这个问题? - Thomas Kekeisen
不,我把它归因于越狱模组。你有同样的问题吗? - Darren
1个回答

9
请注意,这种问题很难调试,特别是没有代码和任何比崩溃日志更多的上下文的情况下。我会尝试给出一些方向/我会做的事情。
首先,iPad 2,5似乎是iPad mini WiFi,但我并不完全确定。因此,在iPad mini上测试您的应用程序(还要在iOS 5.1.1的设备上进行测试),看看会发生什么,并专注于您使用的UIActionSheet实例,并开始在GraphViewController中进行测试。确保您能想到的所有情况都能正确工作。
如果这样做了,并且这是您得到的唯一两个崩溃报告:不要惊慌!我不知道您的应用程序有多少用户,但只有其中2个曾经遇到过这种崩溃。您说他们可能越狱了他们的设备,他们知道应用程序可能因此而崩溃。
考虑到这一点,请决定是否值得花更多时间和精力来解决这个问题。
如果你在使用UIActionSheet实例时遇到了可释放的对象或块,那么EXC_BAD_ACCESS基本上表示“天哪,我们必须使用的对象已经消失了!”。大多数情况下,EXC_BREAKPOINT告诉你正在引用一个不存在的符号或框架。这可能是因为手机越狱了,或者你说你的应用与iOS X版本兼容,但你使用的框架/方法仅在更高版本中可用。所以也要检查一下。希望这样你能找到一些可疑的代码并将其发布到StackOverflow上,或者你可以自己解决这个问题。希望这能给你一些正确方向的帮助,但是,再次强调,只有崩溃报告而没有代码或能够进行一些测试是不够的...

3
你提到了一个不存在的符号或框架。这可能是因为手机被越狱了。- 绝对不是。 - user529758
8
如果越狱设备安装了一个修改UIActionSheet皮肤或用“升级”版的UIActionSheet替换它的模组,这种事情是可能发生的。更有可能的是开发者做了一些不支持相关iOS版本的事情,但我见过由于越狱设备安装了不稳定的模组而导致的奇怪崩溃。(当然,只有越狱本身几乎没有任何伤害。) - Mac_Cain13

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接