BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi,
I use Shell navigation in my Xamarin forms project. I use sfDiagram to load organizational chart in the home screen. This works fine. After loading the diagram once, if I move to another page by using the Shell Flyout menu and come back to the home screen (again by using the Shell flyout menu), a null pointer reference is thrown. But none of the objects are null.
Steps to reproduce :
at Syncfusion.SfDiagram.Android.ConnectorCollection.Clear () [0x0008d] in <6b1ba4d23a10454c9a895553d4212f93>:0
at Syncfusion.SfDiagram.Android.ConnectorCollection.Formconnectors_CollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0014c] in <6b1ba4d23a10454c9a895553d4212f93>:0
at (wrapper delegate-invoke) <Module>.invoke_void_object_NotifyCollectionChangedEventArgs(object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)
at Syncfusion.SfDiagram.XForms.ConnectorCollection.OnConnectors_CollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00008] in <bffdc7e46baa4d6a99ade728d1e51330>:0
at Syncfusion.SfDiagram.XForms.ConnectorCollection.Clear () [0x0001e] in <bffdc7e46baa4d6a99ade728d1e51330>:0
at Syncfusion.SfDiagram.XForms.SfDiagram.Clear () [0x0000e] in <bffdc7e46baa4d6a99ade728d1e51330>:0
at Syncfusion.SfDiagram.XForms.DataSourceSettings.UpdateLayoutDataSource () [0x0000b] in <bffdc7e46baa4d6a99ade728d1e51330>:0
at Syncfusion.SfDiagram.XForms.DataSourceSettings.UpdateDataSource (Syncfusion.SfDiagram.XForms.SfDiagram diagram) [0x00007] in <bffdc7e46baa4d6a99ade728d1e51330>:0
at Syncfusion.SfDiagram.XForms.DataSourceSettingsController..ctor (Syncfusion.SfDiagram.XForms.DataSourceSettings source, Syncfusion.SfDiagram.XForms.SfDiagram diagram) [0x00015] in <bffdc7e46baa4d6a99ade728d1e51330>:0
at Syncfusion.SfDiagram.XForms.SfDiagram.OnDataSourceSettingsChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x00003] in <bffdc7e46baa4d6a99ade728d1e51330>: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:512
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:446
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x0004d] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:374
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:349
at Syncfusion.SfDiagram.XForms.SfDiagram.set_DataSourceSettings (Syncfusion.SfDiagram.XForms.DataSourceSettings value) [0x00000] in <bffdc7e46baa4d6a99ade728d1e51330>:0
at Salesboard.Dashboard.GetMyReportees () [0x00199] in E:\Source code\SFA2.0\R2.0.7\Salesboard\Dashboard.xaml.cs:77
Hi Santhosh Kumar,
Greetings from Syncfusion support,
We were able to reproduce the issue, “SfDiagram throws null pointer reference when using Shell navigation".
Currently, we are validating the issue and we will update
the further details on 19th October 2022.
Regards
Hemalatha D.
Hi Santhosh Kumar,
We have confirmed that the issue with "SfDiagram throws null pointer reference when using Shell navigation". is a defect and have logged a defect report for this issue. The fix for the issue will be include in our upcoming weekly NuGet published under nuget.org and it is expected to be available on 2nd November 2022.
Feedback Link: https://www.syncfusion.com/feedback/38561/sfdiagram-throws-null-reference-exception-when-using-shell-navigation
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
Regards,
Hemalatha D.
Hi,
Has this been released?
Thanks
Santhosh
We have included the SfDiagram throws null pointer reference when using Shell navigation in our 2022 Volume 3 Service Pack Release V20.3.0.56.
We are glad to announce that our Essential Studio 2022 Volume 3 Service Pack Release V20.3.0.56 is rolled out and is available for download under the following link.
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Hi Hemalatha,
Unfortunately, I still have problem after updating the new version but this time, the stack trace looks different.
Please have a look into it.
at Syncfusion.SfDiagram.Android.Node.get_Frame () [0x00006] in <b24d3201759a4ea4981d832101fbeb53>:0
at Syncfusion.SfDiagram.Android.Node.set_Width (System.Single value) [0x0004d] in <b24d3201759a4ea4981d832101fbeb53>:0
at Syncfusion.SfDiagram.Android.Node.OnNodePropertiesChanged (System.String propertyName) [0x00038] in <b24d3201759a4ea4981d832101fbeb53>:0
at Syncfusion.SfDiagram.Android.Node.Formnode_PropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00007] in <b24d3201759a4ea4981d832101fbeb53>: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:266
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) [0x00114] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:510
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:446
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x0004d] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:374
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:349
at Syncfusion.SfDiagram.XForms.Node.set_Width (System.Single value) [0x00000] in <985f2af6fe644b02b97cc0fc4acddfd8>:0
at Salesboard.Dashboard.diagram_BeginNodeRender (System.Object sender, Syncfusion.SfDiagram.XForms.BeginNodeRenderEventArgs args) [0x00019] in E:\Source code\SFA2.0\R2.0.7\Salesboard\Dashboard.xaml.cs:478
at Syncfusion.SfDiagram.XForms.SfDiagram.OnBeginNodeRenderChanged (Syncfusion.SfDiagram.XForms.BeginNodeRenderEventArgs e) [0x00008] in <985f2af6fe644b02b97cc0fc4acddfd8>:0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
Thanks
Santhosh
Below is the block where it fails.
private void diagram_BeginNodeRender(object sender, BeginNodeRenderEventArgs args)
{
var node = (args.Item as Node);
if (node != null)
{
node.ShapeType = ShapeType.RoundedRectangle;
node.Width = 150; ---------------------------error thrown at this line
node.Height = 230;
SiblingSpace siblingSpacing = new SiblingSpace(5, 5);
node.SiblingSpace = siblingSpacing;
UpdateTemplate(node, "-");
}
}
We tried to reproduce the reported issue, but it is working fine as expected.
We have created a sample based on the provided code snippets and the sample and video can be downloaded from the below link.
Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SfDiagram-1235510547
Video Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Diagram2024436441
Provide the following details to investigate further on this issue.
The above details will be more helpful for us to reproduce the issue in our side and assist you with the better solution at the earliest.
Hi Hema,
The steps to reproduce are same as given earlier.
I have provided by code as well in the attached file along with a screenshot (refer to the word doc) of the line where it fails. The original problem reported also failed on the same line.
The stack trace looks to be different from the original problem reported though.
Thanks
Santhosh
We tried to reproduce the reported issue. But it is working fine
as expected.
We have created a sample based on the provided code snippets the sample can be downloaded from the below link.
https://www.syncfusion.com/downloads/support/directtrac/general/ze/SfDiagram-614065192
However, we suspect that the issue may occur due to the older assemblies are still referred from GAC location. Can you cross check and remove the assemblies from GAC location. Find the link to remove the Syncfusion assemblies from GAC.
https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache
For further details, Find the steps to remove old assemblies from GAC and install the patch by using Syncfusion Assembly Manager,
Still, you are facing the issue we
will setup a web meeting to look into the problem in that machine with which it
could be reproduced and provide you the solution. Please let us know your
availability. We will make every effort to have this scheduled on a date and
time of your convenience.
Hi Hema,
It works fine now after clearing the Nuget cache.
Thank you very much for your support.
Santhosh
Hi Hema,
I just observed that the SfDiagram now fails in the exact opposite way to the original problem reported.
Steps to reproduce:
We were able to reproduce the reported issue with your last update, “Application crash when using Shell navigation". Currently, we are validating the issue and we will update the further details on December 12, 2022.
Currently, we are validating the issue on “Application crash when using Shell navigation” and we will update the further details on December 14, 2022
Due to the regression issue, we are validating the reported issue and we will update the further details on December 19, 2022
Due to some regression issue and facing complexity, we are validating the reported issue without delay we will update the further details on December 27th , 2022
We have confirmed that the issue with "Application crash when using Shell navigation in SfDiagram". is a defect and have logged a defect report for this issue. The fix for the issue will be include in our upcoming weekly NuGet published under nuget.org and it is expected to be available on 10th January 2023.
Feedback Link: https://www.syncfusion.com/feedback/40075/application-crash-when-using-shell-navigation-in-sfdiagram
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
We regret the inconvenience caused, due to some technical difficulties, we are unable to include the fix in our latest release. We have included the fix for the reported issue in our upcoming weekly NuGet release.
Note: If you require a patch for the reported issue in any of our
weekly NuGet release versions, then kindly let us know the version, so that we
can provide a patch in that version based on our SLA policy.
We have included the fix for the reported issue “Application crash when using Shell navigation in SfDiagram" in our latest weekly NuGet release v20.4.0.44. Please find the download link below,
https://www.nuget.org/packages/Syncfusion.Xamarin.SfDiagram/20.4.0.44
Hi Hema,
Thank you. This has resolved the problem.
Thanks
Santhosh