ThinkGeo.com    |     Documentation    |     Premium Support

Android crash with touch operations

Two different issues here-- but both result in a similar exception being thrown. First instance is zooming in/out as fast as you can using as many fingers as you can on the screen. Easily reproducible on the HowDoIsample application. This results in a “java.lang.IllegalArgumentException: pointerIndex out of range” crash.

The second case : When a user is placing a polygon we want to restrict how the polygon is drawn. We wanted to do this while the user was actively drawing polygons - to accomplish this we added a VertexAdding event to the trackOverlay. if a vertex violated one of our drawing rules the intent was to set Cancel=true to reject that vertex. This works fine until you touch the screen to place the next point – when you touch the screen you get another pointer index out of range crash. Simples way to duplicate is add the VertexAdding even and set Cancel=true . 2nd point placed will result in crash. As mentioned we were placing a polygon when this happened.

I can attach the logcat dump files – but both issues are relatively easy to duplicate.

Hi Richard6,

I reproduced your first issue in the HowDoISample, the issue just disappeared after we upgraded Xamarin Form from 4.x to 5.x in HowDoISample, I also fixed some vulnerable code to make sure it works well even with Xamarin Form is 4.x.

We updated HowDoISample project and released a new version of ThinkGeo.UI.XamarinForms.Android 13.0.0-beta221, could you give it a try and see if the second issue still exists after upgrading to ThinkGeo.UI.XamarinForms.Android 13.0.0-beta221?

Thanks,
Leo

In our application we actually use Thinkgeo.UI.Android with our own implementation of a xamarin form. However we did put a workaround in place so that this does not affect us. When I have a chance I will disable the workaround and test our code again with the latest Thinkgeo versions.

I did update the sample to the latest Thinkgeo version and was unable to make it crash anymore.

Great, feel free to let me know if you face any issues. :slight_smile:

Thanks,
Leo