ERROR Device testing

The application works fine on the emulator, but the device is installed on an error Error Director. This line from the log:

Sep 17 12:05:00 unknown UserEventAgent[12] <warning>: DEBUG: Changing screen blanked state: 0<br>Sep 17 12:05:00 unknown SpringBoard[15] <notice>: MultitouchHID: detection mode: 255-&gt;3 (deferring until bootloaded)<br>Sep 17 12:05:00 unknown SpringBoard[15] <notice>: MultitouchHID: device bootloaded<br>Sep 17 12:05:00 unknown SpringBoard[15] <notice>: MultitouchHID: detection mode: 3-&gt;3<br>Sep 17 12:05:01 unknown kernel[0] <debug>: set_crc_notification_state 0<br>&gt; &gt; <br>Sep 17 12:05:04 unknown kernel[0] <debug>: launchd[3802] Builtin profile: container (sandbox)<br>Sep 17 12:05:04 unknown kernel[0] <debug>: launchd[3802] Container: /private/var/mobile/Applications/5CF9BB8D-0E77-44F0-AC1F-18FB1B4FA4A5 [69] (sandbox)<br>Sep 17 12:05:04 unknown UIKitApplication:info.testss-free[0x3f7e][3802] <notice>: -----------------------------------------------<br>&gt; <br>Sep 17 12:05:07 unknown UIKitApplication:info.testss-free[0x3f7e][3802] <notice>: Lua Runtime Error: lua_pcall failed with status: 2, error message is: ?:0: attempt to index a nil value<br>&gt; &gt; <br>Sep 17 12:05:52 unknown com.apple.launchd[1] <notice>: (UIKitApplication:info.demcorisy.democrisy-free[0x3f7e]) Exited: Killed: 9<br>Sep 17 12:05:52 unknown SpringBoard[15] <warning>: Application 'testss-Test-1' quit with signal 9: Killed: 9<br><br> [import]uid: 136777 topic_id: 31070 reply_id: 331070[/import]

What is happening between the time you print that row of dashes and the crash happening?

You have some variable that is nil and you’re trying to access it.

On device, “print()” is your friend. Without seeing code and more of the log, and knowing why you see errors on device that don’t show up in the simulator, It’s possible you are trying to load an image who’s file name has upper case letters in it while what you are telling corona to load doesn’t. “Image.png” vs. “image.png” which works on the simulator but crashes

So lets look at this scenerio:

  
local myImage = display.newImageRect("image.png", 64, 64) -- It's really Image.png on the file system.  
...  
...  
...  
  
group:insert(myImage) -- this will crash at this point.  

When you try and create that display object it will warn you that it couldn’t find the file and it’s possible that it’s an image you might not miss on your display. So you merrily move a long to later in your code where you now want to use that image and then your app crashes when it tries to use that nil reference.

[import]uid: 19626 topic_id: 31070 reply_id: 124226[/import]

Thanks for the advice, this option is possible. Forgot one important addition: error falls in with a 2 - 4 entering the scene [import]uid: 136777 topic_id: 31070 reply_id: 124306[/import]

Thank you for your advice helped [import]uid: 136777 topic_id: 31070 reply_id: 124352[/import]

What is happening between the time you print that row of dashes and the crash happening?

You have some variable that is nil and you’re trying to access it.

On device, “print()” is your friend. Without seeing code and more of the log, and knowing why you see errors on device that don’t show up in the simulator, It’s possible you are trying to load an image who’s file name has upper case letters in it while what you are telling corona to load doesn’t. “Image.png” vs. “image.png” which works on the simulator but crashes

So lets look at this scenerio:

  
local myImage = display.newImageRect("image.png", 64, 64) -- It's really Image.png on the file system.  
...  
...  
...  
  
group:insert(myImage) -- this will crash at this point.  

When you try and create that display object it will warn you that it couldn’t find the file and it’s possible that it’s an image you might not miss on your display. So you merrily move a long to later in your code where you now want to use that image and then your app crashes when it tries to use that nil reference.

[import]uid: 19626 topic_id: 31070 reply_id: 124226[/import]

Thanks for the advice, this option is possible. Forgot one important addition: error falls in with a 2 - 4 entering the scene [import]uid: 136777 topic_id: 31070 reply_id: 124306[/import]

Thank you for your advice helped [import]uid: 136777 topic_id: 31070 reply_id: 124352[/import]