Seeing multiple crashes in my production app related to Google Maps v2, hundreds per day.
I can repro the issue even on Lyft, Yelp, Ritual apps.
Repro Steps
Expected
Actual
As an aggregate, the crashes hit multiple OS's: 5, 6, 7, 8. Individually, the crashes I've looked at target 1-2 OS's max, e.g. 5+6, 7, 7+8.
The stack traces all seem to involve com.google.maps.api.android.lib6.gmm6.indoor.*
packages.
This is the closest issue I saw on AOSP Issue Tracker. Check out the Duplicates on that issue for similar issues with different stacktraces.
Here are snippets of some of the stacktraces I see (there are a LOT more):
Fatal Exception: java.lang.StackOverflowError: stack size 1038KB
at java.util.HashMap.getEntry(HashMap.java:393)
at java.util.HashMap.get(HashMap.java:348)
at com.google.maps.api.android.lib6.gmm6.util.e.b(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040306-197041431):7)
at com.google.maps.api.android.lib6.gmm6.indoor.o.c(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040306-197041431):193)
Fatal Exception: java.lang.StackOverflowError: stack size 1037KB
at java.util.HashMap.createEntry(HashMap.java:826)
at java.util.HashMap.addEntry(HashMap.java:813)
at java.util.HashMap.put(HashMap.java:436)
at com.google.maps.api.android.lib6.gmm6.util.e.b(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040408-197041431):17)
at com.google.maps.api.android.lib6.gmm6.indoor.o.c(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040408-197041431):193)
Fatal Exception: java.lang.StackOverflowError: stack size 8MB
at java.util.HashMap.get(HashMap.java:556)
at com.google.maps.api.android.lib6.gmm6.util.e.b(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040408-197041431):7)
at com.google.maps.api.android.lib6.gmm6.indoor.o.c(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040408-197041431):193)
Fatal Exception: java.lang.StackOverflowError: stack size 1037KB
at java.util.ArrayList.<init>(ArrayList.java:191)
at com.google.maps.api.android.lib6.common.i.<init>(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040400-197041431):9)
at com.google.maps.api.android.lib6.gmm6.indoor.o.b(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040400-197041431):159)
at com.google.maps.api.android.lib6.gmm6.indoor.o.c(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040400-197041431):161)
Fatal Exception: java.lang.StackOverflowError: stack size 1037KB
at com.google.maps.api.android.lib6.gmm6.util.e.a(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040400-197041431):5)
at com.google.maps.api.android.lib6.gmm6.util.e.d(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040400-197041431):33)
Fatal Exception: java.lang.StackOverflowError: stack size 1037KB
at com.google.maps.api.android.lib6.common.i.<init>(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040400-197041431):9)
at com.google.maps.api.android.lib6.gmm6.indoor.o.b(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040400-197041431):159)
Fatal Exception: java.lang.StackOverflowError: stack size 1037KB
at java.util.HashMap.putVal(HashMap.java:630)
at java.util.HashMap.put(HashMap.java:611)
at com.google.maps.api.android.lib6.gmm6.util.e.b(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040400-197041431):17)
at com.google.maps.api.android.lib6.gmm6.indoor.o.c(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040400-197041431):193)
Fatal Exception: java.lang.StackOverflowError: stack size 1037KB
at java.util.HashMap.remove(HashMap.java:798)
at com.google.maps.api.android.lib6.gmm6.util.e.d(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040400-197041431):29)
at com.google.maps.api.android.lib6.gmm6.util.e.a(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040400-197041431):37)
Fatal Exception: java.lang.StackOverflowError: stack size 1036KB
at java.util.HashMap.get(HashMap.java:300)
at com.google.maps.api.android.lib6.gmm6.util.e.b(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (020308-197041431):20)
at com.google.maps.api.android.lib6.gmm6.store.cache.s.a(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (020308-197041431):8)
Fatal Exception: java.lang.StackOverflowError: stack size 1038KB
at java.util.ArrayList.toArray(ArrayList.java:364)
at java.util.ArrayList.<init>(ArrayList.java:171)
at com.google.maps.api.android.lib6.common.i.<init>(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040306-197041431):9)
at com.google.maps.api.android.lib6.gmm6.indoor.o.b(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040306-197041431):159)
So that the users can take an alternate route to reach your destination without getting stuck in traffic and reach on time. As spotted by one of the users and reported by Android Police, the crash/accident can be reported by using a button displayed at the end of the screen.
After trying multiple things, the following is a workaround that worked for me, if you don't require indoor mapping.
// Kotlin
googleMap.isIndoorEnabled = false
// Java
googleMap.setIndoorEnabled(false);
All the crashes I was seeing were related to the indoor package, so this makes some sense. Hopefully, a fix is released soon. Will post if the issue on AOSP tracker is solved.
Good news. Google marked the bug as Fixed on October 20, 2018. Also it was mentioned in release notes of latest Maps Android SDK in Google Play Services
https://developers.google.com/maps/documentation/android-sdk/releases#october_18_2018
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With