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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

149429 Nov 26,2019 07:31 AM UTC Nov 27,2019 03:51 PM UTC Xamarin.Forms 1
loading
Tags: SfMaps
Philippe
Asked On November 26, 2019 07:31 AM UTC

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.


Vignesh Ramesh [Syncfusion]
Replied On 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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon