Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I am getting crash on google map when i am selecting the London Location only

I have implemented google map in one of my app and when i am selecting any location rather than London than everything is working perfect but when i am trying to select any location of London and trying to zoom in and zoom out than the app will gone crash.

Please help me. And i just want to do it with the Google Map only i don't want to use any of the third party maps.

DisplayMetrics displayMetrics = new DisplayMetrics();
            getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
            int height = displayMetrics.heightPixels;
            int width = displayMetrics.widthPixels;
            LatLngBounds bounds = new LatLngBounds(new LatLng(lat, lng), new LatLng(lat, lng));
            googleMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, width, height, 20));

Logcat :

07-02 05:20:35.409 32739-665/com.example E/AndroidRuntime: FATAL EXCEPTION: GLThread 19450 Process: com.example, PID: 32739 java.lang.StackOverflowError: stack size 1037KB at com.google.maps.api.android.lib6.common.i.(:com.google.android.gms.dynamite_dynamitemodulesb@[email protected] (040408-197041431):9)

like image 988
Shubham Sejpal Avatar asked Dec 17 '22 22:12

Shubham Sejpal


1 Answers

There are multiple reports in Google issue tracker about crashes in different cities like Tokyo, San Francisco, London

https://issuetracker.google.com/issues/35829548

Please feel free to star this bug to add your vote and subscribe to notifications.

The last message from Google on June 25, 2018 states

We'll actually keep using this issue for instances of this crash where indoor maps are disabled, sorry for the confusion.

We are currently internally testing a fix for this issue and will add it to the updates pipeline once it's ready. Due to the timing of release cycles, we still recommend disabling indoor maps as best short-term workaround for now if you or your users are heavily affected. We will post an update here when the fix for this issue is rolled-out.

Try to follow their recommendation and set googleMap.setIndoorEnabled(false); as a workaround.

Update

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

like image 117
xomena Avatar answered May 12 '23 06:05

xomena