I’m getting a crash rate of about 3% right now for my recently released game. I haven’t seen the crash myself, but through ANRs & crashes section of Google Play, I can see the stack trace for the (by far) most common crash:
java.lang.UnsatisfiedLinkError:
at com.sdkbox.plugin.SDKBox.nativeInit (Native Method)
at com.sdkbox.plugin.SDKBox.init (SDKBox.java:71)
at com.sdkbox.plugin.SDKBoxActivity.onCreate (SDKBoxActivity.java:12)
at org.cocos2dx.cpp.AppActivity.onCreate (AppActivity.java:35)
at android.app.Activity.performCreate (Activity.java:6309)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1113)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2519)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2654)
at android.app.ActivityThread.-wrap11 (ActivityThread.java)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1488)
at android.os.Handler.dispatchMessage (Handler.java:111)
at android.os.Looper.loop (Looper.java:207)
at android.app.ActivityThread.main (ActivityThread.java:5728)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:679)
The crash is spread evenly across all versions of Android. I don’t understand - it works for me and it works for 97% of other people, how can the link be missing for some people? Any thoughts on what the problem could be?
We’re using SDKBox IAP, Chartboost, and Admob fyi.
I disabled Proguard, thinking that might be causing this weird linking issue. No luck, still getting a 3% crash rate - and it’s all due to this UnsatisfiedLinkError in SDKBox. I don’t know what else to try, I’m really not familiar with how linking works on Android… I’ve tested on five devices and have never gotten the crash, but 3% crash rate is extremely high - and I can’t see any pattern to which users are getting the crash.
My other games are only getting a 0.06% crash rate, 50x less! Those games also use Cocos and SDKBox, although older versions (Cocos 3.14, I believe) and they also used only In App Purchases, not ChartBoost and AdMob adverts. I’m at a loss as to what I should try.
One pattern I noticed is that the number of crash reports and the number impacted users are very similar. Most users that get a boot crash would try the game again… this indicates that users are only getting the crash once - upon retrying it, the game works for them. So I would guess that it is randomly failing 3% of the time. Arghh, frustrated! Maybe if I boot the game a bunch of times, I’ll eventually get the crash myself… though I’m not sure if that will actually help me fix it. Anyone have ideas???
Thank you for looking at this… I don’t see any patterns in which devices are getting the crash, Google Play groups it into two different crashes, 8.0 and earlier, and 8.1 and later - but looks like the exact same crash to me. It seems evenly distributed across Android versions and devices.
I can look into this, although it’s a bit daunting to add a new library to the game when I’m already having issues with another library… possibly because I’ve configured something incorrectly (I’d be worried about causing even more problems by trying to add firebase)
Thank you for the help! Unfortunately I’m still stuck and I don’t have any more time to dedicate to this right now. Very frustrating to have such a high crash rate. Fortunately it isn’t causing negative reviews, actually our reviews are extremely high. I think the main downside to the crashes is that Google considers it “Bad Behaviour” so that could effect how much they promote us or the order we show up in search results, I’m not sure exactly. Developing on Android is just a disaster and I need to work on other things now.
If I put more work into this I’ll rip out SDKBox because I have to assume that’s where this particular issue is coming from. At least if it’s my own code I’ll get better crash reports and be more likely able to fix the issue.
I have upgraded SdkBox 2.4.0.0 up to 2.4.1.1 version, and now see a lot of UnsatisfiedLinkError’s on google play that are related to SDKBox.init call. I’ve never saw such a sdkbox errors before this update.
Additionally I have another new issue I think it is related to review plugin:
android.view.WindowManager$BadTokenException
org.codechimp.apprater.AppRater.showRateAlertDialog
android.view.WindowManager$BadTokenException:
at android.view.ViewRootImpl.setView (ViewRootImpl.java:793)
at android.view.WindowManagerGlobal.addView (WindowManagerGlobal.java:356)
at android.view.WindowManagerImpl.addView (WindowManagerImpl.java:93)
at android.app.Dialog.show (Dialog.java:330)
at org.codechimp.apprater.AppRater.showRateAlertDialog (AppRater.java:394)
at org.codechimp.apprater.AppRater.tryShowDialog (AppRater.java:225)
at com.sdkbox.plugin.PluginReview$1.run (PluginReview.java:58)
at android.os.Handler.handleCallback (Handler.java:790)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6626)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:811)
I didn’t have this crash personally. I have a lot of them on google play console. I assume it has happening when user closes review dialog not by tapping any of review dialog buttons but maybe hardware back button. Also I’m displaying review dialog only after some in-game events, never at app launch.