Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic DiagramLink.MRT(Point, MouseButton) null exception (Read 249 times)
Patryk
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Jun 13th, 2025
DiagramLink.MRT(Point, MouseButton) null exception
Jun 13th, 2025 at 8:42am
Print Post  
Hello,

In our tool we are using the mindfusion.diagramming.wpf version 4.1.9

Once the link has been created it is allowed to delete it. The issue is that if later I would hit the left mouse button over the deleted link route the tool crashes due to given mindfusion callstack.

Moreover I override the OnLinkSelecting on my diagram class. It shows that the Items does not contain the link but somehow it is allowed to select it. In result an exception is throwed.

I guess that this link is stored somewhere in memory but couldnt find a right place to check...

The origin and desination are dummy nodes so it means as far as I know it was created without setting any origin and destination.

If there is anything I can do to avoid this situation please let me know.
  

callstack.png ( 61 KB | 27 Downloads )
callstack.png
Back to top
 
IP Logged
 
Patryk
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Jun 13th, 2025
Re: DiagramLink.MRT(Point, MouseButton) null exception
Reply #1 - Jun 13th, 2025 at 8:43am
Print Post  
The overriden OnLinkSelecting
  

ItemsDoesNotContain.png ( 78 KB | 25 Downloads )
ItemsDoesNotContain.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3378
Joined: Oct 19th, 2005
Re: DiagramLink.MRT(Point, MouseButton) null exception
Reply #2 - Jun 13th, 2025 at 9:24am
Print Post  
Hi,

I cannot reproduce that in vanilla configuration by click-selecting a link, pressing Del, clicking again. In what manner are you deleting? I imagine that exception would happen if deletion process is somehow interrupted after setting link.Parent to null but before removing from diagram.Items, maybe if another exception is thrown by delete-related event handler but caught and ignored up the call stack.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Patryk
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Jun 13th, 2025
Re: DiagramLink.MRT(Point, MouseButton) null exception
Reply #3 - Jun 13th, 2025 at 10:14am
Print Post  
The links is removed succesfuly - it is not contained in diagram.Items anymore also not visible on view.

It looks like something is still keeping a diagram link in memory and looking at the cotract of this MRT I think its related with selection.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3378
Joined: Oct 19th, 2005
Re: DiagramLink.MRT(Point, MouseButton) null exception
Reply #4 - Jun 13th, 2025 at 12:51pm
Print Post  
Do you mean deleting by pressing Del key, or removing from code behind? Does your application override links' OnRemove method by any chance?
  
Back to top
 
IP Logged
 
Patryk
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Jun 13th, 2025
Re: DiagramLink.MRT(Point, MouseButton) null exception
Reply #5 - Jun 13th, 2025 at 1:27pm
Print Post  
We are removing it from the diagram by a command that is bounded to our viewmodel. In result after few additional cleanups on our site we are calling simply Links.Remove(link).

We dont override the OnRemove. But we are subscribed to this event so I know it was called at least once after deleting the link.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3378
Joined: Oct 19th, 2005
Re: DiagramLink.MRT(Point, MouseButton) null exception
Reply #6 - Jun 16th, 2025 at 6:02am
Print Post  
Sorry, we could not reproduce. Please copy your diagram properties and event handlers to this test project, and attach it back when the exception happens for our developer to investigate.

Regards,
Slavcho
Mindfusion
  

WpfApp4.zip ( 3 KB | 12 Downloads )
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint