GameAnalytics / GA-SDK-DEFOLD

Repository for GameAnalytics Defold SDK
MIT License
14 stars 7 forks source link

GAs possibly causing ANRs on Android when closing app via Defold #27

Closed subsoap closed 4 years ago

subsoap commented 4 years ago

When doing

msg.post("@system:", "exit", {code = 0})

sometimes our Android games will freeze up instead of closing properly. The only NE that probably could do this in one of the games is GA so may be worth investigating. 2020-03-18 18_28_30-ANRs   crashes - Faerie Solitaire Remastered - Google Play Console 2020-03-18 18_28_54-ANRs   crashes - Faerie Solitaire Remastered - Google Play Console 2020-03-18 18_29_39-ANRs   crashes - Faerie Solitaire Remastered - Google Play Console 2020-03-18 18_29_50-ANRs   crashes - Faerie Solitaire Remastered - Google Play Console

the1schwartz commented 4 years ago

Ok thanks for reporting this. I will have a look into it.

the1schwartz commented 4 years ago

Sorry to ask what does NE stand for?

the1schwartz commented 4 years ago

I have make some changes/improvements to the SDK's event processing thread (in the Android library). I am not what else could cause issues when closing the app. I have tested myself with calling "msg.post("@system:", "exit", {code = 0})" but could not reproduce the issue. The fix is in the latest version of the Defold SDK (v3.1.6). Let me know if you are still experiencing the issue.

subsoap commented 4 years ago

@the1schwartz NE = Native Extension, GA is the main NE we use, most of the rest is vanilla engine.

It may only show up with enough stuff queued for sending?

Thank you for the update! I'll make new builds soon and see if we get a reduction in ANRs.

subsoap commented 4 years ago

@the1schwartz Whatever you did most likely has reduced ANRs. At least according to our data they are down.

the1schwartz commented 4 years ago

Ok great to hear it has helped @subsoap