Skip to content

Bug: HASS.Agent crashes as soon as I run Civilization 5 #115

@knezmilos13

Description

@knezmilos13

HASS.Agent crashes as soon as I run Civilization 5. It also crashes if I run Civ 5, alt+tab to desktop, start HASS.Agent again, then alt+tab back to Civ 5 for a second. Crashes are silent, and there's nothing interesting in the regular log file, however, some stuff appears when more detailed logging is turned on. This is the section of log file that appears after running Civ 5; entire file provided at the bottom.

System.Runtime.InteropServices.COMException (0x80070490): Element not found. (0x80070490)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
   at CoreAudio.MMDeviceEnumerator.GetDefaultAudioEndpoint(DataFlow dataFlow, Role role)
   at HASS.Agent.Shared.HomeAssistant.Sensors.GeneralSensors.MultiValue.AudioSensors.HandleAudioInputSensors(String parentSensorSafeName, String deviceName) in D:\a\HASS.Agent\HASS.Agent\src\HASS.Agent\HASS.Agent.Shared\HomeAssistant\Sensors\GeneralSensors\MultiValue\AudioSensors.cs:line 127
   at HASS.Agent.Shared.HomeAssistant.Sensors.GeneralSensors.MultiValue.AudioSensors.UpdateSensorValues() in D:\a\HASS.Agent\HASS.Agent\src\HASS.Agent\HASS.Agent.Shared\HomeAssistant\Sensors\GeneralSensors\MultiValue\AudioSensors.cs:line 177
2024-07-11 00:53:22.929 +02:00 [INF] [MQTT] Initial registration completed
2024-07-11 00:55:42.120 +02:00 [FTL] [PROGRAM] FirstChanceException: The method or operation is not implemented.
System.NotImplementedException: The method or operation is not implemented.
   at WindowsDesktop.Interop.IServiceProvider.QueryService(Guid& guidService, Guid& riid)
   at WindowsDesktop.Interop.ComInterfaceAssembly.CreateInstance(Type type, Nullable`1 guidService)
   at WindowsDesktop.Interop.ComInterfaceAssembly.CreateInstance(String comInterfaceName)
   at WindowsDesktop.Interop.ComWrapperBase`1..ctor(ComInterfaceAssembly assembly)
   at WindowsDesktop.Interop.Build10240.ApplicationViewCollection..ctor(ComInterfaceAssembly assembly)
   at WindowsDesktop.Interop.Build10240.VirtualDesktopProvider10240.InitializeCore(ComInterfaceAssembly assembly)
   at WindowsDesktop.Interop.VirtualDesktopProvider.Initialize(ComInterfaceAssembly assembly)
   at WindowsDesktop.VirtualDesktop.InitializeCore()
   at WindowsDesktop.VirtualDesktop.HandleExplorerRestarted()
   at WindowsDesktop.VirtualDesktop.<>c.<.cctor>b__70_0()
   at WindowsDesktop.Utils.ExplorerRestartListenerWindow.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   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)
2024-07-11 00:55:42.121 +02:00 [FTL] [MAIN] ThreadException: The method or operation is not implemented.
System.NotImplementedException: The method or operation is not implemented.
   at WindowsDesktop.Interop.IServiceProvider.QueryService(Guid& guidService, Guid& riid)
   at WindowsDesktop.Interop.ComInterfaceAssembly.CreateInstance(Type type, Nullable`1 guidService)
   at WindowsDesktop.Interop.ComInterfaceAssembly.CreateInstance(String comInterfaceName)
   at WindowsDesktop.Interop.ComWrapperBase`1..ctor(ComInterfaceAssembly assembly)
   at WindowsDesktop.Interop.Build10240.ApplicationViewCollection..ctor(ComInterfaceAssembly assembly)
   at WindowsDesktop.Interop.Build10240.VirtualDesktopProvider10240.InitializeCore(ComInterfaceAssembly assembly)
   at WindowsDesktop.Interop.VirtualDesktopProvider.Initialize(ComInterfaceAssembly assembly)
   at WindowsDesktop.VirtualDesktop.InitializeCore()
   at WindowsDesktop.VirtualDesktop.HandleExplorerRestarted()
   at WindowsDesktop.VirtualDesktop.<>c.<.cctor>b__70_0()
   at WindowsDesktop.Utils.ExplorerRestartListenerWindow.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   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)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

To Reproduce
Steps to reproduce the behavior:

  1. Run Civilization 5
  2. HASS.Agent silently crashes

Misc info (please complete the following information):

  • Windows build (ideally screenshot/info of winver.exe output):
    image

  • Windows' UI language: English

  • HASS.Agent version: 2.1.0-beta1

  • Installed via installer

  • Installed manually

  • Problem occurs in HASS.Agent

  • Problem occurs in Satellite Service

Logs
[2024-07-11] HASS.Agent_20240711.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions