[SOLVED] Build crashes on iphone 5 until restart the device

hi there,

I had three times the case that different builds crashed immediately after start. This matters with my own code and corona samples as well. All Apps worked fine on the simulator. I had to restart the device to make them work. It took me a while to figure that out.

Is that a known issue? Or somebody else with this problem? [import]uid: 53732 topic_id: 33507 reply_id: 333507[/import]

What version of Xcode and Corona are you using? I built an app for my iPhone 5 last night using Corona build 970 and Xcode 4.3 which worked just fine. [import]uid: 52491 topic_id: 33507 reply_id: 133103[/import]

Current xcode and corona 971. The strange thing is, there is no visible reason to reproduce. After a couple of normal runs, suddenly the apps crash immediately after the start. It happend again already with the slideview sample. The first pic was loaded but then the app crashed. Killing the app in the tasks and restart it didn’t work in several tries. Just the same error. I had to restart the device and after that it just worked fine.

Is there a way to take note of the error if the app is running on the device? [import]uid: 53732 topic_id: 33507 reply_id: 133121[/import]

Sorry, double post. Please delete. [import]uid: 53732 topic_id: 33507 reply_id: 133122[/import]

Hey, yes there is - open Xcode while the device is plugged in and click on it in the list on the left. Then select “console” under it. In there you’ll see anything from the device printing. (Including any print statements in your app.)

You should get an error message in there which you could then share with us. [import]uid: 52491 topic_id: 33507 reply_id: 133141[/import]

Sounds like you’re leaking memory badly. Restarting the device clears out the memory, which explains it working again for a short while.

When you view the console data as Peach suggested, you’ll probably see a bunch of low memory warnings before the game stops working.

If you search the forums there are a few good snippets that will output the memory usage so you can see what’s going on.

Good luck! I just tackled an annoying leak myself :stuck_out_tongue:

EDIT: I didn’t realize the samples were having the same issue, seems less likely then that it’s a memory issue.

-Treb [import]uid: 181948 topic_id: 33507 reply_id: 133172[/import]

hi there,

thanks for response, and the useful tip with the console on xcode. It seems that the error is caused by the lib added from the cider IDE which I use.

I got a lot from these errors:

[blockcode] Dec 1 15:14:44 Michas-iPhone SlideView[694] : Lua Runtime Error: lua_pcall failed with status: 2, error message is: …SDK/SampleCode/Interface/SlideView/CiderDebugger.lua:631: calling ‘send’ on bad self (udp{connected} expected, got userdata[/blockcode]

edit:
I have comment the line and built directly from corona, cause cider always adds the line automatically. So far with no errors. I will keep you up to date with any findings related to the error.

I will also post the error in the cider thread. [import]uid: 53732 topic_id: 33507 reply_id: 133207[/import]

I had the same problem with the ciderdebugger file, except it wouldn’t launch for me and was throwing the error on a different line. It worked for me after I stopped running the build as debug when I was building it for device. Since the error is different I can’t guarantee it will work, but it’s worth a try.

-Treb [import]uid: 181948 topic_id: 33507 reply_id: 133239[/import]

I’m still ran the the code without debug. Weird that the file is executed anyway. [import]uid: 53732 topic_id: 33507 reply_id: 133252[/import]

What version of Xcode and Corona are you using? I built an app for my iPhone 5 last night using Corona build 970 and Xcode 4.3 which worked just fine. [import]uid: 52491 topic_id: 33507 reply_id: 133103[/import]

Current xcode and corona 971. The strange thing is, there is no visible reason to reproduce. After a couple of normal runs, suddenly the apps crash immediately after the start. It happend again already with the slideview sample. The first pic was loaded but then the app crashed. Killing the app in the tasks and restart it didn’t work in several tries. Just the same error. I had to restart the device and after that it just worked fine.

Is there a way to take note of the error if the app is running on the device? [import]uid: 53732 topic_id: 33507 reply_id: 133121[/import]

Sorry, double post. Please delete. [import]uid: 53732 topic_id: 33507 reply_id: 133122[/import]

Hey, yes there is - open Xcode while the device is plugged in and click on it in the list on the left. Then select “console” under it. In there you’ll see anything from the device printing. (Including any print statements in your app.)

You should get an error message in there which you could then share with us. [import]uid: 52491 topic_id: 33507 reply_id: 133141[/import]

A advice from a glider developer brought the answer. I hit the run button instead the build button (hammer icon). I simply oversaw the hammer button, since “run” always worked fine all the time.

Mike [import]uid: 53732 topic_id: 33507 reply_id: 133339[/import]

Sounds like you’re leaking memory badly. Restarting the device clears out the memory, which explains it working again for a short while.

When you view the console data as Peach suggested, you’ll probably see a bunch of low memory warnings before the game stops working.

If you search the forums there are a few good snippets that will output the memory usage so you can see what’s going on.

Good luck! I just tackled an annoying leak myself :stuck_out_tongue:

EDIT: I didn’t realize the samples were having the same issue, seems less likely then that it’s a memory issue.

-Treb [import]uid: 181948 topic_id: 33507 reply_id: 133172[/import]

hi there,

thanks for response, and the useful tip with the console on xcode. It seems that the error is caused by the lib added from the cider IDE which I use.

I got a lot from these errors:

[blockcode] Dec 1 15:14:44 Michas-iPhone SlideView[694] : Lua Runtime Error: lua_pcall failed with status: 2, error message is: …SDK/SampleCode/Interface/SlideView/CiderDebugger.lua:631: calling ‘send’ on bad self (udp{connected} expected, got userdata[/blockcode]

edit:
I have comment the line and built directly from corona, cause cider always adds the line automatically. So far with no errors. I will keep you up to date with any findings related to the error.

I will also post the error in the cider thread. [import]uid: 53732 topic_id: 33507 reply_id: 133207[/import]

I had the same problem with the ciderdebugger file, except it wouldn’t launch for me and was throwing the error on a different line. It worked for me after I stopped running the build as debug when I was building it for device. Since the error is different I can’t guarantee it will work, but it’s worth a try.

-Treb [import]uid: 181948 topic_id: 33507 reply_id: 133239[/import]

I’m still ran the the code without debug. Weird that the file is executed anyway. [import]uid: 53732 topic_id: 33507 reply_id: 133252[/import]

A advice from a glider developer brought the answer. I hit the run button instead the build button (hammer icon). I simply oversaw the hammer button, since “run” always worked fine all the time.

Mike [import]uid: 53732 topic_id: 33507 reply_id: 133339[/import]