Bus error

Frequently the app (iOS) is crashing in the simulator with error like below:

[text]
/Applications/Corona.268/Corona Terminal: line 9: 917 Bus error “$path/Corona Simulator.app/Contents/MacOS/Corona Simulator” $*
logout

[Process completed]
[/text]

Any idea what this error specifically means?

Regards,

KC [import]uid: 19297 topic_id: 7266 reply_id: 307266[/import]

That can happen for a number of reasons. A common one is in conjunction with physics collisions. If that’s the case, you might find one of my blog posts useful:

http://jonbeebe.tumblr.com/post/2515495262/corona-collision-no-no [import]uid: 7849 topic_id: 7266 reply_id: 26548[/import]

Thanks Jon. I am using post and pre collision events. It could be the precollision behaving like you said. I added delay. I’ll report back if it makes any difference. [import]uid: 19297 topic_id: 7266 reply_id: 26631[/import]

That was great suggestion. Most of the crashes are not happening after the changes. I had to tweak pre or post collision to adapt to some delay. [import]uid: 19297 topic_id: 7266 reply_id: 28677[/import]

I am getting this error as well after my app crashes. But I am NOT using the physics engine at all-- no collision testing or anything like it. I am using audio and images, and this error seems to show up when i added my own basic garbage collection to dispose() audio clips after use, as well as some graphic elements. It is hard to pinpoint the error, as it does seem to do with timing issues. But thought I’d post something. I’ll post more if I can zero in on the culprit. I am highly suspicious that this is a Corona or Open AL bug of some kind. [import]uid: 10818 topic_id: 7266 reply_id: 52448[/import]

If you put a few print statements throughout your own garbage collecting function, you might be able to pinpoint it that way - want to give that a shot? :slight_smile: [import]uid: 52491 topic_id: 7266 reply_id: 52470[/import]

Peach - I have tons of print statements that I can turn off/on with a switch. It all looks good, measuring the memory go up and back down again as it releases. I could start to identify more of the crash pattern, and I think it comes down to an event listener not being removed on an object before my garbage collection removed that object. So far, so good. After some testing, the problem appears fixed. But my team hasn’t given the thumbs up yet. We’ll see. Thanks for the input, tho! [import]uid: 10818 topic_id: 7266 reply_id: 52491[/import]

No worries, although I’m sorry it didn’t help you along.

I’d be interested to hear what your team think, I’ll be keeping my fingers crossed for you :slight_smile: [import]uid: 52491 topic_id: 7266 reply_id: 52630[/import]

Some of that is a little too technical for me; although I can say that if you remove an object and there is a transition that wants to use it later on, it will cause errors.

If you remove an object listening for functions effecting other objects, no, those wont be called. (Nothing will be “listening” to fire them off ;))

Sorry I can’t tell you about the frame stuff; I should look into that, it’s worth knowing. (I’m great with lots of things but certain elements have eluded me thus far.)

Hope that is of some use, anyway!

Peach :slight_smile:

[import]uid: 52491 topic_id: 7266 reply_id: 52854[/import]

I appreciate the interest, Peach!

The removal of the event listener helped… but didn’t fix it 100%. If we really stress test the app, the crash still shows up… tho so far, only on older devices. I am wondering if timers and transition events are fired on a “there’s enough CPU cycles left” basis. Maybe you can confirm this for me?

If my code is running, at the end of each ‘frame’, the CPU then runs all EnterFrame events, timer.performWithDelay() events whose alarm goes off on that frame/interval, and transition.to/.from events, yes? And what if the CPU tries to do a lot of these things, such that it can’t get it all done in time to keep animation/frame refresh activity looking smooth? Does it drop running code on some of these events until the next frame/interval?

Very curious about this either way, and would love the details.

I’m also wondering if I have an object that is referred to in a “performWithDelay()” method, or in a “transition.to/.from()” method, what happens if the object is destroyed before the those methods are fired.

Alternatively, what about destroying objects that contain such event-based function calls on an object that still exists… do those calls still get fired? I could test this a bit, but I’d like to know what the protocols/program flow is here. Those details can help me track down what is happening, and they can also inform me about how to better build my garbage collection structures.

Thank you for any input you can give me!

[import]uid: 10818 topic_id: 7266 reply_id: 52788[/import]