Armoury-Control icon indicating copy to clipboard operation
Armoury-Control copied to clipboard

Armoury Control Crashes Shortly After Launch

Open smreichling opened this issue 1 year ago • 0 comments

I'll launch Armoury Control, I see its icon pop up in the taskbar for ~3 seconds, then it crashes and the icon disappears.

The exit code is 82. I'm running the latest version (0.0.7.3).

This seems to happen specifically when I have an external display attached to my laptop and the built-in display is switched off. If I switch back to using the built-in display, I can once again launch Armoury Control successfully.

I poked around in the Windows Event Viewer and found this stack trace from the crash:

Application: Armoury Control.exe
CoreCLR Version: 6.0.1423.7309
.NET Version: 6.0.14
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception: Failed to set refresh rate.
   at acControl.Scripts.NativeMethods.SetRefreshRate(Int32 refreshRate) in C:\Users\james\source\repos\Armoury-Control\acControl\Scripts\NativeMethods.cs:line 80
   at acControl.Scripts.SetSystemSettings.<>c__DisplayClass8_0.<setDisplaySettings>b__0() in C:\Users\james\source\repos\Armoury-Control\acControl\Scripts\SetSystemSettings.cs:line 126
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at acControl.Scripts.SetSystemSettings.setDisplaySettings(Int32 index) in C:\Users\james\source\repos\Armoury-Control\acControl\Scripts\SetSystemSettings.cs:line 121
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
   at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()

smreichling avatar May 28 '23 02:05 smreichling