0

我在我们的游戏中遇到了一个崩溃错误,我已经尝试了很长时间,但没有取得太大进展。我有一组大部分可重复的步骤来导致它,我已经能够在连接时重现它,在它发生之前弄清楚我的代码的最后一点是什么。我已经设置了断点并逐步通过它......但是当崩溃发生时,它总是在程序集中,并且崩溃报告似乎总是来自运行循环,这不是很有帮助。

这是我如何重现该错误(大约 1/3 的时间)...

进入游戏关卡选择界面,场景完成4/5关卡。级别选择器将位于第 5 级。立即选择第 4 级。选择环将移动到第 4 级的气泡,大约 1/3 的时间……第 5 级的气泡会无缘无故消失,游戏会崩溃。

最令人沮丧的事情之一是,它不会总是返回相同的崩溃报告。将会出现两个不同的版本。

希望有人可以帮助解决这个问题,因为我很困惑。

这是第一个:

Error Message:
Segmentation fault: 11: Application recieved signal

Where:
Tilt, line 0

Backtrace:
Tilt:0:in `0x00086bdf ht_handle_signal + 102'
libsystem_c.dylib:1:in `0x32cf87ed _sigtramp + 48'
UIKit:2:in `0x334e0105 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke_0 + 80'
CoreFoundation:3:in `0x358e77e3 __NSArrayChunkIterate + 318'
CoreFoundation:4:in `0x358e06ff __NSArrayEnumerate + 570'
CoreFoundation:5:in `0x35845ed5 -[NSArray enumerateObjectsWithOptions:usingBlock:] + 64'
UIKit:6:in `0x33338339 -[UIView(Geometry) hitTest:withEvent:] + 668'
UIKit:7:in `0x334e0127 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke_0 + 114'
CoreFoundation:8:in `0x358e77e3 __NSArrayChunkIterate + 318'
CoreFoundation:9:in `0x358e06ff __NSArrayEnumerate + 570'
CoreFoundation:10:in `0x35845ed5 -[NSArray enumerateObjectsWithOptions:usingBlock:] + 64'
UIKit:11:in `0x33338339 -[UIView(Geometry) hitTest:withEvent:] + 668'
UIKit:12:in `0x334e0127 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke_0 + 114'
CoreFoundation:13:in `0x358e77e3 __NSArrayChunkIterate + 318'
CoreFoundation:14:in `0x358e06ff __NSArrayEnumerate + 570'
CoreFoundation:15:in `0x35845ed5 -[NSArray enumerateObjectsWithOptions:usingBlock:] + 64'
UIKit:16:in `0x33338339 -[UIView(Geometry) hitTest:withEvent:] + 668'
UIKit:17:in `0x334e0127 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke_0 + 114'
CoreFoundation:18:in `0x358e77e3 __NSArrayChunkIterate + 318'
CoreFoundation:19:in `0x358e06ff __NSArrayEnumerate + 570'
CoreFoundation:20:in `0x35845ed5 -[NSArray enumerateObjectsWithOptions:usingBlock:] + 64'
UIKit:21:in `0x33338339 -[UIView(Geometry) hitTest:withEvent:] + 668'
UIKit:22:in `0x33337ee7 +[UIWindow _hitTestToPoint:pathIndex:forEvent:] + 314'
UIKit:23:in `0x3331ed43 _UIApplicationHandleEvent + 1226'
GraphicsServices:24:in `0x374df22b PurpleEventCallback + 882'
CoreFoundation:25:in `0x358c0523       __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38'
CoreFoundation:26:in `0x358c04c5 __CFRunLoopDoSource1 + 140'
CoreFoundation:27:in `0x358bf313 __CFRunLoopRun + 1370'
CoreFoundation:28:in `0x358424a5 CFRunLoopRunSpecific + 300'
CoreFoundation:29:in `0x3584236d CFRunLoopRunInMode + 104'
GraphicsServices:30:in `0x374de439 GSEventRunModal + 136'
UIKit:31:in `0x3334ecd5 UIApplicationMain + 1080'
Tilt:32:in `0x000025df main + 98'
Tilt:33:in `0x00002578 start + 40'

这是第二个。

Error Message:
Segmentation fault: 11: Application recieved signal

Where:
Tilt1Scene, line 0

Backtrace:
Tilt1Scene:0:in `0x00087a6f ht_handle_signal + 102'
libsystem_c.dylib:1:in `0x33da17ed _sigtramp + 48'
QuartzCore:2:in `0x3540bfd3   _ZN2CA5Layer19collect_animations_EdPdPNS0_21CollectAnimationsDataE + 290'
QuartzCore:3:in `0x3540bfd3 _ZN2CA5Layer19collect_animations_EdPdPNS0_21CollectAnimationsDataE + 290'
QuartzCore:4:in `0x3540bfd3 _ZN2CA5Layer19collect_animations_EdPdPNS0_21CollectAnimationsDataE + 290'
QuartzCore:5:in `0x3540bfd3 _ZN2CA5Layer19collect_animations_EdPdPNS0_21CollectAnimationsDataE + 290'
QuartzCore:6:in `0x3540bfd3 _ZN2CA5Layer19collect_animations_EdPdPNS0_21CollectAnimationsDataE + 290'
QuartzCore:7:in `0x3540bfd3 _ZN2CA5Layer19collect_animations_EdPdPNS0_21CollectAnimationsDataE + 290'
QuartzCore:8:in `0x3540bead _ZN2CA5Layer18collect_animationsEPNS_11TransactionEdPd + 56'
QuartzCore:9:in `0x35405b97 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 1078'
QuartzCore:10:in `0x3540557f _ZN2CA11Transaction6commitEv + 314'
QuartzCore:11:in `0x353fd4b9 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 56'
CoreFoundation:12:in `0x31560b1b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18'
CoreFoundation:13:in `0x3155ed57 __CFRunLoopDoObservers + 258'
CoreFoundation:14:in `0x3155f0b1 __CFRunLoopRun + 760'
CoreFoundation:15:in `0x314e24a5 CFRunLoopRunSpecific + 300'
CoreFoundation:16:in `0x314e236d CFRunLoopRunInMode + 104'
GraphicsServices:17:in `0x329bb439 GSEventRunModal + 136'
UIKit:18:in `0x317e7cd5 UIApplicationMain + 1080'
Tilt:19:in `0x000030c7 main + 98'
Tilt:20:in `0x00003060 start + 40'
4

1 回答 1

0

根据 WDUK 上面提供的帮助,我找到了这个问题的答案。

问题是由屏幕上的一个 UIButtons 自动释放引起的。发生这种情况是因为我有一个单独的属性 currentSelectedLevelButton 被保留。但是,在部分代码中,我设置了 currentSelectedLevelButton 而不是 self.currentSelectedLevelButton。由于我没有使用该属性作为设置器,因此未使用该属性的保留部分,然后将其自动释放。修复它涉及找到我设置 currentSelectedLevelButton 的所有位置并将其更改为 self.currentSelectedLevelButton。

于 2012-06-11T21:41:31.717 回答