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

NULL Reference exception ( PopupLayout )

Thread ID:

Created:

Updated:

Platform:

Replies:

149066 Nov 13,2019 09:44 AM UTC Nov 14,2019 06:29 PM UTC Xamarin.Forms 2
loading
Tags: SfPopup
David
Asked On November 13, 2019 09:44 AM UTC

Hello!

IDE / Frameworks

VS2019 version 8.0.9 
Xamarin.Android 9.4.1.0
Xamarin.Forms 3.4.0.1029999
SfPopLayout 16.3.0.21

I updated to 10.+ Xamarin.Android and VS2019 to last version and it failed I went back to my actual versions and Im unable to make it work again.. its ever returning NullReference.. 

The error is coming on .SHOW(). 

System.NullReferenceException: Object reference not set to an instance of an object.
  at Syncfusion.XForms.Android.PopupLayout.SfPopupLayout.ApplyShadowAndBorder (Android.Views.View view) [0x0003f] in <16329dd1c4684a3d9a573cf75b2273e2>:0
  at Syncfusion.XForms.Android.PopupLayout.SfPopupLayout.DisplayPopup () [0x00064] in <16329dd1c4684a3d9a573cf75b2273e2>:0
  at Syncfusion.XForms.Android.PopupLayout.SfPopupLayout.set_IsOpen (System.Boolean value) [0x00024] in <16329dd1c4684a3d9a573cf75b2273e2>:0
  at Syncfusion.XForms.Android.PopupLayout.RendererHelper.MapSfPopupLayoutProperties (System.String propertyName, Syncfusion.XForms.PopupLayout.SfPopupLayout formsPopupLayout, Syncfusion.XForms.Android.PopupLayout.SfPopupLayout nativePopupLayout) [0x00033] in <16329dd1c4684a3d9a573cf75b2273e2>:0
  at Syncfusion.XForms.Android.PopupLayout.PopupLayoutDependencyService.MapSfPopupLayoutProperties (System.String propertyName) [0x00009] in <16329dd1c4684a3d9a573cf75b2273e2>:0
  at Syncfusion.XForms.PopupLayout.SfPopupLayout.OnIsOpenChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x00042] in <130f29f7bc694543a68bae9c5c8f085d>: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:625
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:417
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x0003d] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:573
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:99
  at Syncfusion.XForms.PopupLayout.SfPopupLayout.set_IsOpen (System.Boolean value) [0x00000] in <130f29f7bc694543a68bae9c5c8f085d>:0
  at Syncfusion.XForms.Android.PopupLayout.SfPopupLayout.OpenOrClosePopup (System.Boolean open) [0x00006] in <16329dd1c4684a3d9a573cf75b2273e2>:0
  at Syncfusion.XForms.Android.PopupLayout.SfPopupLayout.Show () [0x00010] in <16329dd1c4684a3d9a573cf75b2273e2>:0
  at Syncfusion.XForms.Android.PopupLayout.PopupLayoutDependencyService.Show (System.Object nativeObject, Syncfusion.XForms.PopupLayout.SfPopupLayout formsPopup) [0x00016] in <16329dd1c4684a3d9a573cf75b2273e2>:0
  at Syncfusion.XForms.PopupLayout.SfPopupLayout.Show () [0x0000c] in <130f29f7bc694543a68bae9c5c8f085d>:0
  at SfNavigationDrawerSampleBrowser.NacePage.OnAppearing () [0x00129] in /Users/.../SfNavigationDrawerSampleBrowser/SfNavigationDrawerSampleBrowser/SfNavigationDrawerSampleBrowser/NacePage.xaml.cs:1757
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in <ff07eae8184a40a08e79049bbcb31a0e>:0
  at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in /Users/builder/jenkins/workspace/xamarin-android-commercial/xamarin-android/src/Mono.Android/Android.App/SyncContext.cs:35
  at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in /Users/builder/jenkins/workspace/xamarin-android-commercial/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:36
  at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in /Users/builder/jenkins/workspace/xamarin-android-commercial/xamarin-android/src/Mono.Android/obj/Release/android-27/mcw/Java.Lang.IRunnable.cs:81
  at at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.34(intptr,intptr)

Thanks!

Regards,

David.



Attachment: Syncfusion_2b10fad6.zip

David
Replied On November 13, 2019 12:35 PM UTC

Same code working perfectly fine on iOs devices.. 

Karthikraja Kalaimani [Syncfusion]
Replied On November 14, 2019 06:29 PM UTC

Hi David,

Thanks for contacting Syncfusion support,

 
Query 1 : “NullReference Exception thrown in Xamarin forms Android ” 

We could not able to reproduce the reported issue “NullReferenceException” thrown while open the PopupView in SfPopupLayout version(16.3.0.21) and Xamarin Forms version (3.4.0.1029999). We have generated the custom assemblies with SfPopupLayout v16.3.0.21 and attached it in the below location. Please test your application with this assembly and let us know if your issue is resolved. 
Custom Assemblies Link :  
 
These assemblies should replace the existing assemblies in the following location.    
            
{Syncfusion Installed location}\Essential Studio\16.3.0.21\Xamarin\lib\pcl\Syncfusion.SfPopupLayout.XForms.dll                                        
{Syncfusion Installed location}\Essential Studio\16.3.0.21\Xamarin\lib\android\Syncfusion. SfPopupLayout.XForms.dll                                     
{Syncfusion Installed location}\Essential Studio\16.3.0.21\Xamarin\lib\android\Syncfusion. SfPopupLayout.XForms.Android.dll                             
{Syncfusion Installed location}\Essential Studio\16.3.0.21\Xamarin\lib\iOS\Syncfusion. SfPopupLayout.XForms.dll                                     
{Syncfusion Installed location}\Essential Studio\16.3.0.21\Xamarin\lib\iOS\Syncfusion. SfPopupLayout.XForms.iOS.dll                             
{Syncfusion Installed location}\Essential Studio\16.3.0.21\Xamarin\lib\uwp\Syncfusion. SfPopupLayout.XForms.dll                                     
{Syncfusion Installed location}\Essential Studio\16.3.0.21\Xamarin\lib\uwp\Syncfusion. SfPopupLayout.XForms.UWP.dll                              
  
Please follow the below instructions to refer the custom assemblies in you project. If you are using Nuget package, then you will need to uninstall the SfPopupLayout nuget package and refer the custom assemblies. Kindly refer the following Knowledge base (KB) for the same,  
  
   
You will also need to clear the cache to successfully apply the custom assemblies before deploying the project. Kindly refer the KB below to clear the cache,  
  


Note : The attached custom assemblies with that fix is not an exact fix, it is for testing purposes only. If your still facing same issue ? please attach the OutPut log for that custom assemblies. 

Query 2 : Same code working perfectly fine on iOs devices.

Please let us know which code is not working in android devices and working in iOS devices.


Regards,
 
Karthik Raja



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