Initilizing SFDiagram in viewModel throws a TargetInvocationException

Initilizing  an SFDiagram instance in the viewModel and adding it to a dockItem contnet throws a TargetInvocationException



Attachment: codeAndStack_30c6e728.rar

14 Replies 1 reply marked as answer

RA Ranjitha Amirthalingam Syncfusion Team September 24, 2020 12:54 PM UTC

Hi Rindo, 
 
Greetings from Syncfusion. 
 
We have prepared a sample based on the provided details and tested the reported scenario in latest version 18.2.0.59. But the issue is not reproduced in our end. We have provided sample to represent this. Please refer to the sample from the following link. 
 
 
 
If the scenario represented in the sample is different from the reported scenario, please replicate the issue in the provided sample .Also, please let us know your product version. This helps us to serve you better. 
 
 
 
Regards, 
Ranjitha A. 



RI Rindou September 24, 2020 02:04 PM UTC

hi Ranjitha

thank you for your reply

the sample code throws "InvalidOperationException: Document state is not allowed"
so i set UseDocumentContainer="True" in the DockingManager
i run it and get "ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index"


RA Ranjitha Amirthalingam Syncfusion Team September 25, 2020 12:53 PM UTC

Hi Rindo, 
 
We could able to replicate the issue “Argument out of range exception occurs while using Diagram as content of the DockItem”.Currently, we are analyzing the root cause of the issue. We will update you the details on September 29, 2020. 
 
 
Regards, 
Ranjitha A. 



RA Ranjitha Amirthalingam Syncfusion Team September 29, 2020 02:45 PM UTC

Hi Rindo, 
 
Reported Issue: Argument out of range exception occurs while using Diagram as content of the DockItem. 
 
We have confirmed that the reported issue is a bug and have logged defect report regarding this. We will fix the issue and include the fix in our upcoming weekly nuget package which will be available on October 13, 2020.  
 
Also, you can track the status of the issue from the following link.     
 
Regards,  
Ranjitha A.  



RA Ranjitha Amirthalingam Syncfusion Team October 13, 2020 09:41 AM UTC

Hi Rindo,  
  
Reported Issue: Argument out of range exception occurs while using Diagram as content of the DockItem 
   
We are glad to announce that our weekly nuget package is released successfully. We have included the fix for the reported issue in this weekly nuget release. Please upgrade to our latest version(18.3.0.40).   
          
      
   
If you need patch for this fix please revert us with your version details.        
 
 
Regards, 
Ranjitha A. 



RI Rindou October 13, 2020 01:14 PM UTC

Tanks for your reply

I tried using SFDiagram as a DockedItem using a DockingMangerAdapter following the demo:


It throws a TargetInvocationException

Attachment: dockingmanagerandmvvmdiagram_7e02089e.rar


RA Ranjitha Amirthalingam Syncfusion Team October 14, 2020 02:38 PM UTC

Hi Rindo, 
 
We were able  to reproduce the issue “TargetInvocationException while using SFDiagram as a DockedItem using a DockingMangerAdapter”.Currently we are checking the root cause of the issue and will update you the details on October 16,2020.  
 
Regards, 
Ranjitha A. 



RA Ranjitha Amirthalingam Syncfusion Team October 16, 2020 04:46 PM UTC

Hi Rindo, 
 
We have fixed the issue in the sample itself and provided modified sample and code changes. Please refer to them as below. 
 
Code Changes: 
  public TestDigramViewModel() 
        { 
            Nodes = new ObservableCollection<NodeViewModel>(); 
            Connectors = new ObservableCollection<ConnectorViewModel>(); 
            HorizontalRuler = new Ruler(); 
            VerticalRuler = new Ruler() { Orientation = Orientation.Vertical }; 
            SnapSettings snapsettings= new SnapSettings() 
            { 
                
            }; 
 
            snapsettings.SnapConstraints = SnapConstraints.ShowLines | SnapConstraints.SnapToLines; 
            snapsettings.SnapToObject = SnapToObject.All; 
 
            this.SnapSettings = snapsettings; 
        } 
 
 
 
 
Regards, 
Ranjitha A. 



RI Rindou October 20, 2020 04:16 PM UTC

sadly the problem still persist on my end, its specifically triggered by binding snapSettings in the xaml
am using .net core 3.1 by the way
any idea why?

Attachment: StackTrace_e0b51467.rar


RA Ranjitha Amirthalingam Syncfusion Team October 21, 2020 04:59 PM UTC

Hi Rindo, 
 
We have checked the below code in .net core sample also and issue is not reproduced in our end. Please check the same in your sample and let us know if the issue is solved or not? 
 
Code Example: 
 
this.SnapSettings = new SnapSettings(); 
this.SnapSettings.SnapConstraints = SnapConstraints.ShowLines | SnapConstraints.SnapToLines; 
this.SnapSettings.SnapToObject = SnapToObject.All; 
 
 
 
Regards, 
Ranjitha A. 



RI Rindou October 21, 2020 07:22 PM UTC

The problem still persist if using DockingManger Mvvm adapter or using prism navigation
i uploaded the DockingAdapater Mvvm sample with the stack trace.

Attachment: DockingDemo_80fa555.rar


RA Ranjitha Amirthalingam Syncfusion Team October 22, 2020 01:44 PM UTC

Hi Rindo, 
 
Reported Issue: TargetInvocationException occurs when we bind snapsettings to Diagram. 
 
We have confirmed that the reported issue is a bug and have logged defect report regarding this. We will fix the issue and include the fix in our upcoming weekly nuget package which will be available on October 27, 2020.      
    
Also, you can track the status of the issue from the following link.         
 
  
Regards,      
Ranjitha A.      
 



RA Ranjitha Amirthalingam Syncfusion Team October 27, 2020 02:22 PM UTC

Hi Rindo,  
  
Sorry for the inconvenience caused.  
  
We have fixed the issue , but did not include in the latest weekly nuget release. We will include the fix in our volume 3 service pack release which will be available on the first week of November, 2020.   

Also, you can track the status of the issue from the following link.   
     
 
If you need immediate patch for this fix please revert us with your version details.      
     
Note: We will provide patch in our Main and SP release versions only.      
  
Regards,       
Ranjitha A.  
 



RA Ranjitha Amirthalingam Syncfusion Team November 6, 2020 08:17 AM UTC

Hi Rindo, 
 
Feedback Links: 
 
 
  
We are glad to announce that our Essential Studio 2020 Volume 3 Service Pack release v18.3.0.47  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. 
 
Regards, 
Ranjitha A. 


Marked as answer
Loader.
Up arrow icon