raf0d
raf0d
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
Reopening an old thread, lately, HASS.agent has been acting up. In the console everything looks fine, but data is not being updated in Homeassistant, in the logs I see a whole bunch of these errors:
2025-04-03 17:19:04.447 +02:00 [ERR] [AUDIOMGR] failed to retrieve devices: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at NAudio.CoreAudioApi.AudioSessionManager.RefreshSessions()
at NAudio.CoreAudioApi.MMDevice.GetAudioSessionManager()
at HASS.Agent.Shared.Managers.Audio.AudioManager.GetDeviceSessions(MMDevice mmDevice) in D:\a\HASS.Agent\HASS.Agent\src\HASS.Agent\HASS.Agent.Shared\Managers\Audio\AudioManager.cs:line 134
at HASS.Agent.Shared.Managers.Audio.AudioManager.GetDevices() in D:\a\HASS.Agent\HASS.Agent\src\HASS.Agent\HASS.Agent.Shared\Managers\Audio\AudioManager.cs:line 230
2025-04-03 17:19:04.447 +02:00 [ERR] [AUDIOMGR] failed to retrieve devices: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at NAudio.CoreAudioApi.AudioSessionManager.RefreshSessions()
at NAudio.CoreAudioApi.MMDevice.GetAudioSessionManager()
at HASS.Agent.Shared.Managers.Audio.AudioManager.GetDeviceSessions(MMDevice mmDevice) in D:\a\HASS.Agent\HASS.Agent\src\HASS.Agent\HASS.Agent.Shared\Managers\Audio\AudioManager.cs:line 134
at HASS.Agent.Shared.Managers.Audio.AudioManager.GetDevices() in D:\a\HASS.Agent\HASS.Agent\src\HASS.Agent\HASS.Agent.Shared\Managers\Audio\AudioManager.cs:line 230
If I go to settings and press store&activate sensors, some of the sensors do update, but just once, then it fails again immediately edit: seems like I have a multiple of the same audio devices available, maybe a windows glitch? edit2: those were nvidia inactive outputs, when I disabled these, it seems to be OK
713 replies
HHASS.Agent
Created by barrelltitor on 6/28/2024 in #💬・get-help
Can't change audio output until restart of hagent
Will give it a shot tomorrow. Anything in particular we should test/keep an eye out for?
80 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
It's been a smoth ride, 0 crashes 🙂
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
Yup, yup. I'll check it out. I'm also running a zmk-based keyboard so practically any macro can be programmed there.
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
been running it since sunday, it's been rock solid. Maybe I can also try the autoclicker thing, just to be sure (i'd appreciate a quick guide on how to set it up)
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
wonder if they deprecated it for this exact reason 😄
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
what a guy, installing right now, thx!
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
strange, It did not crash when my hass.agent windows was closed (only systray icon remains)
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
@barrelltitor are you able to replicate the error with the hass.agent window not being shown?
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
I've noticed we're using a deprecated method here: https://github.com/amadeo-alex/HASS.Agent/blob/e08c93766c5ff482c0a70adf2a31564408c65b2f/src/HASS.Agent/HASS.Agent/Media/MediaManager.cs#L411C2-L411C72 - though this is most likely NOT the cause of the issue
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
I might be wrong, but the code crash seems to be happening somewere around here: https://github.com/tpn/winsdk-10/blob/master/Include/10.0.16299.0/winrt/windows.media.playback.idl#L1005
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
I've also got the .dmp file if needed..
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
here's analysis from windbg (stack trace): https://pastebin.com/XMLrQpYc
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
replicated the same thing on my side, also captured a crash dump, here's the output: https://pastebin.com/EeQJ7KhH
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
It just says "slouch much?" through the media player (speakers) on my desktop PC
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
I have an automation, where one of the actions is this:
- service: tts.google_translate_say
data:
cache: true
entity_id: media_player.desktop
message: slouch much?
- service: tts.google_translate_say
data:
cache: true
entity_id: media_player.desktop
message: slouch much?
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
I did a sfc /scannow and chkdsk, let's see if it comes back
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
so it was probably the TTS part, judging from the dll
713 replies
HHASS.Agent
Created by sreknob on 3/24/2024 in #💬・get-help
High CPU and memory usage
this was logged in hass.agent log at the exact same time as the crash
713 replies