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

Error Pages throw errors when closing via modal pops

Thread ID:

Created:

Updated:

Platform:

Replies:

146996 Aug 28,2019 01:54 AM UTC Sep 3,2019 12:16 PM UTC Xamarin.Forms 5
loading
Tags: UI Kit
Lyndon Hughey
Asked On August 28, 2019 01:54 AM UTC

The error and empty pages within the UI Kit are throwing error when you PopAsync the page. You have to open the page and close it twice to receive the error.  The error is 

"**System.ObjectDisposedException:** 'Cannot access a disposed object.
Object name: 'SfGradientViewRenderer'.'

2019-08-27 20:53:02.800501-0500 Angelia.iOS[62106:2044906] [AppCenterCrashes] ERROR: +[MSWrapperLogger MSWrapperLog:tag:level:]/7 Unhandled Exception:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'SfGradientViewRenderer'.
  at Foundation.NSObject.get_SuperHandle () [0x00012] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.14.0.110/src/Xamarin.iOS/Foundation/NSObject2.cs:449 
  at UIKit.UIView.SetNeedsDisplay () [0x00023] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.14.0.110/src/Xamarin.iOS/UIKit/UIView.g.cs:1742 
  at Syncfusion.XForms.iOS.Graphics.SfGradientViewRenderer.BackgroundBrush_PropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00099] in <86b537a434ec42f1a3ba9b5a68a32872>:0 
  at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:\
a\1\s\Xamarin.Forms.Core\BindableObject.cs:211 
  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:359 
  at Xamarin.Forms.Element.set_Parent (Xamarin.Forms.Element value) [0x000e9] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:216 
  at Syncfusion.XForms.Graphics.SfGradientView.BackgroundBrushPropertyChanged (Syncfusion.XForms.Graphics.SfGradientBrush oldValue, Syncfusion.XForms.Graphics.SfGradientBrush newValue) [0x0000d] in <94efb3866b9846b59125ec72ee515a96>:0 
  at Syncfusion.XForms.Graphics.SfGradientView.OnBackgroundBrushPropertyChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x00000] in <94efb3866b9846b59125ec72ee515a96>:0 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.
Boolean silent) [0x00120] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:445 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:379 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x00042] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:316 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:293 
  at Syncfusion.XForms.Graphics.SfGradientView.set_BackgroundBrush (Syncfusion.XForms.Graphics.SfGradientBrush value) [0x00000] in <94efb3866b9846b59125ec72ee515a96>:0 
  at Syncfusion.XForms.Buttons.SfButton.OnGradientColorPropertyChanged () [0x00014] in <
450e40dcb33442d298a31fa64d283d2e>:0 
  at Syncfusion.XForms.Buttons.SfButton.OnGradientColorPropertyChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x0000a] in <450e40dcb33442d298a31fa64d283d2e>:0 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00120] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:445 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:379 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.
Boolean checkAccess) [0x00042] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:316 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:303 
  at Xamarin.Forms.Setter.Apply (Xamarin.Forms.BindableObject target, System.Boolean fromStyle) [0x000ba] in D:\a\1\s\Xamarin.Forms.Core\Setter.cs:75 
  at Xamarin.Forms.VisualStateManager.GoToState (Xamarin.Forms.VisualElement visualElement, System.String name) [0x000be] in D:\a\1\s\Xamarin.Forms.Core\VisualStateManager.cs:88 
  at Syncfusion.XForms.iOS.Buttons.NativeTouchEffect.ChangeVisualState (System.String state) [0x00000] in <cf0a6fe010b14eed82a0909e12ee6695>:0 
  at Syncfusion.XForms.iOS.Buttons.NativeTouchEffect.TouchesBegan (Foundation.NSSet touches, UIKit.UIEvent evt) [0x00040] in <cf0a6fe010b14eed82a0909e12ee6695>:0 "

Rawoof Sharief Muthuja Sherif [Syncfusion]
Replied On August 28, 2019 07:02 AM UTC

Hi Lyndon Hughey, 

Thanks for using Syncfusion products. 

We have checked the reported issue  “ObjectDisposedException” in Essential UI Kit sample from our end. Unfortunately, the reported issue doesn’t replicate in our sample. We suspect that the reported issue is due to you have referred the old nuget packages in your application. Kindly update the nuget packages to the latest version and check the issue is replicated or not. 

If the issue still persist, kindly share below details which would helpful to analyze the issue. 

  • Issue reproduced sample.
  • Xamarin.Forms and Syncfusion nuget version you have used in your project.
  • Replication procedure and if possible share the video or gif file of the issue.

Please let us know if you need any further assistance on the reported issue. 

Regards, 
Rawoof M. 


Lyndon Hughey
Replied On August 28, 2019 03:34 PM UTC

Hi, I am attaching a sample. Please note that this happens in iOS when presenting the error pages as modals, which differs from how your sample displays them. . I have not tested Android. Thanks.

Attachment: SyncfusionPopError_6e3e1456.zip

Rawoof Sharief Muthuja Sherif [Syncfusion]
Replied On August 29, 2019 06:59 AM UTC

Hi Lyndon, 

We have checked the sample and replicated the issue. The reported issue occurs due to adding the gradient collection in Visual state. This can be resolved by setting the gradient color like below. 
 
Code snippet (XAML): 
 
<Style x:Key="SfGradientButtonStyle" TargetType="buttons:SfButton"> 
        <Setter Property="HorizontalOptions" Value="CenterAndExpand" /> 
        <Setter Property="VerticalOptions" Value="EndAndExpand" /> 
        <Setter Property="Margin" Value="0,10,0,24" /> 
        <Setter Property="TextColor" Value="{DynamicResource Gray-White}" /> 
        <Setter Property="FontFamily" Value="{StaticResource Montserrat-SemiBold}" /> 
        <Setter Property="FontSize" Value="16" /> 
        <Setter Property="HeightRequest" Value="40" /> 
        <Setter Property="CornerRadius" Value="20" /> 
        <Setter Property="WidthRequest" Value="245" /> 
        <Setter Property="FontAttributes" Value="Bold" /> 
        <Setter Property="BorderWidth" Value="0" /> 
        <Setter Property="VerticalTextAlignment" Value="Center" /> 
        <Setter Property="BackgroundGradient"> 
        <Setter.Value> 
          <gradient:SfLinearGradientBrush StartPoint="0, 0" EndPoint="1, 1"> 
            <gradient:SfLinearGradientBrush.GradientStops> 
               <gradient:SfGradientStop Offset="0" Color="{DynamicResource PrimaryColor}" /> 
               <gradient:SfGradientStop Offset="1" Color="{DynamicResource PrimaryGradient}" /> 
              </gradient:SfLinearGradientBrush.GradientStops> 
            </gradient:SfLinearGradientBrush> 
        </Setter.Value>   
        </Setter> 
    </Style> 


We have attached the sample for your reference and you can download it from the below link. 

 
Please let us know if you require further assistance on this. 

Regards, 
Rawoof M. 


Lyndon Hughey
Replied On August 30, 2019 04:44 PM UTC

That resolved the issue! Please keep in mind that the code the breaking code was code from the extension. I did not add any code to my sample. So the extension should be updated in the next release.

thanks for your help again.

Lyndon

Meikanda Nayanar [Syncfusion]
Replied On September 3, 2019 12:16 PM UTC

  
Hi Lyndon, 
We are glad that the issue has been now resolved at your end. 
We will include this changes in our next Visual Studio extension release as well as in our public github repository.  
Please let me know if you have any questions. 
Thanks, 
Meikandan 


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