Segmentation Fault from touch

I’m not sure if this should be posted here or in the daily build forum but since this forum generates more traffic I’ll try here. :slight_smile:

Recently we’ve started noticing some odd crashes in our game. We’re not sure how long they’ve been happening as we had different types of crash that we assumed were the same issue (until we managed to fix them and the crash remained.) From the device log dump we see that the top frame of the stack is always at a consistent address within our application and that it always leads back to forwardTouchMethod in UIKit. We can trigger this crash in a number of ways :

  • clicking on a simple button in our control bar or dialog

  • dragging (or just touching) our aim controller

  • by tapping or doubletapping in our pinch view control

The most frustrating part about the crash is how inconsistent it is. We’ll be able to crash the app a half dozen times in a row just by clicking our fire button and then that’ll be fine for hours while we’re able to crash it via the pinch view. It’s maddening.

We’ve done the following in order to make sure it isn’t a crash we’ve seen before that’s being triggered by touch:

  • remove all sound calls (disposal of a playing sound had been an issue)

  • disable multitouch (we were doing double-cleanup of resources as a result of two touches)

  • inserted forced double-disposal of sprite sheets to see if the stack is the same (it’s not)

We’ve started dumping our touch events as they happen but that hasn’t been terribly useful. For the pinch view controller the last event before the crash is often the “ended” event whereas with the button we’ve seen it happen with “moved” as well.

We see this issue across all iOS devices we have in our hands, from the iPod touch up through the iPad 3. We’ve noticed it seems to be a bit easier to crash on the iPod compared to the iPad. For the iPad we often have to hammer the screen repeatedly with double taps to make it happen - the simple button click crash is a lot rarer.

Has anyone been seeing an issue like this as of late? We’re building off of 786 but we’ve seen in in build on both sides of that number with similar frequency. Given that the top of the stack is consistent, is it possible for us to get symbol information for 786 to have a general idea of where the problem might be? [import]uid: 117383 topic_id: 26345 reply_id: 326345[/import]

I had a lot of problems with segmentation faults when removing or adding eventlistener based on touch events. The fix was just going to a new build, or using the latest stable build - I’m currently using build 799 which is rock-solid for me.

Good luck!
Thomas [import]uid: 70134 topic_id: 26345 reply_id: 106808[/import]

If you can make up a simple test case that exhibits this behavior consistently, please do so and file a bug report here: http://developer.anscamobile.com/content/bug-submission [import]uid: 84637 topic_id: 26345 reply_id: 106816[/import]

We’re struggling to do so but we think we have it narrowed down to our masks. We have many objects on screen with the same mask applied (which is a valid multiple of 4 with 3 px black border) and if we remove the mask we’ve yet to have a crash happen. With this information we may be able to generate a test case. [import]uid: 117383 topic_id: 26345 reply_id: 106818[/import]

I’ve been able to reproduce the issue with a “simple” test case and a bug has been logged. Hopefully we can go back to using masks one day!
[import]uid: 117383 topic_id: 26345 reply_id: 107037[/import]

There was a recent daily build that had a bunch of Mask fixes to it. You might want to try that too.

Rob [import]uid: 19626 topic_id: 26345 reply_id: 107043[/import]

I tried up into the low 800s without much success. The issue with those builds, even if the mask works, is that there are some pretty serious scene changes that our app can’t currently handle and we’re too close to release to roll to a new build at this time. We’re kind of stuck for the moment. [import]uid: 117383 topic_id: 26345 reply_id: 107060[/import]