Howdy all!
I’ve been developing an application for few months now, and all this time I’ve been using an Android phone to test it on. I recently got an apple dev license, and this is the first time I’ve been able to build for iOS.
The game uses the accelerometer and the orientation is locked on landscapeRight.
When I build for iOS, the app crashes with a sigbus error EXC_BAD_ACCESS (SIGBUS) and quits out to the menu whenever there is an orientation change of the device. This is also occurs on the Xcode iOS simulator.
This is ONLY on a change of orientation - and it only happens on iOS (doesn’t crash on Android) - and it only happens after I load in a level from the level select screen (so if I tilt the device around in the menu screens, nothing happens - but if I tilt the device around during a level OR after I’ve returned to the level select after playing a level, it crashes).
I saw thread http://developer.coronalabs.com/forum/2012/05/02/excbadaccess-sigbus-crash - and, as such, I have ascertained that it must be something going wrong with the code related to the actual gameplay (as the crash doesn’t occur when you’re in menus before gameplay begins). I did a lot of testing to try to figure out where in my code the crash was happening, and I have ascertained this:
-The game crashes after an orient event is triggered and finishes execution. After that event is triggered and the listener returns, the game crashes before the enterFrame update loop is called again.
It also worthy to note that if I leave the ipad flat on the table, I can rotate it around full 360 degrees without the game crashing (I can play every level, at a smashingly solid framerate without any memory leaks) - but as I pick it up and alter the Z axis, it crashes!
Anyone got any ideas…? [import]uid: 144339 topic_id: 30837 reply_id: 330837[/import]
Thanks. [import]uid: 52491 topic_id: 30837 reply_id: 123842[/import]