这些Google Maps v2 StackOverflowError崩溃是否有解决方法/修复? [英] Is there a workaround/fix to these Google Maps v2 StackOverflowError crashes?

查看:81
本文介绍了这些Google Maps v2 StackOverflowError崩溃是否有解决方法/修复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每天在我的生产应用中发生与Google Maps v2相关的多次崩溃.

Seeing multiple crashes in my production app related to Google Maps v2, hundreds per day.

即使在Lyft,Yelp,Ritual应用程序上,我也可以解决该问题.

I can repro the issue even on Lyft, Yelp, Ritual apps.

复制步骤

  1. 添加com.google.android.gms:play-services-maps 11.8.0或更高版本(也 在15.0.0崩溃)到应用程序
  2. 获取Google Play服务12.6.85(040400-197041431)
  3. 添加SupportMapFragment
  4. 打开应用,位于美国加利福尼亚州旧金山的任务区"中心地图上
  5. 尝试快速放大或缩小,或上下滚动,但始终将Missin District置于中心位置
  1. Add com.google.android.gms:play-services-maps 11.8.0 or above (also crashes on 15.0.0) to app
  2. Get Google Play Services 12.6.85 (040400-197041431)
  3. Add SupportMapFragment
  4. Open app, center map on "Mission District" in San Francisco, CA, USA
  5. Try zooming in and out very fast, or scrolling up and down but always keeping Missin District in the center

期望

  1. 没有崩溃

实际

  1. 崩溃

总体而言,崩溃发生在多个操作系统上:5、6、7、8.分别地,我查看的崩溃是针对目标1-2个操作系统的最大值,例如5 + 6、7、7 + 8.

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.

所有堆栈跟踪似乎都包含com.google.maps.api.android.lib6.gmm6.indoor.*软件包.

The stack traces all seem to involve com.google.maps.api.android.lib6.gmm6.indoor.* packages.

这是我在 AOSP问题跟踪器上看到的最接近的问题.请查看有关该问题的重复项,以查找具有不同堆栈跟踪的类似问题.

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@12685021@12.6.85 (040306-197041431):7)
       at com.google.maps.api.android.lib6.gmm6.indoor.o.c(:com.google.android.gms.dynamite_dynamitemodulesb@12685021@12.6.85 (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@12685025@12.6.85 (040408-197041431):17)
      at com.google.maps.api.android.lib6.gmm6.indoor.o.c(:com.google.android.gms.dynamite_dynamitemodulesb@12685025@12.6.85 (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@12685025@12.6.85 (040408-197041431):7)
    at com.google.maps.api.android.lib6.gmm6.indoor.o.c(:com.google.android.gms.dynamite_dynamitemodulesb@12685025@12.6.85 (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@12685023@12.6.85 (040400-197041431):9)
    at com.google.maps.api.android.lib6.gmm6.indoor.o.b(:com.google.android.gms.dynamite_dynamitemodulesb@12685023@12.6.85 (040400-197041431):159)
    at com.google.maps.api.android.lib6.gmm6.indoor.o.c(:com.google.android.gms.dynamite_dynamitemodulesb@12685023@12.6.85 (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@12685023@12.6.85 (040400-197041431):5)
    at com.google.maps.api.android.lib6.gmm6.util.e.d(:com.google.android.gms.dynamite_dynamitemodulesb@12685023@12.6.85 (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@12685023@12.6.85 (040400-197041431):9)
       at com.google.maps.api.android.lib6.gmm6.indoor.o.b(:com.google.android.gms.dynamite_dynamitemodulesb@12685023@12.6.85 (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@12685023@12.6.85 (040400-197041431):17)
      at com.google.maps.api.android.lib6.gmm6.indoor.o.c(:com.google.android.gms.dynamite_dynamitemodulesb@12685023@12.6.85 (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@12685023@12.6.85 (040400-197041431):29)
     at com.google.maps.api.android.lib6.gmm6.util.e.a(:com.google.android.gms.dynamite_dynamitemodulesb@12685023@12.6.85 (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@12685009@12.6.85 (020308-197041431):20)
    at com.google.maps.api.android.lib6.gmm6.store.cache.s.a(:com.google.android.gms.dynamite_dynamitemodulesb@12685009@12.6.85 (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@12685021@12.6.85 (040306-197041431):9)
       at com.google.maps.api.android.lib6.gmm6.indoor.o.b(:com.google.android.gms.dynamite_dynamitemodulesb@12685021@12.6.85 (040306-197041431):159)

推荐答案

在尝试了多种方法之后,如果不需要室内贴图,以下是对我有用的解决方法.

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);

我看到的所有崩溃都与室内包装有关,所以这很有意义.希望很快会发布修复程序.如果解决了关于AOSP跟踪器的问题,将会发布.

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.

好消息. Google在2018年10月20日将该错误标记为已修复".GooglePlay服务中最新的Maps Android SDK发行说明中也提到了该错误

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

这篇关于这些Google Maps v2 StackOverflowError崩溃是否有解决方法/修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆