Ross-Patterson/Portals-Desktop-Organization

Program randomly crashes

Closed this issue · 2 comments

Desktop:

  • OS: Windows 11 Pro 23H2 22631.3235 Windows Feature Experience Pack 1000.22687.1000.0
  • Version 3.2.1.0
Version: 3.2.1.0
Event Source: AppDomain.CurrentDomain.UnhandledException
Internet Connected: yes

Exception Source: PresentationCore

Message:
The root Visual of a VisualTarget cannot have a parent.

StackTrace:
   at System.Windows.Media.CompositionTarget.SetRootVisual(Visual visual)
   at System.Windows.Media.CompositionTarget.set_RootVisual(Visual value)
   at System.Windows.Interop.HwndTarget.set_RootVisual(Visual value)
   at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   at System.Windows.Controls.Primitives.Popup.SetRootVisualToPopupRoot()
   at System.Windows.Controls.Primitives.Popup.CreateWindow(Boolean asyncCall)
   at System.Windows.Controls.Primitives.Popup.OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs 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, Boolean preserveCurrentValue)
   at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, 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 System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject 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(DependencyPropertyChangedEventArgs 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.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Hardcodet.Wpf.TaskbarNotification.TaskbarIcon.OnToolTipChange(Boolean visible) in D:\a\1\s\src\NotifyIconWpf\TaskbarIcon.cs:line 505
   at Hardcodet.Wpf.TaskbarNotification.Interop.WindowMessageSink.ProcessWindowMessage(UInt32 msg, IntPtr wParam, IntPtr lParam) in D:\a\1\s\src\NotifyIconWpf\Interop\WindowMessageSink.cs:line 308
   at Hardcodet.Wpf.TaskbarNotification.Interop.WindowMessageSink.OnWindowMessageReceived(IntPtr hWnd, UInt32 messageId, IntPtr wParam, IntPtr lParam) in D:\a\1\s\src\NotifyIconWpf\Interop\WindowMessageSink.cs:line 212

TargetSite:
Void SetRootVisual(System.Windows.Media.Visual)

I have made some changes in the latest version 3.3.0.9, please try it and if it still occurs let me know.

Hey there, I've got the same crash on 23/07, 31/07, 05/08, 12/09 and 09/10.

Version: 3.3.0.9
Event Source: AppDomain.CurrentDomain.UnhandledException
Internet Connected: yes

Exception Source: PresentationCore

Message:
The root Visual of a VisualTarget cannot have a parent.

StackTrace:
   at System.Windows.Media.CompositionTarget.SetRootVisual(Visual visual)
   at System.Windows.Media.CompositionTarget.set_RootVisual(Visual value)
   at System.Windows.Interop.HwndTarget.set_RootVisual(Visual value)
   at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   at System.Windows.Controls.Primitives.Popup.SetRootVisualToPopupRoot()
   at System.Windows.Controls.Primitives.Popup.CreateWindow(Boolean asyncCall)
   at System.Windows.Controls.Primitives.Popup.OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs 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, Boolean preserveCurrentValue)
   at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, 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 System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject 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(DependencyPropertyChangedEventArgs 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.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Hardcodet.Wpf.TaskbarNotification.TaskbarIcon.OnToolTipChange(Boolean visible) in D:\a\1\s\src\NotifyIconWpf\TaskbarIcon.cs:line 505
   at Hardcodet.Wpf.TaskbarNotification.Interop.WindowMessageSink.ProcessWindowMessage(UInt32 msg, IntPtr wParam, IntPtr lParam) in D:\a\1\s\src\NotifyIconWpf\Interop\WindowMessageSink.cs:line 308
   at Hardcodet.Wpf.TaskbarNotification.Interop.WindowMessageSink.OnWindowMessageReceived(IntPtr hWnd, UInt32 messageId, IntPtr wParam, IntPtr lParam) in D:\a\1\s\src\NotifyIconWpf\Interop\WindowMessageSink.cs:line 212

TargetSite:
Void SetRootVisual(System.Windows.Media.Visual)

Can't exactly tell why it happens, it seems random.

Also, a lot of times, the tooltip appears in the top-left corner.
image