H
HASS.Agent6mo ago
luma

2.0.1 crashes when switching virtual desktops

Running 2.0.1, checking the windows event log I'm seeing evt 1000
Faulting application name: HASS.Agent.exe, version: 2.0.1.0, time stamp: 0x65310000
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc00000fd
Fault offset: 0x00007fff868b668c
Faulting process id: 0x0xAC2C
Faulting application start time: 0x0x1DA3CCA8E6C7740
Faulting application path: C:\Sync\Apps\HASS.Agent\Client\HASS.Agent.exe
Faulting module path: unknown
Report Id: 1b09f250-2e48-4f49-81a8-c0327b387e20
Faulting package full name:
Faulting package-relative application ID:
Faulting application name: HASS.Agent.exe, version: 2.0.1.0, time stamp: 0x65310000
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc00000fd
Fault offset: 0x00007fff868b668c
Faulting process id: 0x0xAC2C
Faulting application start time: 0x0x1DA3CCA8E6C7740
Faulting application path: C:\Sync\Apps\HASS.Agent\Client\HASS.Agent.exe
Faulting module path: unknown
Report Id: 1b09f250-2e48-4f49-81a8-c0327b387e20
Faulting package full name:
Faulting package-relative application ID:
File logs\[2024-01-01] HASS.Agent_20240101.log covers the time range where the most recent fault happened but has no mention of the error.
44 Replies
luma
luma6mo ago
OK I think I figured out what's causing this: switching virtual desktops. I had enabled that sensor because I use vdesktops pretty regularly. I just now noticed that when I launch HASS.Agent.exe and then switch desktops, the cursor has a waiting animation for about 5 seconds and the system tray icon goes unresponsive. A few seconds after that the icon goes away because the process has crashed. So I've gone and disabled the vdesktop sensor and... same result. Any time I change desktops HASS.Agent crashes. Found enable extended logging. One thing I note is that virtual desktop support is being loaded per the logs despite me not having the virtual desktop sensor loaded. Not sure if that's normal or not. I also note that there is a Windows event 1001 that always follows event 1000:
Fault bucket 1366032739964195707, type 5
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: CUOKYZEXWEFART0ZVUSVO13YV3TRFB34
P2: 2.0.1.0
P3: 65310000
P4: VirtualDesktop.10.0.22631.2861.generated.dll
P5: 6.2.1.0
P6: 6592cb48
P7: 6e
P8: 0
P9: System.StackOverflowException
P10:

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.6f739f44-4e1b-48b5-bbd0-30cd6007abf5.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.5e49ad35-442b-4651-8116-c158de39ad4a.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.1557904d-9ab9-4760-9499-c5dd42429214.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.6acccc59-c203-44c4-994c-f49f32a7960f.tmp.txt
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.30de8fc5-4a6d-4380-b758-4036607619ae.tmp.xml

These files may be available here:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_CUOKYZEXWEFART0Z_d15d3edcec4ec1a7d122e1d94cc8c91539ccc51c_72febacd_a30e833b-24b6-4fb5-9075-c199a62059d9

Analysis symbol:
Rechecking for solution: 0
Report Id: 9e7d5a8b-d74a-4c2f-a00e-d642a3eea4e4
Report Status: 268435456
Hashed bucket: 099c0a1909dcd8c5a2f51f8a191e937b
Cab Guid: 0
Fault bucket 1366032739964195707, type 5
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: CUOKYZEXWEFART0ZVUSVO13YV3TRFB34
P2: 2.0.1.0
P3: 65310000
P4: VirtualDesktop.10.0.22631.2861.generated.dll
P5: 6.2.1.0
P6: 6592cb48
P7: 6e
P8: 0
P9: System.StackOverflowException
P10:

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.6f739f44-4e1b-48b5-bbd0-30cd6007abf5.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.5e49ad35-442b-4651-8116-c158de39ad4a.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.1557904d-9ab9-4760-9499-c5dd42429214.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.6acccc59-c203-44c4-994c-f49f32a7960f.tmp.txt
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.30de8fc5-4a6d-4380-b758-4036607619ae.tmp.xml

These files may be available here:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_CUOKYZEXWEFART0Z_d15d3edcec4ec1a7d122e1d94cc8c91539ccc51c_72febacd_a30e833b-24b6-4fb5-9075-c199a62059d9

Analysis symbol:
Rechecking for solution: 0
Report Id: 9e7d5a8b-d74a-4c2f-a00e-d642a3eea4e4
Report Status: 268435456
Hashed bucket: 099c0a1909dcd8c5a2f51f8a191e937b
Cab Guid: 0
DrR0x
DrR0x5mo ago
I don't know how i missed this, was before bot so I wasn't pinged. Is this still an issue? I assume so considering 2.0.1 is the newest non-beta
Amadeo
Amadeo5mo ago
I've also missed that, sorry. Due to m$ shenanigans there is no official API to change/manage virtual desktops hence we're using a ln opensource library for this. This however comes with a caveat - m$ can change whatever they want whenever they want and the library beeds to catch up. As per the message regarding vd support even when no sensor is confugured - all managers are initialized on start, they just provide functions for the sensors/commands. What windows version (including build numer) are you using?
luma
luma5mo ago
Win 11 Enterprise Version 23H2 OS Build 22631.3007
Findel
Findel5mo ago
I think I might be having this issue also. Windows 11 Home - 22621.3007 I upgraded yesterday from the old LAB02 version, and the application doesn't appear to stay active. I make heavy use of virtual desktops, so that makes sense. The program definately crashes when switching between desktops. I've turned on extended logging, but there's nothing added to the log on crash.
DrR0x
DrR0x5mo ago
Did it work on the lab02 version?
Findel
Findel5mo ago
Yes Never had this issue with that version From windows event logs:
Faulting application name: HASS.Agent.exe, version: 2.0.1.0, time stamp: 0x65310000
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc00000fd
Fault offset: 0x00007ff8a86cf42c
Faulting process ID: 0x0x4A64
Faulting application start time: 0x0x1DA479C79A3AC18
Faulting application path: C:\Users\philb\AppData\Local\HASS.Agent\Client\HASS.Agent.exe
Faulting module path: unknown
Report ID: d61241b0-1100-4ecc-ad5f-c0604d464ba5
Faulting package full name:
Faulting package-relative application ID:
Faulting application name: HASS.Agent.exe, version: 2.0.1.0, time stamp: 0x65310000
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc00000fd
Fault offset: 0x00007ff8a86cf42c
Faulting process ID: 0x0x4A64
Faulting application start time: 0x0x1DA479C79A3AC18
Faulting application path: C:\Users\philb\AppData\Local\HASS.Agent\Client\HASS.Agent.exe
Faulting module path: unknown
Report ID: d61241b0-1100-4ecc-ad5f-c0604d464ba5
Faulting package full name:
Faulting package-relative application ID:
Fault bucket 1372839248298362345, type 5
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: 0LE0D1RBPIW0YF43OXB3MYRGWJ02VGOU
P2: 2.0.1.0
P3: 65310000
P4: VirtualDesktop.10.0.22621.3007.generated.dll
P5: 6.2.1.0
P6: 65a3fb60
P7: 6e
P8: 0
P9: System.StackOverflowException
P10:

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.5b6a4d8f-bb31-44bc-b607-d014b7a6edd4.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.54164675-cd77-4bb7-8b34-03b0596a7132.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.a452ad69-9ece-4890-ab44-736ccda9d810.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.916d7eeb-8030-4f85-b02e-1b600d6ce391.tmp.txt
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.db851c0e-c13c-433f-86cf-c2bb6c2ea362.tmp.xml

These files may be available here:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_0LE0D1RBPIW0YF43_96cd6292775dc63dcc6e2478143fdf6781c3bb4c_72febacd_4609c3f9-7b48-4f81-a781-2322c244d7eb

Analysis symbol:
Rechecking for solution: 0
Report Id: d61241b0-1100-4ecc-ad5f-c0604d464ba5
Report Status: 268435456
Hashed bucket: 7cc84aecbe9e90b6330d4e05d089c5e9
Cab Guid: 0
Fault bucket 1372839248298362345, type 5
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: 0LE0D1RBPIW0YF43OXB3MYRGWJ02VGOU
P2: 2.0.1.0
P3: 65310000
P4: VirtualDesktop.10.0.22621.3007.generated.dll
P5: 6.2.1.0
P6: 65a3fb60
P7: 6e
P8: 0
P9: System.StackOverflowException
P10:

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.5b6a4d8f-bb31-44bc-b607-d014b7a6edd4.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.54164675-cd77-4bb7-8b34-03b0596a7132.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.a452ad69-9ece-4890-ab44-736ccda9d810.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.916d7eeb-8030-4f85-b02e-1b600d6ce391.tmp.txt
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.db851c0e-c13c-433f-86cf-c2bb6c2ea362.tmp.xml

These files may be available here:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_0LE0D1RBPIW0YF43_96cd6292775dc63dcc6e2478143fdf6781c3bb4c_72febacd_4609c3f9-7b48-4f81-a781-2322c244d7eb

Analysis symbol:
Rechecking for solution: 0
Report Id: d61241b0-1100-4ecc-ad5f-c0604d464ba5
Report Status: 268435456
Hashed bucket: 7cc84aecbe9e90b6330d4e05d089c5e9
Cab Guid: 0
DrR0x
DrR0x5mo ago
Okay, seems weird that the library had to be updated if it still worked. This kind of thing is not my domain 😂 Have to see what @Amadeo says. What I can say is that Amadeo is very quick with a fix 😂 once we know what needs to happen he'll usually have it ready by the next day.
Amadeo
Amadeo5mo ago
Original version never had virtual desktop management
DrR0x
DrR0x5mo ago
Ohh 😂 I see, so it "worked" but had no features
Amadeo
Amadeo5mo ago
Yeah
DrR0x
DrR0x5mo ago
Damn, is there a possibility for this to become opt-in to prevent issues like this?
Findel
Findel5mo ago
What does the "virtual desktop management" feature include? It's not something I needed, but maybe it needs some configuration?
Amadeo
Amadeo5mo ago
It provides current vd sensor and command to change the active vd
Findel
Findel5mo ago
2024-01-15 10:30:55.739 +00:00 [INF] [MAIN] HASS.Agent version: 2.0.1
2024-01-15 10:30:55.743 +00:00 [INF] [MAIN] Extended logging enabled
2024-01-15 10:30:55.747 +00:00 [INF] [SETTINGS] Config storage path: C:\Users\philb\AppData\Local\HASS.Agent\Client\config
2024-01-15 10:30:55.857 +00:00 [INF] [SETTINGS] Configuration loaded
2024-01-15 10:30:55.860 +00:00 [INF] [LOCALIZATION] Selected UI culture: [en] English
2024-01-15 10:30:56.105 +00:00 [INF] [RADIOMGR] Ready
2024-01-15 10:30:58.155 +00:00 [INF] [INTERNALSENSORS] Ready
2024-01-15 10:31:00.203 +00:00 [FTL] [PROGRAM] FirstChanceException: Access to the path 'Global\Access_EC' is denied.
System.UnauthorizedAccessException: Access to the path 'Global\Access_EC' is denied.
at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
at LibreHardwareMonitor.Hardware.Ring0.TryCreateOrOpenExistingMutex(String name, Mutex& mutex)
2024-01-15 10:31:00.204 +00:00 [FTL] [PROGRAM] FirstChanceException: Access to the path 'Global\Access_EC' is denied.
System.UnauthorizedAccessException: Access to the path 'Global\Access_EC' is denied.
at System.Threading.Mutex.OpenExistingWorker(String name, Mutex& result)
at System.Threading.Mutex.OpenExisting(String name)
at LibreHardwareMonitor.Hardware.Ring0.TryCreateOrOpenExistingMutex(String name, Mutex& mutex)
2024-01-15 10:31:00.836 +00:00 [INF] [VIRTDESKT] Virtual Desktop Manager initialized
2024-01-15 10:30:55.739 +00:00 [INF] [MAIN] HASS.Agent version: 2.0.1
2024-01-15 10:30:55.743 +00:00 [INF] [MAIN] Extended logging enabled
2024-01-15 10:30:55.747 +00:00 [INF] [SETTINGS] Config storage path: C:\Users\philb\AppData\Local\HASS.Agent\Client\config
2024-01-15 10:30:55.857 +00:00 [INF] [SETTINGS] Configuration loaded
2024-01-15 10:30:55.860 +00:00 [INF] [LOCALIZATION] Selected UI culture: [en] English
2024-01-15 10:30:56.105 +00:00 [INF] [RADIOMGR] Ready
2024-01-15 10:30:58.155 +00:00 [INF] [INTERNALSENSORS] Ready
2024-01-15 10:31:00.203 +00:00 [FTL] [PROGRAM] FirstChanceException: Access to the path 'Global\Access_EC' is denied.
System.UnauthorizedAccessException: Access to the path 'Global\Access_EC' is denied.
at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
at LibreHardwareMonitor.Hardware.Ring0.TryCreateOrOpenExistingMutex(String name, Mutex& mutex)
2024-01-15 10:31:00.204 +00:00 [FTL] [PROGRAM] FirstChanceException: Access to the path 'Global\Access_EC' is denied.
System.UnauthorizedAccessException: Access to the path 'Global\Access_EC' is denied.
at System.Threading.Mutex.OpenExistingWorker(String name, Mutex& result)
at System.Threading.Mutex.OpenExisting(String name)
at LibreHardwareMonitor.Hardware.Ring0.TryCreateOrOpenExistingMutex(String name, Mutex& mutex)
2024-01-15 10:31:00.836 +00:00 [INF] [VIRTDESKT] Virtual Desktop Manager initialized
This is log when initialising the program.
DrR0x
DrR0x5mo ago
Sorry, just so we're clear on this 😂 very stupid question. A VD is the win + D or something right? The thing with ctrl windows left right or whatever?
Amadeo
Amadeo5mo ago
I'll jump into the code after work and check if it can be done retroactively (just handle possible errors) or proactively (allow to explicitly enable/disable this feature and be prone to m$ updates)
Findel
Findel5mo ago
Looks like it's erroring when loading your VIRTDESKT
Findel
Findel5mo ago
@DrR0x These are virtual desktops
No description
DrR0x
DrR0x5mo ago
Yeah thought so, just checking 😂 rarely used them on windows 10 Just alt+tabbed a lot
Findel
Findel5mo ago
I use them on Win 10 PC also, so useful
Amadeo
Amadeo5mo ago
The mgmt lib loading has a check for issues - if it cannot load properly it should log this but you've mentioned there is no mention of this in the logs
Findel
Findel5mo ago
It's not logging an error on crash, but it is logging these errors on start up
DrR0x
DrR0x5mo ago
I sort of didn't like the idea for the same reason I ditched tab management in opera browser and stuff like that. I could use something like this to organise apps/tabs but really, I should just not have that many open 😂 it ruins performance anyway. I can see how it could be nice if you only have 1 monitor tho.
Findel
Findel5mo ago
@Amadeo I started the program with elevated permissions to see if Access to path error occured.
2024-01-15 10:39:16.375 +00:00 [INF] [MAIN] HASS.Agent version: 2.0.1
2024-01-15 10:39:16.379 +00:00 [INF] [MAIN] Extended logging enabled
2024-01-15 10:39:16.382 +00:00 [INF] [SETTINGS] Config storage path: C:\Users\philb\AppData\Local\HASS.Agent\Client\config
2024-01-15 10:39:16.481 +00:00 [INF] [SETTINGS] Configuration loaded
2024-01-15 10:39:16.484 +00:00 [INF] [LOCALIZATION] Selected UI culture: [en] English
2024-01-15 10:39:16.705 +00:00 [INF] [RADIOMGR] Ready
2024-01-15 10:39:18.749 +00:00 [INF] [INTERNALSENSORS] Ready
2024-01-15 10:39:19.252 +00:00 [INF] [VIRTDESKT] Virtual Desktop Manager initialized
2024-01-15 10:39:19.264 +00:00 [INF] [SETTINGS_QUICKACTIONS] Config not found, no entities loaded
2024-01-15 10:39:19.293 +00:00 [INF] [SETTINGS_COMMANDS] Loaded 7 entities
2024-01-15 10:39:19.305 +00:00 [INF] [SETTINGS_SENSORS] Loaded 2 entities
2024-01-15 10:39:16.375 +00:00 [INF] [MAIN] HASS.Agent version: 2.0.1
2024-01-15 10:39:16.379 +00:00 [INF] [MAIN] Extended logging enabled
2024-01-15 10:39:16.382 +00:00 [INF] [SETTINGS] Config storage path: C:\Users\philb\AppData\Local\HASS.Agent\Client\config
2024-01-15 10:39:16.481 +00:00 [INF] [SETTINGS] Configuration loaded
2024-01-15 10:39:16.484 +00:00 [INF] [LOCALIZATION] Selected UI culture: [en] English
2024-01-15 10:39:16.705 +00:00 [INF] [RADIOMGR] Ready
2024-01-15 10:39:18.749 +00:00 [INF] [INTERNALSENSORS] Ready
2024-01-15 10:39:19.252 +00:00 [INF] [VIRTDESKT] Virtual Desktop Manager initialized
2024-01-15 10:39:19.264 +00:00 [INF] [SETTINGS_QUICKACTIONS] Config not found, no entities loaded
2024-01-15 10:39:19.293 +00:00 [INF] [SETTINGS_COMMANDS] Loaded 7 entities
2024-01-15 10:39:19.305 +00:00 [INF] [SETTINGS_SENSORS] Loaded 2 entities
It didn't. However, the program still crashed when I switched between virtual desktops. So those start up errors are due to non-Administrator permissions, but not the cause of the crash later on. Hope that helps.
Amadeo
Amadeo5mo ago
Oh yes It does Thank you When I tested in on the vms I have it was only
vdm initializes and works vdm fails to initialize end of story
This itke it initializes and then crashes, new scenario I'll try to work around it and if not this will be an opt in feature Thanks for the info 😄
Findel
Findel5mo ago
Happy to help. I'd love to dig into the code myself, but no time currently
luma
luma5mo ago
I'll note that virtual desktops are really handy if you have 3 monitors too 😄 it's a nice way to separate different tasks, I have a vdesktop for work stuff, for home stuff, for dev stuff, and for cad stuff. Being able to know which one is active would be crazy useful for me as I have different things I do and use when each desktop is active. Looking forward to this feature!
Amadeo
Amadeo5mo ago
this might be easier than I thought
Amadeo
Amadeo5mo ago
^ this is the vd mgmt lib that we're using one bundled with 2.x.x is 6.2.1 released 4 months ago, this fix was merged in november should be as easy as bumping the dep
Findel
Findel5mo ago
Sounds great. I'll jump on the beta when it's available as I just can't use hassagent as it is. Absolutely agree. I have two monitors (one ultrawide and one standard) and I use VD a lot. I don't have a lot of apps open (not enough to cause a performance issue) but it's so helpful to split up different tasks etc. I'm interested in knowing what sort of automations you are thinking of using to "know which one is active" though?
luma
luma5mo ago
One of my VDs is for media (flip over to a desktop for some youtubes while I wait for something at work) and it'd be nice to control audio sources and dim lights in response. When on work VD, turn off the lights in my workshop behind me so that when I jump on a Teams call it isn't super obvious that I've just been standing at my bench wrenching on shit instead of working, things like that 😄 What VD I have active at any given moment is a good proxy for what mode of work i'm engaged in.
Amadeo
Amadeo5mo ago
interesting how often do you turn off your computer? thinking about requirement to open all the windows/programs each time on those VDs 😄
luma
luma5mo ago
every other week or so. helps that i have 128GB DDR5 and a 13900k 😄
Amadeo
Amadeo5mo ago
gib that ram
Amadeo
Amadeo5mo ago
@luma @Findel please check this version 😄 https://github.com/hass-agent/HASS.Agent/releases/tag/2.0.2-beta2
GitHub
Release 2.0.2-beta2 · hass-agent/HASS.Agent
Changes This version attempts to fix HASS.Agent crash when virtual desktops are switched. Probable root cause was bug in the management library HASS.Agent uses, this version bumps the dependency ve...
luma
luma5mo ago
@Amadeo my man! works a treat. no more crashes when desktop sensor is not enabled and i switch vdesktops, then enabling the sensor it's correctly updating the desk UUID on switch (and still not crashing). everything working like i'd expect it to, and man what a fast turnaround. thanks!
Amadeo
Amadeo5mo ago
nice 😄
Findel
Findel5mo ago
Seems good to me! No more crashes.
Findel
Findel5mo ago
Installer still said 2.0.1, so probably needs a version bump somewhere.
No description
Findel
Findel5mo ago
Great work on a quick fix though @Amadeo - 👍
Amadeo
Amadeo5mo ago
ya, will change that before normal release, thanks for reminding tho 😄
DrR0x
DrR0x5mo ago
Told you he was quick 😂 Interesting about the VDs, I could see how activating my cad one could turn on my 3d printer and octoprint server. Might have to look into that. The biggest issue is the fact that o restart an average of 5 times a day 😂 so I am re-opening apps every single time.