We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

SFMaps Crashes when reload page from menu in a masterdetail page in IOS

I have a master detail Page with a menu to access multiple pages.
The first page contains a SFMaps which is loaded fine.
When i navigate on an other page and come back to the first one, the app crashes only in IOS.

Erro Log : 
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at Syncfusion.SfMaps.iOS.SFShapeFileLayer.GetLatitudeLongitudeFromPoint (CoreGraphics.CGPoint pointXY) [0x0003f] in <009a2014e4c64d63a15e7a528698e0e7>:0 
  at Syncfusion.SfMaps.iOS.SFMap.set_Frame (CoreGraphics.CGRect value) [0x0029a] in <009a2014e4c64d63a15e7a528698e0e7>:0 
  at Xamarin.Forms.Platform.iOS.ViewRenderer`2[TView,TNativeView].LayoutSubviews () [0x00013] in D:\a\1\s\Xamarin.Forms.Platform.iOS\ViewRenderer.cs:77 
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.6.0.12/src/Xamarin.iOS/UIKit/UIApplication.cs:86 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.6.0.12/src/Xamarin.iOS/UIKit/UIApplication.cs:65 
  at Aster.iOS.Application.Main (System.String[] args) [0x00001] in /Users/philippehoarau/Desktop/Aster-SAV/Aster.iOS/Main.cs:17
2019-11-26 11:13:48.358152+0400 Aster.iOS[43334:4432599] Unhandled managed exception: Object reference not set to an instance of an object (System.NullReferenceException)
  at Syncfusion.SfMaps.iOS.SFShapeFileLayer.GetLatitudeLongitudeFromPoint (CoreGraphics.CGPoint pointXY) [0x0003f] in <009a2014e4c64d63a15e7a528698e0e7>:0 
  at Syncfusion.SfMaps.iOS.SFMap.set_Frame (CoreGraphics.CGRect value) [0x0029a] in <009a2014e4c64d63a15e7a528698e0e7>:0 
  at Xamarin.Forms.Platform.iOS.ViewRenderer`2[TView,TNativeView].LayoutSubviews () [0x00013] in D:\a\1\s\Xamarin.Forms.Platform.iOS\ViewRenderer.cs:77 
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.6.0.12/src/Xamarin.iOS/UIKit/UIApplication.cs:86 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.6.0.12/src/Xamarin.iOS/UIKit/UIApplication.cs:65 
  at Aster.iOS.Application.Main (System.String[] args) [0x00001] in /Users/philippehoarau/Desktop/Aster-SAV/Aster.iOS/Main.cs:17

Version of Xamarin Form : 4.3.0.991211
Version Of Syncfusion : 17.3.0.28

Debug Fail à line 77 of Xamarin.Forms.Plateform.iOS/viewRenderer.cs 

71 NativeView ITabStop.TabStop => Control;
72 #if __MOBILE__
73  public override void LayoutSubviews()
74 {
75 base.LayoutSubviews();
76 if (Control != null)
77 Control.Frame = new RectangleF(0, 0, (nfloat)Element.Width,(nfloat)Element.Height);
78 }
79
80 public override SizeF SizeThatFits(SizeF size)
81 {
82 if (Control == null)
83 return (base.SizeThatFits(size));

return Control.SizeThatFits(size);
}

with the stacktrace :

at Syncfusion.SfMaps.iOS.SFShapeFileLayer.GetLatitudeLongitudeFromPoint (CoreGraphics.CGPoint pointXY) [0x0003f] in <009a2014e4c64d63a15e7a528698e0e7>:0 
  at Syncfusion.SfMaps.iOS.SFMap.set_Frame (CoreGraphics.CGRect value) [0x0029a] in <009a2014e4c64d63a15e7a528698e0e7>:0 
  at Xamarin.Forms.Platform.iOS.ViewRenderer`2[TView,TNativeView].LayoutSubviews () [0x00013] in D:\a\1\s\Xamarin.Forms.Platform.iOS\ViewRenderer.cs:77 
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.6.0.12/src/Xamarin.iOS/UIKit/UIApplication.cs:86 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.6.0.12/src/Xamarin.iOS/UIKit/UIApplication.cs:65 
  at Aster.iOS.Application.Main (System.String[] args) [0x00001] in /Users/philippehoarau/Desktop/Aster-SAV/Aster.iOS/Main.cs:17


Hope you cans help me ...

Regards.


1 Reply

VR Vignesh Ramesh Syncfusion Team November 27, 2019 03:51 PM UTC

Hi Philippe, 

Greetings from Syncfusion. 

We have prepared the simple MasterDetailPage with SfMaps and checked the reported crash by navigating to the page which containing SfMaps multiple times. But we afraid that, we are not able to reproduce the reported crash in our side. Can you please check with the sample in the following location? 


If still you face the problem, please revert us by modifying the sample based on your application and configuration details. This would be helpful for us to give better solution in this. 

We have checked with the below configurations. 

Visual Studio: 2019, Version: 8.3.3 
XCode version: 11.0 
MAC OS: 10.14.6 
iPhoneSimulator: iPhone 11 Pro Max - 13.0 
Syncfusion version: 17.3.0.28 
Xamarin Forms: 4.3.0.991211 

Regards, 
Vignesh. 


Loader.
Live Chat Icon For mobile
Up arrow icon