I've got a crash bug in our game that I've been trying to figure out for a long time, and haven't made much of any progress on. I've got a mostly repeatable set of steps to cause it, I've been able to reproduce it while tethered, figured out what the last bit of my code that's called before it happens. I've set break points and stepped through it... but when the crash happens, it's always just in the assembly and the crash reports always seem to come from within the run loop which isn't very helpful.
Here's how I can reproduce the bug (about 1/3 of the time)...
Enter into the level select screen of the game, with 4/5 levels for the scene completed. The level selector will be on the 5th level. Immediately select level 4. The selector ring will move to the bubble for level 4, and about 1/3 of the time... the bubble for level 5 will just disappear for no apparent reason and the game will crash.
One of the most frustrating things is, it won't always return the same crash report. There are two different versions that will come up.
Hopefully someone can help with this because I'm pretty well stumped.
This is the first one:
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'
And this is the second one.
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'