analytics.init() crash iOS6

Hi CoronaLabs,

You have done a marvellous job on fixing IOS crashes at short notice, especially the Game Center orientation crash.
Sorry to say, here is another one! Hope you can do the same for this one!

analytics.init() reliably crashes on iOS6, iPhone 4. Does not crash on earlier iOS versions or Xcode simulator.
The following code will work properly the first time… BUT if you press the home button during analytics.init() the app crashes the next time you launch it. Note that I am using UIApplicationExitsOnSuspend = true in build.settings and I am using a valid analytics ID from Flurry.

If you remove the timer, the issue goes away (but the timer recreates what you might do with a splash screen)

I am also raising a bug report, but have put it here to warn those about to submit apps (like me!)

Any ideas for workarounds in the meantime?

Regards,
Anthony

Here’s how to reproduce:
main.lua:

  
-- Go Yeti! main.lua  
local analytics = require("analytics");  
  
mytext = display.newText("analytics.init()", 0.3\*display.contentWidth,   
 0.5\*display.contentHeight, nil, 20);   
  
analytics.init("YOUR\_ANALYTICS\_ID")  
  
local function start()  
 mytext.text = "Main game starts now"  
end  
timer.performWithDelay(4000, start);  

build.settings

-- Go Yeti! build.settings  
settings =  
{  
  
 orientation =  
 {  
 default = "landscapeRight",   
 supported = { "landscapeLeft", "landscapeRight" },  
 },  
  
 iphone =  
 {  
 plist =  
 {  
  
 UIApplicationExitsOnSuspend = true,  
 },  
 }  
}  

config.lua

-- Go Yeti! config.lua  
application =   
{  
 content =   
 {   
 width = 320,  
 height = 480,   
 scale = "zoomStretch", -- scales content to fit screen  
 fps = 30  
 }  
}  

[import]uid: 87194 topic_id: 31854 reply_id: 331854[/import]

Almost forgot to mention! Using dailybuild Version 2012.931 (2012.10.9) [import]uid: 87194 topic_id: 31854 reply_id: 127106[/import]

Also I believe the analyctics is using an old version of the flurry SDK, maybe performance can be improved by using a newer version?

edit: Corona uses version 3.1 and 4.0.5 is out.

Changelog: http://support.flurry.com/index.php?title=Analytics/Code/ReleaseNotes [import]uid: 62706 topic_id: 31854 reply_id: 127111[/import]

It would be nice to try out their ad network too. [import]uid: 62706 topic_id: 31854 reply_id: 127112[/import]

Also should point out that removing the timer in the code above does not solve the issue, it just moves it somewhere else. In a real application there will always be a code break somewhere.

Fingers cross that you have a solution up your sleeve, CoronaLabs!
Anthony

[import]uid: 87194 topic_id: 31854 reply_id: 127114[/import]

CoronaLabs,

More information: does not crash if is UIApplicationExitsOnSuspend = false

No response from Corona! Are you engaged in fixing the issue or do you need more help in re-creating the problem?

Anthony [import]uid: 87194 topic_id: 31854 reply_id: 127195[/import]

Hey Anthony, do you have a bug number for this please? If you have submitted a sample we can use to reproduce it may already be being worked on but I can’t look that up without a #.

Thanks,
Peach :slight_smile: [import]uid: 52491 topic_id: 31854 reply_id: 127253[/import]

Almost forgot to mention! Using dailybuild Version 2012.931 (2012.10.9) [import]uid: 87194 topic_id: 31854 reply_id: 127106[/import]

Also I believe the analyctics is using an old version of the flurry SDK, maybe performance can be improved by using a newer version?

edit: Corona uses version 3.1 and 4.0.5 is out.

Changelog: http://support.flurry.com/index.php?title=Analytics/Code/ReleaseNotes [import]uid: 62706 topic_id: 31854 reply_id: 127111[/import]

It would be nice to try out their ad network too. [import]uid: 62706 topic_id: 31854 reply_id: 127112[/import]

Also should point out that removing the timer in the code above does not solve the issue, it just moves it somewhere else. In a real application there will always be a code break somewhere.

Fingers cross that you have a solution up your sleeve, CoronaLabs!
Anthony

[import]uid: 87194 topic_id: 31854 reply_id: 127114[/import]

Hey Peach,

Yep, case 18017. Still awaiting a response from the bugs team.
Also submitted crash log.

Unfortunately the only work-around I know of (setting UIApplicationExitsOnSuspend = false) is really really painful for me as it means changing a lot of code to ensure sensible behaviour when the home button is pressed and then the app restarted.

Hope to hear from you very shortly!

Cheers,
Anthony [import]uid: 87194 topic_id: 31854 reply_id: 127364[/import]

CoronaLabs,

More information: does not crash if is UIApplicationExitsOnSuspend = false

No response from Corona! Are you engaged in fixing the issue or do you need more help in re-creating the problem?

Anthony [import]uid: 87194 topic_id: 31854 reply_id: 127195[/import]

Hey Anthony, do you have a bug number for this please? If you have submitted a sample we can use to reproduce it may already be being worked on but I can’t look that up without a #.

Thanks,
Peach :slight_smile: [import]uid: 52491 topic_id: 31854 reply_id: 127253[/import]

Hey Peach,

Yep, case 18017. Still awaiting a response from the bugs team.
Also submitted crash log.

Unfortunately the only work-around I know of (setting UIApplicationExitsOnSuspend = false) is really really painful for me as it means changing a lot of code to ensure sensible behaviour when the home button is pressed and then the app restarted.

Hope to hear from you very shortly!

Cheers,
Anthony [import]uid: 87194 topic_id: 31854 reply_id: 127364[/import]

Hey Anthony, had a look and this has just been reassigned to Danny so you should hear from him shortly :slight_smile: [import]uid: 52491 topic_id: 31854 reply_id: 127621[/import]

Hey Anthony, had a look and this has just been reassigned to Danny so you should hear from him shortly :slight_smile: [import]uid: 52491 topic_id: 31854 reply_id: 127621[/import]

All,
Just noticed that this is fixed in daily builds CoronaSDK 2013.1016

It talks about it now being implemented as a plug-in. Does this change the API in any way?

Cheers,
Anthony [import]uid: 87194 topic_id: 31854 reply_id: 141235[/import]

All,
Just noticed that this is fixed in daily builds CoronaSDK 2013.1016

It talks about it now being implemented as a plug-in. Does this change the API in any way?

Cheers,
Anthony [import]uid: 87194 topic_id: 31854 reply_id: 141235[/import]

Anthony,

re: Does this change the API in any way?

It does not. Also, I just wanted to note that we are up to date with the latest Flurry sdk now.

Cheers,
Bryan [import]uid: 205364 topic_id: 31854 reply_id: 145340[/import]