ShellListView hangs

Shell for WPF Forum

Posted 5 months ago by Valéry Sablonnière - Staubli
Version: 18.1.0674
Platform: .NET 4.6
Environment: Windows 10 (64-bit)
Avatar

Hi,

We have an issue with the ShellListView, sometimes when we display this control, the application hangs and if we check the stacktrace we have this:

ntdll.dll!ZwWaitForMultipleObjects+0xa
KERNELBASE.dll!WaitForMultipleObjectsEx+0xef
USER32.dll!MsgWaitForMultipleObjectsEx+0x152
combase.dll!CoCreateFreeThreadedMarshaler+0xa40c
combase.dll!CoGetCurrentLogicalThreadId+0x16f
combase.dll!CoWaitForMultipleHandles+0xbe
clr.dll!DllGetClassObjectInternal+0x5daa
clr.dll!DllGetClassObjectInternal+0x5d14
clr.dll!MetaDataGetDispenser+0x15391
clr.dll!TranslateSecurityAttributes+0x98501
[Managed to Unmanaged Transition]
WindowsBase.dll!System.Windows.Threading.DispatcherSynchronizationContext.Wait+0x28
[Unmanaged to Managed Transition]
clr.dll!LogHelp_LogAssert+0x19b3
clr.dll!LogHelp_LogAssert+0x1883
clr.dll!LogHelp_LogAssert+0x20b5
clr.dll!CorLaunchApplication+0x3cd1
clr.dll!NGenCreateNGenWorker+0x8cc3e
clr.dll!MetaDataGetDispenser+0x15391
clr.dll!MetaDataGetDispenser+0x157cf
clr.dll!MetaDataGetDispenser+0x15942
clr.dll!MetaDataGetDispenser+0x1584e
clr.dll!CreateAssemblyNameObject+0x38482
[Managed to Unmanaged Transition]
ActiproSoftware.Shell.Wpf.dll!#76j.#w8j.#v8j+0x42
ActiproSoftware.Shell.Wpf.dll!#76j.#U7j.#G9j+0x3f
ActiproSoftware.Shell.Wpf.dll!#76j.#U7j.StopWatching+0x24
ActiproSoftware.Shell.Wpf.dll!ActiproSoftware.Windows.Controls.Shell.ShellListView.OnRootShellFolderPropertyValueChanged+0x6c
WindowsBase.dll!System.Windows.DependencyObject.OnPropertyChanged+0x88
PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged+0x69
WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange+0x66
WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue+0x865
WindowsBase.dll!System.Windows.DependencyObject.InvalidateProperty+0x116
PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.Invalidate+0x79
PresentationFramework.dll!System.Windows.Data.BindingExpression.TransferValue+0x528
PresentationFramework.dll!MS.Internal.Data.ClrBindingWorker.NewValueAvailable+0x70
PresentationFramework.dll!MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState+0x25a
PresentationFramework.dll!MS.Internal.Data.PropertyPathWorker.OnDependencyPropertyChanged+0xab
PresentationFramework.dll!System.Windows.Data.BindingExpression.HandlePropertyInvalidation+0xdf
PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation+0xa1
PresentationFramework.dll!System.Windows.Data.BindingExpression.OnPropertyInvalidation+0x111
WindowsBase.dll!System.Windows.DependentList.InvalidateDependents+0xc6
WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange+0x235
WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue+0x865
WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon+0x47a
ActiproSoftware.Shell.Wpf.dll!ActiproSoftware.Windows.Controls.Shell.ShellTreeListBox.set_SelectedShellObject+0x6e
ActiproSoftware.Shell.Wpf.dll!ActiproSoftware.Windows.Controls.Shell.ShellTreeListBox.OnSelectionChanged+0x67
ActiproSoftware.Grids.Wpf.dll!ActiproSoftware.Windows.Controls.Grids.TreeListBox.RaiseSelectionChangedEvent+0x60
ActiproSoftware.Grids.Wpf.dll!SelectionChangedEventDeferHelper.RaiseSelectionChangedEventIfChange+0x1e0
ActiproSoftware.Grids.Wpf.dll!SelectionChangedEventDeferHelper.Dispose+0x4d
ActiproSoftware.Grids.Wpf.dll!ActiproSoftware.Windows.Controls.Grids.TreeListBox.AddToSelection+0x379
ActiproSoftware.Grids.Wpf.dll!ActiproSoftware.Windows.Controls.Grids.TreeListBoxItem.OnGotFocus+0xd5
PresentationCore.dll!System.Windows.UIElement.IsFocused_Changed+0xd1
WindowsBase.dll!System.Windows.DependencyObject.OnPropertyChanged+0x88
PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged+0x69
WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange+0x66
WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue+0x865
WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon+0x47a
WindowsBase.dll!System.Windows.DependencyObject.SetValue+0x60
PresentationCore.dll!System.Windows.Input.FocusManager.OnFocusedElementChanged+0xfa
WindowsBase.dll!System.Windows.DependencyObject.OnPropertyChanged+0x88
PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged+0x69
WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange+0x66
WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue+0x865
WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon+0x47a
PresentationCore.dll!System.Windows.Input.FocusManager.SetFocusedElement+0x73
PresentationFramework.dll!System.Windows.Input.KeyboardNavigation.UpdateFocusedElement+0x42
PresentationFramework.dll!System.Windows.FrameworkElement.OnGotKeyboardFocus+0x5c
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler+0x36
PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler+0x4c
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl+0xf0
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl+0x86
PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent+0x4c
PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea+0x2c8
PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput+0x57
PresentationCore.dll!System.Windows.Input.KeyboardDevice.ChangeFocus+0x69a
PresentationCore.dll!System.Windows.Input.KeyboardDevice.TryChangeFocus+0x264
PresentationCore.dll!System.Windows.Input.KeyboardDevice.Focus+0xe8
PresentationCore.dll!System.Windows.Input.KeyboardDevice.Focus+0x53
PresentationCore.dll!System.Windows.UIElement.Focus+0x1c
ActiproSoftware.Grids.Wpf.dll!ActiproSoftware.Windows.Controls.Grids.TreeListBoxItem.OnPointerPressed+0x2b5
ActiproSoftware.Shared.Wpf.dll!ActiproSoftware.Windows.Input.InputAdapter.#doi+0x4f
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler+0x36
PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler+0x4c
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl+0xf0
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl+0x86
PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent+0x4c
PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea+0x2c8
PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput+0x57
PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput+0x72
PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.ReportInput+0x33d
PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage+0x3f5
PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage+0x9e
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc+0xc3
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation+0x82
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall+0x61
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen+0x36
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl+0x176
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc+0x11f
[Unmanaged to Managed Transition]
[Native Frame: IL Method without Metadata]
clr.dll+0x221e
USER32.dll!DispatchMessageW+0x68c
USER32.dll!DispatchMessageW+0x1b7
[Native Frame: IL Method without Metadata]
[Managed to Unmanaged Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl+0xef
PresentationFramework.dll!System.Windows.Window.ShowHelper+0x1fa
PresentationFramework.dll!System.Windows.Window.ShowDialog+0x3b5

Do you have a suggestion or a workaround or a fix ?

Thank you

Comments (3)

Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

It looks like we have a C# lock() block in the WindowsShellWatcher.Unregister method that is the lowest item in that stack trace.  That might be where it's locking up.  The other places there is a lock() for that same sync object is the Register method and the WndProc that receives Windows shell Win32 notification messages.  

Before we dig into this more to make code changes, do you have a way you can reproduce it?


Actipro Software Support

Posted 5 months ago by Valéry Sablonnière - Staubli
Avatar

Hello,

yes I can reproduce it in our software, I can send you a video, but I can't give you the project.

Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Can you tell us if you are doing anything special to trigger the scenario?  Any detail would be helpful.  What kind of folders are you displaying in it when it happens?


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 8 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.