2

In my flutter application I am using google_maps_flutter for showing location,but I face this again and again when map loads lot of locations also it arise on zoom in/out action.

I already saw this issue on github but,unable to find solution their.

For more detail,below is error log:

FATAL EXCEPTION: GLThread 247496 Process: com.jio.jcpapps, PID: 31625 java.lang.NullPointerException: Attempt to get length of null array at java.nio.ByteBufferAsIntBuffer.put(ByteBufferAsIntBuffer.java:122) at com.google.maps.api.android.lib6.gmm6.vector.gl.buffer.n.i(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150400-0):2) at com.google.maps.api.android.lib6.gmm6.vector.gl.buffer.n.d(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150400-0):3) at com.google.maps.api.android.lib6.gmm6.vector.gl.drawable.ai.s(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150400-0):30) at com.google.maps.api.android.lib6.gmm6.vector.gl.drawable.ao.s(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150400-0):10) at com.google.maps.api.android.lib6.gmm6.vector.bx.s(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150400-0):29) at com.google.maps.api.android.lib6.gmm6.vector.bq.b(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150400-0):157) at com.google.maps.api.android.lib6.gmm6.vector.at.run(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150400-0):48)


Edit 1- after some R&D I found this issue is not getting on google_maps_flutter: 2.0.6 version,but problem is this also too old,not compatible with latest flutter version.

1 Answer 1

0

After a lot of research i found a "solution" that worked perfectly for me. I don't think it's the best way of solving this, but it works fine and didn't crashed the app.

So, on the MaterialPageRoute/CupertinoPageRoute inside the Navigator.of(context).push() i set both maintainState and modal to true, so the screen was always kept in stack. This didn't affect the performance and also fixed the problem for me.

I hope this works for you as well.

Sign up to request clarification or add additional context in comments.

1 Comment

The problem is not about navigation or routing, it's all about google_map plugin because this problem also arises even if you make a single-page app.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.