Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic mindfusion internal exception when clicking the diagram... (Read 5038 times)
ulthien
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 91
Location: Munich
Joined: Nov 29th, 2011
mindfusion internal exception when clicking the diagram...
Aug 27th, 2012 at 10:58am
Print Post  
this will probably be difficult to nail down Undecided
unless some inhibitor/check can help within the MouseUp & InteractionState...

i have a small diagram with 6 nodes and generate only 1 link that shows to-from arrow when mouseover is over the next node then the selected one, and when wild clicking around i sometimes get:

at MindFusion.Diagramming.Wpf.InteractionState.IsAllowed(Point point)
at MindFusion.Diagramming.Wpf.Behaviors.BehaviorBase.OnMouseUp(Point mousePosition, MouseButton mouseButton)
at MindFusion.Diagramming.Wpf.Diagram.AN(MouseButtonEventArgs A, Point B)
at MindFusion.Diagramming.Wpf.Diagram.OnPreviewMouseUp(MouseButtonEventArgs e)
at System.Windows.UIElement.OnPreviewMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

any ideas/tips please? Shocked

cheers Ulthien
  
Back to top
 
IP Logged
 
ulthien
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 91
Location: Munich
Joined: Nov 29th, 2011
Re: mindfusion internal exception when clicking the diagram...
Reply #1 - Aug 27th, 2012 at 11:09am
Print Post  
btw this happens ONLY if you click around wildly TOO QUICK.

if you click wildly around SLOWLY, you never crash...
  
Back to top
 
IP Logged
 
ulthien
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 91
Location: Munich
Joined: Nov 29th, 2011
Re: mindfusion internal exception when clicking the diagram...
Reply #2 - Aug 27th, 2012 at 12:37pm
Print Post  
Actually, just figured out this happens ONLY if the single DiagramLink is visible...

so the event handling when links are visible goes somehow broke if the user clicks too quick around.

  
Back to top
 
IP Logged
 
ulthien
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 91
Location: Munich
Joined: Nov 29th, 2011
Re: mindfusion internal exception when clicking the diagram...
Reply #3 - Aug 27th, 2012 at 12:49pm
Print Post  
..so i tidied the link on the first MouseUp, so it disappears.

..then the user can click like mad around but Diagram will not crash anymore...

(but this is only a workaround)
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: mindfusion internal exception when clicking the diagram...
Reply #4 - Aug 28th, 2012 at 6:54am
Print Post  
What is the type of that exception, and what do you mean by generating a link? I suppose you could get an exception if the link is deleted after the control started tracking interaction state for its modification - e.g. while wild-clicking you select the link, start dragging an adjustment handle, then delete the link before dropping the handle.
  
Back to top
 
IP Logged
 
ulthien
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 91
Location: Munich
Joined: Nov 29th, 2011
Re: mindfusion internal exception when clicking the diagram...
Reply #5 - Aug 28th, 2012 at 10:04am
Print Post  
Stoyo wrote on Aug 28th, 2012 at 6:54am:
What is the type of that exception,


"Object reference not set to an instance of an object"

Stoyo wrote on Aug 28th, 2012 at 6:54am:
and what do you mean by generating a link?


                var arr = new DiagramLink(this, origin, target);
                Links.Add(arr)

Stoyo wrote on Aug 28th, 2012 at 6:54am:
I suppose you could get an exception if the link is deleted after the control started tracking interaction state for its modification - e.g. while wild-clicking you select the link, start dragging an adjustment handle, then delete the link before dropping the handle.


you're right, this is prolly what happens - how could i make links non-interactive: they show no selection at all now?



  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: mindfusion internal exception when clicking the diagram...
Reply #6 - Aug 28th, 2012 at 10:19am
Print Post  
Try setting link.Locked = true, or set e.Cancel from the LinkStartModifying handler.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint