Map crashes when selecting current selected state

When a map has a shape file layer with item source and shape selected handler it will crash when pressing a state 2 consecutive times. This was tested on an Android device with a xamarin forms application.

Step:

  1. Create map with shape file layer
  2. Bind collection to ItemsSource in above shape file layer
  3. Define and bind ShapeSelected even handler
  4. Launch app
  5. Select state that has bound item source data
  6. Select above state again. App crashes with following exception
Unhandled Exception:

System.NullReferenceException: Object reference not set to an instance of an object.

05-25 09:33:59.657 I/MonoDroid( 7570): UNHANDLED EXCEPTION:
05-25 09:33:59.662 I/MonoDroid( 7570): System.NullReferenceException: Object reference not set to an instance of an object.
05-25 09:33:59.662 I/MonoDroid( 7570):   at (wrapper dynamic-method) System.Object.c7a8f7cb-0abf-4a6a-967a-a6e673ce2729(intptr,intptr,intptr)
05-25 09:33:59.662 I/MonoDroid( 7570):   at (wrapper managed-to-native) Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_boolean_method_a(intptr,intptr&,intptr,intptr,intptr,Java.Interop.JniArgumentValue*)
05-25 09:33:59.662 I/MonoDroid( 7570):   at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualBooleanMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00073] in <09bf3e262b934ffab2ba01f9fc7fd54d>:0 
05-25 09:33:59.662 I/MonoDroid( 7570):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0005d] in <09bf3e262b934ffab2ba01f9fc7fd54d>:0 
05-25 09:33:59.662 I/MonoDroid( 7570):   at Android.Views.View.DispatchTouchEvent (Android.Views.MotionEvent e) [0x00031] in <25661073a35344a89f215a4cf81af37c>:0 
05-25 09:33:59.662 I/MonoDroid( 7570):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].DispatchTouchEvent (Android.Views.MotionEvent e) [0x0000a] in D:\agent_work\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:63 
05-25 09:33:59.662 I/MonoDroid( 7570):   at Android.Views.View.n_DispatchTouchEvent_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_e) [0x0000f] in <25661073a35344a89f215a4cf81af37c>:0 


1 Reply

SG Sri Gayathri Gopalakrishnan Syncfusion Team May 28, 2018 12:28 PM UTC

Hi Andrew, 
 
We have analyzed your query, we were unable to reproduce your scenario but based on the given callstack, NullReferenceException issue has been reproduced and fixed. This fix will be included in our upcoming vol 2sp1 release which is expected to be rolled out by the end of June 2018.  
 
Regards, 
Sri Gayathri. G 


Loader.
Up arrow icon