Crash: GameAnalytics on Resume (iOS)

This took me a while to figure out but I finally did. If I use the current GameAnalytics plugin on iOS locking the app and then unlocking it will result in the app crashing. The error is related to GameAnalytics trying to write to a locked sqllite file.

Sorry for the late reply, I have first seen this message now. Sorry I am not too familiar with specific iOS features. How do lock/unlock an app?

I don’t know if this is present in the latest version. I will test and get back to you.

I just tried it and it still does it on my apps. In the latest version, I am not seeing the error but the end result is the same. By locking I mean clicking on right-hand side button while my game is up and then using either face unlock or fingerprint unlock. Sadly this is the main reason why I stopped using GA in my latest updates.

Here is the log of the test I just ran:
ga_error.txt (4.4 KB)

Also, GA will end up reporting this on the console with this stacktrace:
stackTraceGA.txt (3.5 KB)

Seems only to happen if the person locks the phone after sending an event. I also have a video of a crash and not crash. If you give me an e-mail I can send it to you. Too big to attach.

Here is the code I have for init:

local gameanalytics = require 'plugin.gameanalytics_v2'
    gameanalytics. configureAutoDetectAppVersion( true )

gameanalytics.initialize {
    gameKey = "abxxxx",
    gameSecret = "xxxxx"
}

Here is the event code:

gameanalytics.addDesignEvent {
        eventId = "someevent"
    }
1 Like

Ok thanks. I will look into it and try to see if I can fix it.

You can send the video to sdk@gameanalytics.com

I commend your effort and I hope you figure it out, but I don’t believe it is a GA problem. There are other plugins that behave the same. This problem started a few months ago and I believe it has something to do with the ssl network implementation that Corona uses and/or the build process out of the simulator. In any case, I am going to try to do a native corona build and see if it occurs. If it doesn’t, I"ll use that going forward so I can use GA.

1 Like

Ok thanks. Let me know how you get on.

@GameAnalytics I can confirm that it does not crash if I take the plugin and use it on a native build. Works fine. On a similar note. Does GA still support Amazon devices? It use to but recently I have a similar issue on Amazon and don’t want to do a native build for Android. I can send you the logs for that next time I test.

1 Like

@agramonte ok great it works on native build. We haven’t tested the SDK on Amazon devices but if you have some logs please send them to us and I can have a look at them.

We don’t have any Amazon test devices, do you know if you can test Amazon on virtual devices?

No idea but I will send you the error soonish. I’ll even buy you a cheap $25 kindle if you send me an address.

1 Like

Ok thanks. I am sure we could buy a Amazon test device for the office if necessary. You can post (or email) a link of the device you are talking about.

I don’t see any for $25 at the moment. But some should be coming up on the 15th and 16. I send you the link then.

1 Like

Just tried the latest version on Amazon device and it is also working as expected.

1 Like

Ok great to hear. Thanks for the update :slight_smile: