Image Error with Nabi - stats.coronalabs.com

Hello all,

I’ve been struggling with an issue when pushing out Nabi builds.  Apparently, when they test it on their devices (after suspending then resuming the app), it results in an issue where black boxes randomly replaces some images in the scene.  

For instance, in one example they sent, we had the number ‘2200’ where each digit was its own image.  It showed fine the first time entering the scene.  When they suspended then resumed the app, they sent a screenshot where there was a black square in place of the second two.  

They managed to get back to us recently with their console log where the error was happening (after suspending then resuming the device), and there was this line:

E/Corona(5183): ERROR: Unable to resolve host “stats.coronalabs.com”: No address associated with hostname

I’m currently using build 2393. I haven’t found many people who have had this same issue, and the ones who have, we seem to be (possibly?) getting them under different circumstances. For instance, we have nothing in code that requires the user to be online, other than what is in build.settings.

We have success building to all other marketplaces, it’s only Nabi that seems to have this issue. What could be causing it?

Hi @elsoqo,

We’ve heard of other issues where the Nabi tablet crashes when doing a suspend/resume. There’s something odd with this tablet and it may involve their method of restricting children from exiting apps.

One solution which apparently worked for another developer is to “hijack” the back button and suspend the app instead. Please try this and see if you have better luck in the submission process.

[lua]

– hijack the back button and suspend the app instead

local function onKeyReceived( event )

   if event.phase == “down” and event.keyName == “back” then

      system.request( “suspendApplication” )

      return true

   end

end

Runtime:addEventListener( “key”, onKeyReceived )

[/lua]

Brent

Thanks very much Brent, I’ll update this thread with whether or not this ends up working for me. 

Hi @elsoqo,

We’ve heard of other issues where the Nabi tablet crashes when doing a suspend/resume. There’s something odd with this tablet and it may involve their method of restricting children from exiting apps.

One solution which apparently worked for another developer is to “hijack” the back button and suspend the app instead. Please try this and see if you have better luck in the submission process.

[lua]

– hijack the back button and suspend the app instead

local function onKeyReceived( event )

   if event.phase == “down” and event.keyName == “back” then

      system.request( “suspendApplication” )

      return true

   end

end

Runtime:addEventListener( “key”, onKeyReceived )

[/lua]

Brent

Thanks very much Brent, I’ll update this thread with whether or not this ends up working for me.