Powertoys: PT Run ObjectDisposedException on timer [aka PT Run got an error]

Created on 1 Aug 2020  路  6Comments  路  Source: microsoft/PowerToys

Popup tells me to give y'all this.

2020-07-31.txt

Version: 1.0.0
OS Version: Microsoft Windows NT 10.0.19041.0
IntPtr Length: 8
x64: True
Date: 07/31/2020 17:29:59
Exception:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Timer'.
at System.Timers.Timer.set_Enabled(Boolean value)
at System.Timers.Timer.Start()
at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)
at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)
at System.Windows.UIElement.OnIsVisibleChanged(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.UIElement.UpdateIsVisibleCache()
at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
at System.Windows.Window.SetRootVisual()
at System.Windows.Window.SetRootVisualAndUpdateSTC()
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
at System.Windows.Window.CreateSourceWindowDuringShow()
at System.Windows.Window.SafeCreateWindowDuringShow()
at System.Windows.Window.ShowHelper(Object booleanBox)
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)

Hot Fix Issue-Bug Priority-0 Product-Launcher Resolution-Fix-Committed Severity-Regression

All 6 comments

Does anyone have a behavior to test this? It is clear we have a bug but not being able to reproduce it is going to make a fix hard to verify

ok, so with the help of @enricogior, we figured out a repro. Runner crashing is part of the problem.

  1. Make sure PowerLauncher.exe is not running.
    2, Delete the json settings folder
  2. start PT
  3. end the PT task via task manager
  4. restart it from the start menu.

If you look at Task manager, PT Runner is not present but PowerLauncher.exe is

With the PR, you'll see PT Run pop up on screen. Without the PR, you'll see the crash.

With the PR however, keyboard hooks don't seem to work. This could actually explain what is happening to a bunch of people when they think PT Run just stopped working.

I reproduced this not via visual studio but via it being installed

Sorry, I should have been more specific. In my case, PT crashes when I attempt to place task manager into a zone. Runner crashed but Launcher stayed open. I fiddled with some settings and noticed this does not happen when running PT as administrator.

Sorry, I should have been more specific. In my case, PT crashes when I attempt to place task manager into a zone. Runner crashed but Launcher stayed open. I fiddled with some settings and noticed this does not happen when running PT as administrator.

That bug (getting hot fixed) exposed this bug :)

Added "PT Run got an error" to the title to help limiting the duplicates.

Fixed with 0.20.1

Was this page helpful?
0 / 5 - 0 ratings