microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.28k stars 6.55k forks source link

Unhandled exception in File Explorer preview #24824

Closed sba923 closed 1 year ago

sba923 commented 1 year ago

Microsoft PowerToys version

0.68.1

Installation method

PowerToys auto-update, WinGet

Running as admin

Yes

Area(s) with issue?

File Explorer: Preview Pane

Steps to reproduce

This occurred when multi-selecting 3 Markdown files and one PDF file, but I haven't been able to repro it so far.

✔️ Expected Behavior

The most recently selected file should be previewed.

❌ Actual Behavior

image

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: CoreWebView2 members cannot be accessed after the WebView2 control is disposed.
 ---> System.Runtime.InteropServices.COMException (0x8007139F): The group or resource is not in the correct state to perform the requested operation. (0x8007139F)
   at Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Controller.NotifyParentWindowPositionChanged()
   at Microsoft.Web.WebView2.Core.CoreWebView2Controller.NotifyParentWindowPositionChanged()
   --- End of inner exception stack trace ---
   at Microsoft.Web.WebView2.Core.CoreWebView2Controller.NotifyParentWindowPositionChanged()
   at Microsoft.Web.WebView2.WinForms.WebView2.WebView2_WindowPositionChanged(Object sender, EventArgs e)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds()
   at System.Windows.Forms.Control.WmCreate(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmCreate(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
System.Private.CoreLib
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Private.CoreLib.dll
----------------------------------------
PowerToys.MarkdownPreviewHandler
    Assembly Version: 0.68.1.0
    Win32 Version: 0.68.1.0
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/PowerToys.MarkdownPreviewHandler.dll
----------------------------------------
System.Runtime
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Runtime.dll
----------------------------------------
WinRT.Runtime
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.1.40881
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/WinRT.Runtime.dll
----------------------------------------
System.Collections
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Collections.dll
----------------------------------------
System.Collections.Concurrent
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Collections.Concurrent.dll
----------------------------------------
System.Threading
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Threading.dll
----------------------------------------
System.Drawing.Primitives
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Drawing.Primitives.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.7201
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Windows.Forms.dll
----------------------------------------
PowerToys.PreviewHandlerCommon
    Assembly Version: 0.68.1.0
    Win32 Version: 0.68.1.0
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/PowerToys.PreviewHandlerCommon.dll
----------------------------------------
System.ComponentModel.Primitives
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.ComponentModel.Primitives.dll
----------------------------------------
System.Windows.Forms.Primitives
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.7201
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Windows.Forms.Primitives.dll
----------------------------------------
System.Runtime.InteropServices
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Runtime.InteropServices.dll
----------------------------------------
System.Collections.Specialized
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Collections.Specialized.dll
----------------------------------------
PowerToys.Interop
    Assembly Version: 0.68.1.0
    Win32 Version: 0.68.1.0
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/PowerToys.Interop.dll
----------------------------------------
System.Runtime.Extensions
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Runtime.Extensions.dll
----------------------------------------
System.Collections.NonGeneric
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Collections.NonGeneric.dll
----------------------------------------
WindowsBase
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.7301
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/WindowsBase.dll
----------------------------------------
PowerToys.Common.UI
    Assembly Version: 0.68.1.0
    Win32 Version: 0.68.1.0
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/PowerToys.Common.UI.dll
----------------------------------------
System.Diagnostics.TraceSource
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Diagnostics.TraceSource.dll
----------------------------------------
System.Drawing.Common
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Drawing.Common.dll
----------------------------------------
Markdig.Signed
    Assembly Version: 0.27.0.0
    Win32 Version: 0.27.0.0
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/Markdig.Signed.dll
----------------------------------------
Microsoft.Win32.Primitives
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/Microsoft.Win32.Primitives.dll
----------------------------------------
System.ComponentModel.EventBasedAsync
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.ComponentModel.EventBasedAsync.dll
----------------------------------------
System.Threading.Thread
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Threading.Thread.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 7.0.323.7201
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/Accessibility.dll
----------------------------------------
Microsoft.Win32.SystemEvents
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/Microsoft.Win32.SystemEvents.dll
----------------------------------------
System.Private.Uri
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Private.Uri.dll
----------------------------------------
Microsoft.Web.WebView2.Core
    Assembly Version: 1.0.1343.22
    Win32 Version: 1.0.1343.22
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/Microsoft.Web.WebView2.Core.dll
----------------------------------------
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/mscorlib.dll
----------------------------------------
System.IO.Abstractions
    Assembly Version: 17.0.0.0
    Win32 Version: 17.2.3.42299
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.IO.Abstractions.dll
----------------------------------------
System.Security.AccessControl
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Security.AccessControl.dll
----------------------------------------
System.Text.RegularExpressions
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Text.RegularExpressions.dll
----------------------------------------
PowerToys.ManagedCommon
    Assembly Version: 0.68.1.0
    Win32 Version: 0.68.1.0
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/PowerToys.ManagedCommon.dll
----------------------------------------
Microsoft.Web.WebView2.WinForms
    Assembly Version: 1.0.1343.22
    Win32 Version: 1.0.1343.22
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/Microsoft.Web.WebView2.WinForms.dll
----------------------------------------
PowerToys.ManagedTelemetry
    Assembly Version: 0.68.1.0
    Win32 Version: 0.68.1.0
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/PowerToys.ManagedTelemetry.dll
----------------------------------------
System.Diagnostics.Tracing
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Diagnostics.Tracing.dll
----------------------------------------
System.Runtime.CompilerServices.Unsafe
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Runtime.CompilerServices.Unsafe.dll
----------------------------------------
System.Memory
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Memory.dll
----------------------------------------
ControlzEx
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.1.15
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/ControlzEx.dll
----------------------------------------
PresentationCore
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.7301
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/PresentationCore.dll
----------------------------------------
PresentationFramework
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.7301
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/PresentationFramework.dll
----------------------------------------
DirectWriteForwarder
    Assembly Version: 7.0.0.0
    Win32 Version: 7,0,323,7301 @Commit: 0a09c7d17212981cb4fd5907fa6a6214966a366d
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/DirectWriteForwarder.dll
----------------------------------------
System.Diagnostics.Debug
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Diagnostics.Debug.dll
----------------------------------------
System.Runtime.CompilerServices.VisualC
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Runtime.CompilerServices.VisualC.dll
----------------------------------------
Microsoft.Win32.Registry
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/Microsoft.Win32.Registry.dll
----------------------------------------
System.ObjectModel
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.ObjectModel.dll
----------------------------------------
System.ComponentModel.TypeConverter
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.ComponentModel.TypeConverter.dll
----------------------------------------
System.ComponentModel
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.ComponentModel.dll
----------------------------------------
System.Xaml
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.7301
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Xaml.dll
----------------------------------------
System.Configuration.ConfigurationManager
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Configuration.ConfigurationManager.dll
----------------------------------------
System.Xml.ReaderWriter
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Xml.ReaderWriter.dll
----------------------------------------
System.Private.Xml
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Private.Xml.dll
----------------------------------------
System.Net.WebClient
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Net.WebClient.dll
----------------------------------------
System.Text.Encoding.Extensions
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Text.Encoding.Extensions.dll
----------------------------------------
System.Linq
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Linq.dll
----------------------------------------
PresentationFramework-SystemXml
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.7301
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/PresentationFramework-SystemXml.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.dll
----------------------------------------
System.Threading.ThreadPool
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Threading.ThreadPool.dll
----------------------------------------
System.Threading.Tasks
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Threading.Tasks.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Drawing.dll
----------------------------------------
System.Numerics.Vectors
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Numerics.Vectors.dll
----------------------------------------
Microsoft.Windows.SDK.NET
    Assembly Version: 10.0.19041.24
    Win32 Version: 10.0.19041.28
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/Microsoft.Windows.SDK.NET.dll
----------------------------------------
System.Runtime.Loader
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Runtime.Loader.dll
----------------------------------------
System.Diagnostics.StackTrace
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Diagnostics.StackTrace.dll
----------------------------------------
System.Reflection.Metadata
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Reflection.Metadata.dll
----------------------------------------
System.Collections.Immutable
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.323.6910
    CodeBase: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/System.Collections.Immutable.dll
----------------------------------------

************** JIT Debugging **************

Other Software

No response

stefansjfw commented 1 year ago

/dup #24115

microsoft-github-policy-service[bot] commented 1 year ago

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

sba923 commented 1 year ago

@stefansjfw Well, the issue is kind of the same, but https://github.com/microsoft/PowerToys/issues/24115 was on 0.67.1, and the problem had been solved, whereas the present issue is on 0.68.1...

stefansjfw commented 1 year ago

The problem is still there, it wasn't solved on 0.67.1.