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

Crashes in iOS

This crash is happening in iOS since version 10.0 (tested in the simulator).

This is the source code of the page where the exception is being throwing:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:i="clr-namespace:Plugin.Iconize;assembly=Plugin.Iconize"
             xmlns:navigationdrawer="clr-namespace:Syncfusion.SfNavigationDrawer.XForms;assembly=Syncfusion.SfNavigationDrawer.XForms"
             x:Class="Acanto.WiseShopper.HomeContentPage"
             Style="{StaticResource ContentPage_Style}">
    <ContentPage.Content>
        <Grid x:Name="gridBody"
              ColumnSpacing="0"
              RowSpacing="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <ScrollView x:Name="scrollBody"
                        Padding="5,0" />
            <navigationdrawer:SfNavigationDrawer x:Name="navigationDrawer"
                                                 DrawerWidth="200"
                                                 Grid.ColumnSpan="3"
                                                 Grid.RowSpan="2"
                                                 Grid.Row="1" />
          
          </Grid>
    </ContentPage.Content>
</ContentPage>

Stack trace:
  at Syncfusion.SfNavigationDrawer.XForms.iOS.SfNavigationDrawerMapping.OnNavigationDrawerPropertiesChanged (System.String propertyName, Syncfusion.SfNavigationDrawer.XForms.SfNavigationDrawer formsnavigationDrawer, Syncfusion.SfNavigationDrawer.iOS.SfNavigationDrawer nativenavigationDrawer, System.Single screenWidth, System.Single screenHeight) [0x001b9] in <81ae093163d04e5b81caa9de6b0edd5e>:0
  at Syncfusion.SfNavigationDrawer.XForms.iOS.SfNavigationDrawerRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) [0x000ac] in <81ae093163d04e5b81caa9de6b0edd5e>:0
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x0012a] in <7218c7c87f004ed1b7043c0af66038c6>:0
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <7218c7c87f004ed1b7043c0af66038c6>:0
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:198
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003d] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:97
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:46
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000de] in <7218c7c87f004ed1b7043c0af66038c6>:0
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <7218c7c87f004ed1b7043c0af66038c6>:0
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:198
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003d] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:97
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:46
  at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x00086] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:127
  at (wrapper managed-to-native) ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper(intptr,intptr)
  at UIKit.UIViewController.get_View () [0x0002a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.11/src/Xamarin.iOS/UIKit/UIViewController.g.cs:2983
  at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:44
  at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0004f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:59
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:198
  at Xamarin.Forms.Platform.iOS.NavigationRenderer.CreateViewControllerForPage (Xamarin.Forms.Page page) [0x00008] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:353
  at Xamarin.Forms.Platform.iOS.NavigationRenderer+<OnPushAsync>d__51.MoveNext () [0x0001d] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:340
--- End of stack trace from previous location where exception was thrown ---
  at Xamarin.Forms.Platform.iOS.NavigationRenderer+<<ViewDidLoad>b__46_0>d.MoveNext () [0x00024] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:235
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.11/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1023
  at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.11/src/Xamarin.iOS/Foundation/NSAction.cs:178
  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/12.2.1.11/src/Xamarin.iOS/UIKit/UIApplication.cs:79
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.11/src/Xamarin.iOS/UIKit/UIApplication.cs:63
  at Acanto.WiseShopper.iOS.Application.Main (System.String[] args) [0x00002] in C:\Projects\Halifax\Source\WiseShopper\WiseShopper.iOS\Main.cs:19

7 Replies

MS Mugundhan Saravanan Syncfusion Team January 30, 2019 05:19 PM UTC

Hi Wallace,

Greetings from Syncfusion.

Query:” crash  in iOS”

We have tried to replicate the reported issue at our end by creating a sample using the provided code snippets, we are afraid that we are not able to reproduce the issue at our end. We have attached the tested sample for your reference.

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/NavigationDrawerSample_3616810542  

Since we are not aware of your exact application scenario, we were not able to reproduce this issue at our end, so can you please revert us by modifying the sample based on your application along with replication procedure. This will be helpful for us to investigate further and provide you a better solution at the earliest.

Regards,
Mugundhan S.



WS Wallace Santos January 30, 2019 11:16 PM UTC

Hi Mugundhan

I downloaded your sample code. It is easy to see why you can't reproduce the problem!!! 

You didn't follow the steps defined by your company in the https://help.syncfusion.com/xamarin/sfnavigationdrawer/getting-started page, added one empty SfNavigationDrawerRederer class in the iOS project, create an instance and? 

Try to add this line in your sample, as Syncfusion documentation above mentioned ask:

public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{

             new Syncfusion.SfNavigationDrawer.XForms.iOS.SfNavigationDrawerRenderer();
            global::Xamarin.Forms.Forms.Init();
            
            new SfNavigationDrawerRenderer();
            
            LoadApplication(new App());


            return base.FinishedLaunching(app, options);
}

With this line, run in iOS and try to get the mentioned exception, because it happens.


DR Dhanasekar R Syncfusion Team January 31, 2019 07:35 AM UTC

Hi Wallace, 
 
Thanks for the additional information. 
 
We are able to reproduce the crash from our side. This crash can be resolved by setting ContentView to SfNavigationDrawer as like below code snippet. 
 
<navigationdrawer:SfNavigationDrawer>
            <navigationdrawer:SfNavigationDrawer.ContentView>
                <Grid  />
            </navigationdrawer:SfNavigationDrawer.ContentView>
 </navigationdrawer:SfNavigationDrawer> 
 
 
Can you please try this solution and let us know if you are still facing the problem? 
 
Regards, 
Dhanasekar 



WS Wallace Santos January 31, 2019 02:05 PM UTC

Hi Dhanasekar

Now we have a solution. Your approach worked fine, thanks a lot!

I strongly recommend you update your documentation in the https://help.syncfusion.com/xamarin/sfnavigationdrawer/getting-started noticing other users about this problem.

Best regards

Wallace


DR Dhanasekar R Syncfusion Team February 1, 2019 11:36 AM UTC

Hi Wallace,  
 
Thanks for your valuable feedback. We have considered your request and we will update the UG document. We will let know once the document is updated. 
 
Regards, 
Dhanasekar 



JW Jim Wallery July 2, 2019 09:19 PM UTC

The error below appears to be a similar error that I am receiving to this particular thread in that it is occurring only on the iOS target and the error message looks similar.  I am running 17.1.0.53 Syncfusion.Xamarin.SfNavigationDrawer and 4.1.0.555618 Xamarin.Forms.  Any ideas on a possible solution.  Appears to be running fine in Android and UWP.

at (wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr)
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:146 
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:182 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003d] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:97 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:46 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000de] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:264 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:146 
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:182 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003d] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:97 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:46 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000de] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:264 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:146 
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:182 
  at Syncfusion.SfNavigationDrawer.XForms.iOS.SfNavigationDrawerRenderer.Convert (Xamarin.Forms.View source, Xamarin.Forms.VisualElement valid) [0x00014] in <d03a7c56b35140c885b14bd76daf40f6>:0 
  at Syncfusion.SfNavigationDrawer.XForms.iOS.SfNavigationDrawerRenderer.ConvertFormsToNative (Xamarin.Forms.View view, CoreGraphics.CGRect size, System.Boolean contentView, Syncfusion.SfNavigationDrawer.XForms.SfNavigationDrawer formsDrawer) [0x00025] in <d03a7c56b35140c885b14bd76daf40f6>:0 
  at Syncfusion.SfNavigationDrawer.XForms.iOS.DrawerSettingsMapping.DrawerContentViewConversion () [0x000c3] in <d03a7c56b35140c885b14bd76daf40f6>:0 
  at Syncfusion.SfNavigationDrawer.XForms.iOS.DrawerSettingsMapping.OnDrawerSettingsPropertiesChanged (System.String propertyName, Syncfusion.SfNavigationDrawer.XForms.DrawerSettings formsDrawerSettings, Syncfusion.SfNavigationDrawer.iOS.DrawerSettings nativeDrawerSettings) [0x00bf8] in <d03a7c56b35140c885b14bd76daf40f6>:0 
  at Syncfusion.SfNavigationDrawer.XForms.iOS.DrawerSettingsMapping.GetDrawerSettings (Syncfusion.SfNavigationDrawer.XForms.DrawerSettings formsDrawerSettings, Syncfusion.SfNavigationDrawer.XForms.SfNavigationDrawer formsNavigation, Syncfusion.SfNavigationDrawer.iOS.DrawerSettings nativeDrawerSettings, System.Single _width, System.Single _height) [0x00048] in <d03a7c56b35140c885b14bd76daf40f6>:0 
  at Syncfusion.SfNavigationDrawer.XForms.iOS.SfNavigationDrawerMapping.OnNavigationDrawerPropertiesChanged (System.String propertyName, Syncfusion.SfNavigationDrawer.XForms.SfNavigationDrawer formsnavigationDrawer, Syncfusion.SfNavigationDrawer.iOS.SfNavigationDrawer nativenavigationDrawer, System.Single screenWidth, System.Single screenHeight) [0x01317] in <d03a7c56b35140c885b14bd76daf40f6>:0 
  at Syncfusion.SfNavigationDrawer.XForms.iOS.SfNavigationDrawerRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) [0x000ac] in <d03a7c56b35140c885b14bd76daf40f6>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00122] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:277 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:146 
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:182 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003d] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:97 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:46 
  at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x0008f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:221 
  at (wrapper managed-to-native) ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper(intptr,intptr)
  at UIKit.UIViewController.get_View () [0x0002a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.16/src/Xamarin.iOS/UIKit/UIViewController.g.cs:2983 
  at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:97 
  at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0003d] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:113 
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:182 
  at Xamarin.Forms.Platform.iOS.NavigationRenderer.CreateViewControllerForPage (Xamarin.Forms.Page page) [0x00008] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:358 
  at Xamarin.Forms.Platform.iOS.NavigationRenderer+<OnPushAsync>d__51.MoveNext () [0x0001d] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:345 


MK Muneesh Kumar G Syncfusion Team July 3, 2019 08:50 AM UTC

Hi Jim, 
 
We have analyzed your query and created a simple sample with SfNavigationDrawer in 17.1.0.53 and Xamarin.Forms 4.1.0.555618.  
 
Unfortunately, we are unable to reproduce the issue. We have attached the sample with which we have checked the issue. Please have the sample from the below link, 
 
Sample Link : 
 
Please check with the sample and if the issue mentioned occurs with the different scenario please modify the sample with which you could reproduce the issue which will be helpful for us to analyze further and provide an appropriate solution. 
  
Regards, 
Muneesh Kumar G.   


Loader.
Live Chat Icon For mobile
Up arrow icon