Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) tooltip update defect? (Read 7746 times)
ulthien
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 91
Location: Munich
Joined: Nov 29th, 2011
tooltip update defect?
Feb 9th, 2012 at 3:34pm
Print Post  
hello Stoyo Smiley

i made recently a quite complex diagram with TableNodes and icons in cells and mouseover tooltips etc, but sometimes (i cannot reproduce this issue) - it looks like if i stay for awhile over a node hoovering so that the tooltip just starts to get drawn, i get a little tooltip "remnant" or artefact like a 5x3 pixels big empty tooltip, and then driving over another or this node the whole app crashes with:

System.InvalidOperationException was unhandled
  Message=Specified element is already the logical child of another element. Disconnect it first.
  Source=PresentationFramework
  StackTrace:
       at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
       at System.Windows.FrameworkElement.AddLogicalChild(Object child)
       at System.Windows.Controls.ContentControl.OnContentChanged(Object oldContent, Object newContent)
       at System.Windows.Controls.ContentControl.OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEvent
Args e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEvent
Args e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEv
entArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
       at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.ScheduleTransfer(Boolean isASubPropertyChange)
       at MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
       at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
       at MS.Internal.Data.PropertyPathWorker.OnDependencyPropertyChanged(DependencyObject
d, DependencyProperty dp, Boolean isASubPropertyChange)
       at MS.Internal.Data.ClrBindingWorker.OnSourceInvalidation(DependencyObject d, DependencyProperty dp, Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObjec
t d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObjec
t d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEv
entArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.Controls.ToolTipService.SetToolTip(DependencyObject element, Object value)
       at System.Windows.FrameworkElement.set_ToolTip(Object value)
       at MindFusion.Diagramming.Wpf.Diagram.YM(Object
  
Back to top
 
IP Logged
 
ulthien
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 91
Location: Munich
Joined: Nov 29th, 2011
Re: tooltip update defect?
Reply #1 - Feb 9th, 2012 at 3:37pm
Print Post  
i cannot get an inner exception reference and no definite object this crash relates to, but it looks to be tooltip (visual) and dependency property update, at which time it sees the previous object as still hanging on another parent, i.e. not destructed (and it is not, it hangs there visually as a 5x3 pixel empty tooltip)...


anyone had a similar occurences?

this thing just crashes now and then, the same movements (as you can't reproduce the same pauses on movements exactly do not reproduce the problem situation..)

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


I love YaBB 1G - SP1!

Posts: 91
Location: Munich
Joined: Nov 29th, 2011
Re: tooltip update defect?
Reply #2 - Feb 9th, 2012 at 5:07pm
Print Post  
so i was forced to not define any tooltips for cells, otherwise a crash happens every now and then
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: tooltip update defect?
Reply #3 - Feb 10th, 2012 at 8:31am
Print Post  
What kind of objects are you showing as tooltips? If you set the same instance as a tooltip of multiple cells, could you check how it works if you clone it instead?
  
Back to top
 
IP Logged
 
ulthien
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 91
Location: Munich
Joined: Nov 29th, 2011
Re: tooltip update defect?
Reply #4 - Mar 21st, 2012 at 4:02pm
Print Post  
well i'm back at this topic 'cos there is no other satisfactory way of showing the users what nodes they should pick xcept the tooltips..

the way i place the tooltips is:

tipholder = cv.ToolTip.ToString();
t[i, Hrow].ToolTip = tipholder.Clone();

(and i added extra tipholder in-between, tostring() and clone() but it does not help).

Tooltip is actually a tooltip from another freshly instantiated node cv (invoked just for this purpose). The user can fiddle around for some time with no problems, but eventually the small empty tooltip will appear again and next tooltip attempted mouseover will crash the app as shown in entry msg of this thread.

===========================================================

i also tried adding:

ToolTipClosing +=DiagramToolTipClosing;
ToolTipOpening +=DiagramToolTipOpening;

}

private void DiagramToolTipOpening(object sender, ToolTipEventArgs e)
{
if (!Alltooltipsclosed)
e.Handled = true;
else if (Alltooltipsclosed)
Alltooltipsclosed = false;

}

private void DiagramToolTipClosing(object sender, ToolTipEventArgs e)
{
Alltooltipsclosed = true;
}

to the Diagram where these tablenodes & tablecells are, but these events do not seem to fire for the cells?

Shocked
  
Back to top
 
IP Logged
 
ulthien
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 91
Location: Munich
Joined: Nov 29th, 2011
Re: tooltip update defect?
Reply #5 - Mar 22nd, 2012 at 1:16pm
Print Post  
Update:

at one time i noticed the phantom empty tooltip appeared even when i had no cell elements populated/shown in tablenodes. Therefore, i added the tooltips also for all tablenodes.

Thereafter, there was no crash or i could not reproduce it, but i have a dancing plethora of tooltips hopping around now, those for cell contents intermixed with tablenodes' ones...

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: tooltip update defect?
Reply #6 - Mar 22nd, 2012 at 2:59pm
Print Post  
I cannot reproduce this. Does the project below throw InvalidOperationException on your system?
https://mindfusion.eu/_samples/TooltipTest.zip

Are you setting the tooltip to some binding expression (seeing BindingExpression methods in the call stack above)?

Stoyan
  
Back to top
 
IP Logged
 
ulthien
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 91
Location: Munich
Joined: Nov 29th, 2011
Re: tooltip update defect?
Reply #7 - Mar 22nd, 2012 at 5:29pm
Print Post  
your project also crashes in the same way (small empty tooltip when you move around).

It needed converting to VS2010:

System.InvalidOperationException was unhandled
Message=Bei dem angegebenen Element handelt es sich bereits um das logische untergeordnete Element eines anderen Elements. Führen Sie zuerst eine Trennung durch.
Source=PresentationFramework
StackTrace:
bei System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
bei MS.Internal.FrameworkObject.ChangeLogicalParent(DependencyObject newParent)
bei System.Windows.FrameworkElement.AddLogicalChild(Object child)
bei System.Windows.Controls.ContentControl.OnContentChanged(Object oldContent, Object newContent)
bei System.Windows.Controls.ContentControl.OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
bei System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEvent
Args e)
bei System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEvent
Args e)
bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEv
entArgs args)
bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
bei System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
bei System.Windows.Data.BindingExpression.Invalidate(Boolean isASubPropertyChange)
bei System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
bei System.Windows.Data.BindingExpression.ScheduleTransfer(Boolean isASubPropertyChange)
bei MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
bei MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
bei MS.Internal.Data.PropertyPathWorker.OnDependencyPropertyChanged(DependencyObject
d, DependencyProperty dp, Boolean isASubPropertyChange)
bei MS.Internal.Data.ClrBindingWorker.OnSourceInvalidation(DependencyObject d, DependencyProperty dp, Boolean isASubPropertyChange)
bei System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObjec
t d, DependencyPropertyChangedEventArgs args)
bei System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
bei System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEv
entArgs args)
bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
bei System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
bei System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
bei System.Windows.Controls.ToolTipService.SetToolTip(DependencyObject element, Object value)
bei System.Windows.FrameworkElement.set_ToolTip(Object value)
bei MindFusion.Diagramming.Wpf.Diagram.RN(Object A, Rect B)
bei MindFusion.Diagramming.Wpf.TableNode.OnMouseMove(MouseEventArgs e)
bei System.Windows.UIElement.OnMouseMoveThunk(Object sender, MouseEventArgs e)
bei System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
bei System.Windows.Input.InputManager.ProcessStagingArea()
bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
bei System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
bei System.Windows.Threading.Dispatcher.Run()
bei System.Windows.Application.RunDispatcher(Object ignore)
bei System.Windows.Application.RunInternal(Window window)
bei System.Windows.Application.Run(Window window)
bei System.Windows.Application.Run()
bei TooltipTest.App.Main() in C:\ITSA\tooltip_test_proj\obj\Debug\App.g.cs:Zeile 0.
bei System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
InnerException:
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: tooltip update defect?
Reply #8 - Mar 23rd, 2012 at 8:00am
Print Post  
It still works in our test even after conversion to VS2010. This exception seems to happen often enough with tooltips in all kinds of controls though:

https://connect.microsoft.com/VisualStudio/feedback/details/496959/specified-ele
ment-is-already-the-logical-child-of-another-element-disconnect-it-first
http://social.msdn.microsoft.com/forums/en-US/wpf/thread/07d2a0bb-af63-44d0-be05...

You might try to apply the work-around given above: setting an explicit Tooltip control instance as the tooltip value. Our developer will apply it to the TableNode code in a few days and we can upload updated assembly for you to try then.

Stoyan
  
Back to top
 
IP Logged
 
ulthien
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 91
Location: Munich
Joined: Nov 29th, 2011
Re: tooltip update defect?
Reply #9 - Mar 23rd, 2012 at 9:22am
Print Post  
thank you - will have a look at it.

it does happen less when all the tooltips possible are populated, but then one gets "too much info", too.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: tooltip update defect?
Reply #10 - Mar 27th, 2012 at 1:56pm
Print Post  
Please check if this version works any better:
https://mindfusion.eu/_beta/wpfdiag_ttip.zip

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint