Catching Runtime Errors on Device

Hey,

We developed a complex huge PubNub and physics enabled game in the summer. After two months we decided to publish it after few game modes we will develop now.

Here is the problem. In the summer the game was working with no memory leak and bugs. Now when we try it on device (iOS 6) game crashes at game screen randomly (not in other scenes which leads that problem may be something about connection to PubNub or simply get requests). Because our subscription ended we couldn’t try daily builds. We used latest stable version which is trial.

We can’t capture the runtime errors and we can’t just comment some lines then look if it works because game is too way complex. I think Corona should build a mode which writes the runtime errors to a file like errors_log.txt for these situations.

So how can we capture runtime errors on device(iOS6) without using daily builds?

Cheers! [import]uid: 5629 topic_id: 32710 reply_id: 332710[/import]

This is a problem that was fixed in one of the daily builds for iOS 6. Network.requests can cause crashing. I could not find it in the notes for the builds but it is mentioned here in one of the weekly FAQs. Read #5. You will need to use a daily build to fix this on iOS 6 devices.

http://www.coronalabs.com/blog/2012/10/03/faq-wednesday-ios6-bugs/

As for catching errors on a device. The easiest way is to connect the device to your development Mac using xCode to view the console.

I use an app called AppSwitch that allows me to see the console output on the device without having to connect it to a Mac. It isn’t free though. But I find it helps with testers who are remote from me. There could be some free app that does something similiar but honestly I never looked.

Either way, you will need this line of code in your main.lua to see the output.

io.output():setvbuf('no') [import]uid: 56820 topic_id: 32710 reply_id: 130017[/import]

This is a problem that was fixed in one of the daily builds for iOS 6. Network.requests can cause crashing. I could not find it in the notes for the builds but it is mentioned here in one of the weekly FAQs. Read #5. You will need to use a daily build to fix this on iOS 6 devices.

http://www.coronalabs.com/blog/2012/10/03/faq-wednesday-ios6-bugs/

As for catching errors on a device. The easiest way is to connect the device to your development Mac using xCode to view the console.

I use an app called AppSwitch that allows me to see the console output on the device without having to connect it to a Mac. It isn’t free though. But I find it helps with testers who are remote from me. There could be some free app that does something similiar but honestly I never looked.

Either way, you will need this line of code in your main.lua to see the output.

io.output():setvbuf('no') [import]uid: 56820 topic_id: 32710 reply_id: 130017[/import]