Forgot to say that the error is happening on android. In the simulator this 
is OK.

On Thursday, August 9, 2018 at 5:56:41 AM UTC+2, Thomas wrote:
>
> I use the native map cn1lib with a maplistener that, when the position of 
> the map changed, performs a getBoundingBox() request on the map (to get the 
> new bounding box of the displayed zone) and then use a third party database 
> to request some elements into this zone. 
> The problem is that, when the map is dragged, the app sometimes fails 
> during this process with the following error:
>
> D/MyApplication( 5619): [EDT] 0:1:18,984 - Exception: 
> java.lang.ArrayIndexOutOfBoundsException - length=0; index=0
> W/System.err( 5619): java.lang.ArrayIndexOutOfBoundsException: length=0; 
> index=0
> W/System.err( 5619):    at com.codename1.ui.Form.pointerDragged(Unknown 
> Source)
> W/System.err( 5619):    at com.codename1.ui.Display.handleEvent(Unknown 
> Source)
> W/System.err( 5619):    at com.codename1.ui.Display.edtLoopImpl(Unknown 
> Source)
> W/System.err( 5619):    at com.codename1.ui.Display.invokeAndBlock(Unknown 
> Source)
> W/System.err( 5619):    at com.codename1.ui.Display.invokeAndBlock(Unknown 
> Source)
> W/System.err( 5619):    at 
> com.codename1.impl.android.AndroidImplementation.runOnUiThreadAndBlock(Unknown
>  
> Source)
> W/System.err( 5619):    at 
> com.codename1.googlemaps.InternalNativeMapsImpl.calcLatLongPosition(InternalNativeMapsImpl.java:1331)
> W/System.err( 5619):    at 
> com.codename1.googlemaps.InternalNativeMapsStub.calcLatLongPosition(InternalNativeMapsStub.java:265)
> W/System.err( 5619):    at 
> com.codename1.googlemaps.MapContainer.getCoordAtPosition(MapContainer.java:1477)
> W/System.err( 5619):    at 
> com.codename1.googlemaps.MapContainer.getBoundingBox(MapContainer.java:1366)
> W/System.err( 5619):    at 
> org.tbdlab.myapp.ui.components.map.MapWithParkings.getBoundingBox(MapWithParkings.java:253)
> W/System.err( 5619):    at 
> org.tbdlab.myapp.ui.components.map.ParkingsMap.fetchZoneParkings(ParkingsMap.java:85)
> W/System.err( 5619):    at 
> org.tbdlab.myapp.ui.components.map.ParkingsMap.access$000(ParkingsMap.java:33)
> W/System.err( 5619):    at 
> org.tbdlab.myapp.ui.components.map.ParkingsMap$1.mapPositionUpdated(ParkingsMap.java:55)
> W/System.err( 5619):    at 
> com.codename1.googlemaps.MapContainer.fireMapListenerEvent(MapContainer.java:1678)
> W/System.err( 5619):    at 
> com.codename1.googlemaps.MapContainer$7.run(MapContainer.java:1577)
> W/System.err( 5619):    at 
> com.codename1.ui.Display.processSerialCalls(Unknown Source)
> W/System.err( 5619):    at com.codename1.ui.Display.edtLoopImpl(Unknown 
> Source)
> W/System.err( 5619):    at com.codename1.ui.Display.invokeAndBlock(Unknown 
> Source)
> W/System.err( 5619):    at com.codename1.ui.Display.invokeAndBlock(Unknown 
> Source)
>
> any idea of what might be the cause of this issue and how to fix it? 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/11c1700a-8d26-4f80-b9e9-d80cb5d83fbb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to