microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
109.76k stars 6.46k forks source link

Typing "120/" in the command bar lead to PowerToys to crash #22104

Closed charlesp-l closed 1 year ago

charlesp-l commented 1 year ago

Microsoft PowerToys version

0.64.1

Installation method

GitHub, PowerToys auto-update, WinGet

Running as admin

No

Area(s) with issue?

PowerToys Run

Steps to reproduce

Type 120/ in the PowerToys command windows.

I'm trying to do a calculation in the PowerToys run. The calculation is 120 divided by something. I'm not using the = sign to specify that it is a calculation. This bug has been present for a little while, I had this crash happened on me multiple times before, but haven't ruled out that it was the 120/ value that made it crash.

✔️ Expected Behavior

Not crash. Continue to allow the user to input stuff.

❌ Actual Behavior

PowerToys lags a bit, then throws an error Windows "PowerToys Run ran into an issue". Sometimes, I've seen this error windows pop multiple times (>100), sometimes it's just one.

image

I can't upload the log file since it is 32 MB (!!!!), but here I think I get the part that is of interest to you. The latest [FATAL] error is

[2022-11-10 16:41:12.5507] [FATAL]

Exception

System.IO.FileNotFoundException: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. 指定されたファイルが見つかりません。
   Source: PresentationFramework
   TargetAssembly: PresentationFramework, Version=6.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
   TargetModule: PresentationFramework.dll
   TargetSite: Void .cctor()
   at MS.Internal.Text.InternalEncoding..cctor()

System.TypeInitializationException: The type initializer for 'MS.Internal.Text.InternalEncoding' threw an exception.
   Source: PresentationFramework
   TargetAssembly: PresentationFramework, Version=6.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
   TargetModule: PresentationFramework.dll
   TargetSite: Void ComputePreferredCodePage()
   at System.Windows.Documents.FontTableEntry.ComputePreferredCodePage()
   at System.Windows.Documents.XamlToRtfWriter..ctor(String xaml)
   at System.Windows.Documents.XamlRtfConverter.ConvertXamlToRtf(String xamlContent)
   at System.Windows.Documents.TextEditorCopyPaste.ConvertXamlToRtf(String xamlContent, Stream wpfContainerMemory)
   at System.Windows.Documents.TextEditorCopyPaste._CreateDataObject(TextEditor This, Boolean isDragDrop)
   at System.Windows.Documents.TextEditorCopyPaste.Copy(TextEditor This, Boolean userInitiated)
   at System.Windows.Documents.TextEditorCopyPaste.OnCopy(Object target, ExecutedRoutedEventArgs args)
   at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
   at System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Environment

Assemblies - PowerToys.PowerLauncher

Other Software

No response

davidegiacometti commented 1 year ago

@jaimecbernardo This is a consistent repro of #18166

crutkas commented 1 year ago

agreed, /dup https://github.com/microsoft/PowerToys/issues/18166

ghost 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!

jaimecbernardo commented 1 year ago

For any users that are able to replicate this consistently, can you please update to 0.68.1 and disable thumbnail generation to verify if it fixes the issue? Please let us know on #18166!

image