microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
109.86k stars 6.47k forks source link

"Unhandled exception has occurred in app.... group or resource is not in the correct state to perform the requested operation. (0x8007139F)." #30564

Closed x-po closed 6 months ago

x-po commented 9 months ago

Microsoft PowerToys version

0.76.2

Installation method

PowerToys auto-update

Running as admin

Yes

Area(s) with issue?

Peek

Steps to reproduce

1. Define a new filetype / extension in Registry Editor

image

image

image

image

image

2. Append the newly defined extension to the filename of a plain txt file, preferably one containing code (in my case vba):

outlook_options_prompt_sending.txt --> outlook_options_prompt_before_sending._

3. Highlight the renamed file and press CTRL + to trigger a Peek window.

✔️ Expected Behavior

A Peek window appears displaying the script block (as plain text since Monaco can't identify language in a file without an extension).

❌ Actual Behavior

image

All text in Details section of the above dialog copied and pasted below:

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

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x8007139F): The group or resource is not in the correct state to perform the requested operation. (0x8007139F)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
   at Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateCoreWebView2ControllerAsync(IntPtr ParentWindow)
   at Microsoft.Web.WebView2.WinForms.WebView2.InitCoreWebView2Async(CoreWebView2Environment environment, CoreWebView2ControllerOptions controllerOptions)
   at Microsoft.PowerToys.PreviewHandler.Monaco.MonacoPreviewHandlerControl.<>c__DisplayClass13_0`1.<<DoPreview>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at InvokeStub_SendOrPostCallback.Invoke(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

************** Loaded Assemblies **************
System.Private.CoreLib
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Private.CoreLib.dll
----------------------------------------
PowerToys.MonacoPreviewHandler
    Assembly Version: 0.76.2.0
    Location: C:\Program Files\PowerToys\PowerToys.MonacoPreviewHandler.dll
----------------------------------------
System.Runtime
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Runtime.dll
----------------------------------------
WinRT.Runtime
    Assembly Version: 2.0.0.0
    Location: C:\Program Files\PowerToys\WinRT.Runtime.dll
----------------------------------------
System.Collections
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Collections.dll
----------------------------------------
System.Collections.Concurrent
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Collections.Concurrent.dll
----------------------------------------
System.Threading
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Threading.dll
----------------------------------------
System.Drawing.Primitives
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Drawing.Primitives.dll
----------------------------------------
PowerToys.ManagedCommon
    Assembly Version: 0.76.2.0
    Location: C:\Program Files\PowerToys\PowerToys.ManagedCommon.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Windows.Forms.dll
----------------------------------------
PowerToys.PreviewHandlerCommon
    Assembly Version: 0.76.2.0
    Location: C:\Program Files\PowerToys\PowerToys.PreviewHandlerCommon.dll
----------------------------------------
System.ComponentModel.Primitives
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.ComponentModel.Primitives.dll
----------------------------------------
System.Windows.Forms.Primitives
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Windows.Forms.Primitives.dll
----------------------------------------
System.Collections.Specialized
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Collections.Specialized.dll
----------------------------------------
PowerToys.Interop
    Assembly Version: 0.76.2.0
    Location: C:\Program Files\PowerToys\PowerToys.Interop.dll
----------------------------------------
System.Runtime.Extensions
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Runtime.Extensions.dll
----------------------------------------
System.Runtime.InteropServices
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Runtime.InteropServices.dll
----------------------------------------
System.Collections.NonGeneric
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Collections.NonGeneric.dll
----------------------------------------
WindowsBase
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\WindowsBase.dll
----------------------------------------
PowerToys.Common.UI
    Assembly Version: 0.76.2.0
    Location: C:\Program Files\PowerToys\PowerToys.Common.UI.dll
----------------------------------------
System.IO.Abstractions
    Assembly Version: 17.0.0.0
    Location: C:\Program Files\PowerToys\System.IO.Abstractions.dll
----------------------------------------
System.Security.AccessControl
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Security.AccessControl.dll
----------------------------------------
System.Diagnostics.TraceSource
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Diagnostics.TraceSource.dll
----------------------------------------
System.Diagnostics.TextWriterTraceListener
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Diagnostics.TextWriterTraceListener.dll
----------------------------------------
System.Diagnostics.FileVersionInfo
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Diagnostics.FileVersionInfo.dll
----------------------------------------
System.Drawing.Common
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Drawing.Common.dll
----------------------------------------
Microsoft.Win32.Primitives
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\Microsoft.Win32.Primitives.dll
----------------------------------------
System.ComponentModel.EventBasedAsync
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.ComponentModel.EventBasedAsync.dll
----------------------------------------
System.Threading.Thread
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Threading.Thread.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Location: C:\Program Files\PowerToys\Accessibility.dll
----------------------------------------
Microsoft.Win32.SystemEvents
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\Microsoft.Win32.SystemEvents.dll
----------------------------------------
System.Memory
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Memory.dll
----------------------------------------
System.Diagnostics.StackTrace
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Diagnostics.StackTrace.dll
----------------------------------------
System.Text.Encoding.Extensions
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Text.Encoding.Extensions.dll
----------------------------------------
ControlzEx
    Assembly Version: 6.0.0.0
    Location: C:\Program Files\PowerToys\ControlzEx.dll
----------------------------------------
PresentationCore
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\PresentationCore.dll
----------------------------------------
PresentationFramework
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\PresentationFramework.dll
----------------------------------------
DirectWriteForwarder
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\DirectWriteForwarder.dll
----------------------------------------
System.Diagnostics.Debug
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Diagnostics.Debug.dll
----------------------------------------
System.Runtime.CompilerServices.VisualC
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Runtime.CompilerServices.VisualC.dll
----------------------------------------
System.ObjectModel
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.ObjectModel.dll
----------------------------------------
Microsoft.Win32.Registry
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\Microsoft.Win32.Registry.dll
----------------------------------------
System.ComponentModel.TypeConverter
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.ComponentModel.TypeConverter.dll
----------------------------------------
System.ComponentModel
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.ComponentModel.dll
----------------------------------------
System.Xaml
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Xaml.dll
----------------------------------------
System.Private.Uri
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Private.Uri.dll
----------------------------------------
System.Configuration.ConfigurationManager
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Configuration.ConfigurationManager.dll
----------------------------------------
System.Xml.ReaderWriter
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Xml.ReaderWriter.dll
----------------------------------------
System.Private.Xml
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Private.Xml.dll
----------------------------------------
System.Net.WebClient
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Net.WebClient.dll
----------------------------------------
System.Linq
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Linq.dll
----------------------------------------
PresentationFramework-SystemXml
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\PresentationFramework-SystemXml.dll
----------------------------------------
Microsoft.Web.WebView2.Core
    Assembly Version: 1.0.2088.41
    Location: C:\Program Files\PowerToys\Microsoft.Web.WebView2.Core.dll
----------------------------------------
mscorlib
    Assembly Version: 4.0.0.0
    Location: C:\Program Files\PowerToys\mscorlib.dll
----------------------------------------
Microsoft.Web.WebView2.WinForms
    Assembly Version: 1.0.2088.41
    Location: C:\Program Files\PowerToys\Microsoft.Web.WebView2.WinForms.dll
----------------------------------------
System.Runtime.CompilerServices.Unsafe
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Runtime.CompilerServices.Unsafe.dll
----------------------------------------
System.Numerics.Vectors
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Numerics.Vectors.dll
----------------------------------------
System.Drawing
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Drawing.dll
----------------------------------------
PowerToys.Settings.UI.Lib
    Assembly Version: 0.76.2.0
    Location: C:\Program Files\PowerToys\PowerToys.Settings.UI.Lib.dll
----------------------------------------
System.Security.Principal.Windows
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Security.Principal.Windows.dll
----------------------------------------
System.Security.Claims
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Security.Claims.dll
----------------------------------------
System.Text.Json
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Text.Json.dll
----------------------------------------
System.Text.Encodings.Web
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Text.Encodings.Web.dll
----------------------------------------
System.Runtime.Intrinsics
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Runtime.Intrinsics.dll
----------------------------------------
System.Reflection.Emit.Lightweight
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Reflection.Emit.Lightweight.dll
----------------------------------------
System.Reflection.Primitives
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Reflection.Primitives.dll
----------------------------------------
System.Reflection.Emit.ILGeneration
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Reflection.Emit.ILGeneration.dll
----------------------------------------
PowerToys.ManagedTelemetry
    Assembly Version: 0.76.2.0
    Location: C:\Program Files\PowerToys\PowerToys.ManagedTelemetry.dll
----------------------------------------
System.Diagnostics.Tracing
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Diagnostics.Tracing.dll
----------------------------------------
PowerToys.FilePreviewCommon
    Assembly Version: 0.76.2.0
    Location: C:\Program Files\PowerToys\PowerToys.FilePreviewCommon.dll
----------------------------------------
UtfUnknown
    Assembly Version: 2.0.0.0
    Location: C:\Program Files\PowerToys\UtfUnknown.dll
----------------------------------------
System.Text.Encoding.CodePages
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Text.Encoding.CodePages.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Location: C:\Program Files\PowerToys\System.dll
----------------------------------------
System.Threading.ThreadPool
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Threading.ThreadPool.dll
----------------------------------------
System.Threading.Tasks
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Threading.Tasks.dll
----------------------------------------
System.Runtime.Loader
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Runtime.Loader.dll
----------------------------------------
System.Reflection.Metadata
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Reflection.Metadata.dll
----------------------------------------
System.Collections.Immutable
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\PowerToys\System.Collections.Immutable.dll
----------------------------------------

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

Other Software

No response

x-po commented 9 months ago

PowerToysReport_2023-12-21-21-23-33.zip

Archived bug report created a moment after error dialog appeared.

crutkas commented 6 months ago

/dup https://github.com/microsoft/PowerToys/issues/16567

microsoft-github-policy-service[bot] commented 6 months 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!

pa-0 commented 5 months ago

Not sure if this is helpful to you, but I have the same exact issue. Peek crashes with same error code when I add the preview handler value to shellex sub-key for ahk filetypes and then attempt to activate a Peek window on an ahk script.