microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.83k stars 6.53k forks source link

Awake crashing unexpectedly #35596

Open wondroushippo opened 5 hours ago

wondroushippo commented 5 hours ago

Microsoft PowerToys version

0.85.1

Installation method

GitHub

Running as admin

No

Area(s) with issue?

Awake

Steps to reproduce

Here's the bug report log, you can notice the errors at 14:18. The Awake tray icon disappears and my computer no longer stays awake. This bug persists through uninstallation and reinstallation on the latest version of PowerToys.

[13:22:43.5842317] [Info] Program::Main Launching Awake... [13:22:43.6021348] [Info] Program::Main 0.85.1.0 [13:22:43.6023340] [Info] Program::Main Build: PROMETHEAN_09082024 [13:22:43.6049083] [Info] Program::Main OS: Microsoft Windows NT 10.0.22631.0 [13:22:43.6923303] [Info] Program::Main OS Build: Windows 10 Home 23H2 22621.1.amd64fre.ni_release.220506-1250 [13:22:43.7921580] [Info] Program::Main {} [13:22:43.7923843] [Info] Program::Main Parsing parameters... [13:22:43.9217698] [Info] Program::HandleCommandLineArguments Starting with PID binding. [13:22:43.9231439] [Info] Program::HandleCommandLineArguments The value for --use-pt-config is: True [13:22:43.9235758] [Info] Program::HandleCommandLineArguments The value for --display-on is: True [13:22:43.9243859] [Info] Program::HandleCommandLineArguments The value for --time-limit is: 0 [13:22:43.9247546] [Info] Program::HandleCommandLineArguments The value for --pid is: 5220 [13:22:43.9250268] [Info] Program::HandleCommandLineArguments The value for --expire-at is: [13:22:43.9252570] [Info] Program::HandleCommandLineArguments The value for --use-parent-pid is: False [13:22:43.9350707] [Info] <>cDisplayClass17_0::b0 Thread execution is on: 5 [13:22:43.9537758] [Info] <>cDisplayClass13_0::b1 Created HWND for the window: 135564 [13:22:43.9595127] [Info] Program::HandleCommandLineArguments Reading configuration file: C:\Users\wondr\AppData\Local\Microsoft\PowerToys\Awake\settings.json [13:22:43.9601875] [Error] Program::HandleCommandLineArguments The settings file does not exist. Scaffolding default configuration... [13:22:43.9756745] [Info] <>cDisplayClass17_0::b0 Thread execution is on: 5 [13:22:44.2859173] [Info] Program::ProcessSettings Identified custom time shortcuts for the tray: 0 [13:22:44.3027140] [Info] Manager::SetPassiveKeepAwake Operating in passive mode (computer's standard power plan). No custom keep awake settings enabled. [13:22:44.3062106] [Info] Manager::CancelExistingThread Attempting to ensure that the thread is properly cleaned up... [13:22:44.3071579] [Info] Manager::CancelExistingThread Instantiating of new token source and thread token completed. [13:22:44.3106063] [Info] Program::HandleCommandLineArguments Bound to target process while also using PowerToys settings: 5220 [13:22:44.3128612] [Info] <>c::b17_0 Setting state to ES_CONTINUOUS [13:23:03.4052115] [Info] Program::HandleAwakeConfigChange Detected a settings file change. Updating configuration... [13:23:03.4064767] [Info] Program::ProcessSettings Identified custom time shortcuts for the tray: 0 [13:23:03.4075110] [Info] Manager::SetTimedKeepAwake Timed keep-awake. Expected runtime: 60 seconds with display on setting set to False. [13:23:03.4076929] [Info] Manager::CancelExistingThread Attempting to ensure that the thread is properly cleaned up... [13:23:03.4078271] [Info] Manager::CancelExistingThread Instantiating of new token source and thread token completed. [13:23:03.4079151] [Info] Manager::SetTimedKeepAwake [13:23:03.4079374] [Info] <>c::b17_0 Setting state to ES_CONTINUOUS Timed keep awake started for 60 seconds. [13:23:03.4081910] [Info] <>c::b17_0 Setting state to ES_SYSTEM_REQUIRED, ES_CONTINUOUS [13:23:09.9310997] [Info] Manager::SetTimedKeepAwake Timed keep-awake. Expected runtime: 7200 seconds with display on setting set to False. [13:23:09.9312658] [Info] Manager::CancelExistingThread Attempting to ensure that the thread is properly cleaned up... [13:23:09.9313940] [Info] <>c::b17_0 Setting state to ES_CONTINUOUS [13:23:09.9325265] [Info] Manager::CancelExistingThread Instantiating of new token source and thread token completed. [13:23:09.9326416] [Info] Manager::SetTimedKeepAwake Timed keep awake started for 7200 seconds. [13:23:09.9327605] [Info] <>c::b17_0 Setting state to ES_SYSTEM_REQUIRED, ES_CONTINUOUS [13:23:09.9695039] [Info] Program::HandleAwakeConfigChange Detected a settings file change. Updating configuration... [13:23:09.9702792] [Info] Program::ProcessSettings Identified custom time shortcuts for the tray: 0 [13:23:09.9704648] [Info] Manager::SetTimedKeepAwake Timed keep-awake. Expected runtime: 7200 seconds with display on setting set to False. [13:23:09.9705580] [Info] Manager::CancelExistingThread Attempting to ensure that the thread is properly cleaned up... [13:23:09.9706558] [Info] <>c::b17_0 Setting state to ES_CONTINUOUS [13:23:09.9706779] [Info] Manager::CancelExistingThread Instantiating of new token source and thread token completed. [13:23:09.9708662] [Info] Manager::SetTimedKeepAwake Timed keep awake started for 7200 seconds. [13:23:09.9709647] [Info] <>c::b17_0 Setting state to ES_SYSTEM_REQUIRED, ESCONTINUOUS [14:18:24.6651563] [Info] TrayHelper::SetShellIcon Could not set the shell icon. Action: Update and error code: 1460. HIcon handle is 1118559 and HWnd is 135564 [14:18:24.6826729] [Error] Program::AwakeUnhandledExceptionCatcher System.ComponentModel.Win32Exception (1460): Failed to change tray icon. Action: Update and error code: 1460 at Awake.Core.TrayHelper.SetShellIcon(IntPtr hWnd, String text, Icon icon, TrayIconAction action) at System.Reactive.AnonymousSafeObserver1.OnNext(T value) at System.Reactive.SafeObserver1.WrappingSafeObserver.OnNext(TSource value) at System.Reactive.Linq.ObservableImpl.CombineLatest`3..FirstObserver.OnNext(TFirst value) at System.Reactive.HalfSerializer.ForwardOnNext[T](ISink`1 sink, T item, Int32& wip, Exception& error) at System.Reactive.Concurrency.AsyncLock.<>c51.<Wait>b__5_0(Delegate actionObject, Object stateObject) at System.Reactive.Concurrency.AsyncLock.Wait(Object state, Delegate delegate, Action2 action) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool) at System.Threading.TimerQueue.FireNextTimers() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() [14:18:24.6828951] [Error] Program::AwakeUnhandledExceptionCatcher at Awake.Core.TrayHelper.SetShellIcon(IntPtr hWnd, String text, Icon icon, TrayIconAction action) at System.Reactive.AnonymousSafeObserver1.OnNext(T value) at System.Reactive.SafeObserver1.WrappingSafeObserver.OnNext(TSource value) at System.Reactive.Linq.ObservableImpl.CombineLatest3._.FirstObserver.OnNext(TFirst value) at System.Reactive.HalfSerializer.ForwardOnNext[T](ISink1 sink, T item, Int32& wip, Exception& error) at System.Reactive.Concurrency.AsyncLock.<>c5`1.b5_0(Delegate actionObject, Object stateObject) at System.Reactive.Concurrency.AsyncLock.Wait(Object state, Delegate delegate, Action`2 action) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool) at System.Threading.TimerQueue.FireNextTimers() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()Log_2024-10-25.txt

āœ”ļø Expected Behavior

No response

āŒ Actual Behavior

No response

Other Software

No response

similar-issues-ai[bot] commented 5 hours ago

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by šŸ‘ or šŸ‘Ž this comment.