mohesu / map_location_picker

Map location picker for flutter Based on google_maps_flutter
Apache License 2.0
46 stars 68 forks source link

Lost Connection When change address multiple times #26

Closed vugn closed 11 months ago

vugn commented 1 year ago

Hello, I am just testing this package and found this error when I choose a location and click the send button. It happens on both real devices and emulators, and in both debug and prod modes.

E/AndroidRuntime(20167): FATAL EXCEPTION: GLThread 124989
E/AndroidRuntime(20167): Process: com.p2mwuniska.tambalin, PID: 20167
E/AndroidRuntime(20167): java.lang.NullPointerException: Attempt to get length of null array
E/AndroidRuntime(20167):    at java.nio.ByteBufferAsIntBuffer.put(ByteBufferAsIntBuffer.java:122)
E/AndroidRuntime(20167):    at com.google.maps.api.android.lib6.gmm6.vector.gl.buffer.n.i(:com.google.android.gms.dynamite_mapsdynamite@233116037@23.31.16 (150400-0):26)
E/AndroidRuntime(20167):    at com.google.maps.api.android.lib6.gmm6.vector.gl.buffer.n.d(:com.google.android.gms.dynamite_mapsdynamite@233116037@23.31.16 (150400-0):29)
E/AndroidRuntime(20167):    at com.google.maps.api.android.lib6.gmm6.vector.gl.drawable.d.s(:com.google.android.gms.dynamite_mapsdynamite@233116037@23.31.16 (150400-0):23)
E/AndroidRuntime(20167):    at com.google.maps.api.android.lib6.gmm6.vector.gl.drawable.ao.s(:com.google.android.gms.dynamite_mapsdynamite@233116037@23.31.16 (150400-0):171)
E/AndroidRuntime(20167):    at com.google.maps.api.android.lib6.gmm6.vector.bx.s(:com.google.android.gms.dynamite_mapsdynamite@233116037@23.31.16 (150400-0):533)
E/AndroidRuntime(20167):    at com.google.maps.api.android.lib6.gmm6.vector.bq.b(:com.google.android.gms.dynamite_mapsdynamite@233116037@23.31.16 (150400-0):2337)
E/AndroidRuntime(20167):    at com.google.maps.api.android.lib6.gmm6.vector.at.run(:com.google.android.gms.dynamite_mapsdynamite@233116037@23.31.16 (150400-0):774)
I/Process (20167): Sending signal. PID: 20167 SIG: 9
Lost connection to device.
Exited (sigterm)

Device: Emulator API 24 Redmi Note 9 Pro

Flutter Doctor:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.10.6, on Microsoft Windows [Version 10.0.22621.2134], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.3)
[√] Android Studio (version 2022.2)
[√] VS Code (version 1.81.1)
[√] Connected device (4 available)
[√] Network resources

• No issues found!
rvndsngwn commented 1 year ago

Let me check this issue and see if it resolves the problem. I'll get back to you once I've had a chance to test it out. Thanks @vugn

vugn commented 1 year ago

I just checked another package like this and tried some experiment, and I have a conclusion, I think it's because the Google Maps package is closed before rendering, so I need to make a delay before the user close it and it's working now

hgandhi67 commented 1 year ago

I just checked another package like this and tried some experiment, and I have a conclusion, I think it's because the Google Maps package is closed before rendering, so I need to make a delay before the user close it and it's working now

Can you please share the sample code for this?? I mean how and where we need to add this delay??

vugn commented 1 year ago

I just checked another package like this and tried some experiment, and I have a conclusion, I think it's because the Google Maps package is closed before rendering, so I need to make a delay before the user close it and it's working now

Can you please share the sample code for this?? I mean how and where we need to add this delay??

Sorry for my late response, I use when I want to close the map, so the map can finish render first, like WillPopScope just use Future.delayed()