Skip to content

Bug: HASS.Agent keeps crashing #156

Closed

Description

@klkohl

Whenever HASS.Agent starts it runs for a few seconds then crashes/disappears from task bar. I've tried uninstalling and reinstalling. Any suggestions to resolve this would be greatly appreciated.

Activity

  1. LAB02-Admin commented on Aug 31, 2022

    @LAB02-Admin
    Member

    What version of Windows are you using?

    You can try the beta: https://github.com/LAB02-Research/HASS.Agent/releases/tag/2022.13.0-beta2

  2. klkohl commented on Aug 31, 2022

    @klkohl
    Author

    Windows 10.

    I'll try the beta.

  3. pejoeazmi21 commented on Sep 4, 2022

    @pejoeazmi21

    Same with me the app always disappear on taskbar. Im using windows 11. And already try the beta.

  4. Alderto1995 commented on Sep 7, 2022

    @Alderto1995

    I have the same issue :(
    I see the following error in my event viewer:
    Application: HASS.Agent.exe CoreCLR Version: 6.0.422.16404 .NET Version: 6.0.4 Description: The process was terminated due to an unhandled exception. Exception Info: System.Runtime.InteropServices.COMException (0x80010002): Aanroep is door het berichtenfilter geannuleerd. (0x80010002 (RPC_E_CALL_CANCELED)) at HASS.Agent.Media.MediaManager.MediaMonitor() 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, Action1 callback, TState& state)
    at System.Threading.QueueUserWorkItemCallback.Execute()
    at System.Threading.ThreadPoolWorkQueue.Dispatch()
    at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
    at System.Threading.Thread.StartCallback()
    `

    I'm running windows 11.
    I also tried reinstalling the program, but that did not help either

  5. klkohl commented on Sep 7, 2022

    @klkohl
    Author

    Beta isn't working either.

  6. LAB02-Admin commented on Sep 8, 2022

    @LAB02-Admin
    Member

    That's a helpful log @Alderto1995, I'll look into it, thanks

  7. self-assigned this
    on Sep 8, 2022
  8. slunat commented on Sep 15, 2022

    @slunat

    I've been experiencing crashing for a few months on my Windows 10 PC, sometimes it quits after a few seconds, sometimes it lasts a few hours or days before it terminates itself. No issues with my Windows 11 PC. I have just installed the latest 2022.13 beta 2 and it is still crashing. Event viewer shows the following:

    Application: HASS.Agent.exe
    CoreCLR Version: 6.0.322.12309
    .NET Version: 6.0.3
    Description: The process was terminated due to an internal error in the .NET Runtime at IP 00007FFDB60DD70F (00007FFDB5F10000) with exit code c0000005.
    

    And

    Faulting application name: HASS.Agent.exe, version: 2022.13.0.0, time stamp: 0x62cf0990
    Faulting module name: coreclr.dll, version: 6.0.322.12309, time stamp: 0x6216cac2
    Exception code: 0xc0000005
    Fault offset: 0x00000000001cd70f
    Faulting process ID: 0x2e60
    Faulting application start time: 0x01d8c9151729f98c
    Faulting application path: C:\Users\sluna\AppData\Roaming\LAB02 Research\HASS.Agent\HASS.Agent.exe
    Faulting module path: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.3\coreclr.dll
    Report ID: 4b6144a5-5481-4400-a73e-badf216ea428
    Faulting package full name: 
    Faulting package-relative application ID: 
    

    My Windows version is 10 Pro 21H2 (19044.2006)

  9. cbarth3 commented on Oct 31, 2022

    @cbarth3

    Just tried installing this on my windows 10 machine and it opened fine the first time and then each time after that it just closes out when I try and click the icon in the system tray. Uninstalled and reinstalled and got the same thing.

  10. LAB02-Admin commented on Oct 31, 2022

    @LAB02-Admin
    Member

    To everyone here; if I make a debug build, would you be willing to test it? It'll give some more info (hopefully) in the logs for me to work with.

  11. klkohl commented on Oct 31, 2022

    @klkohl
    Author

    I'm willing.

  12. cbarth3 commented on Oct 31, 2022

    @cbarth3

    Same here

  13. LAB02-Admin commented on Nov 1, 2022

    @LAB02-Admin
    Member

    Okay, great :)

    There are two things I'd like to try, the first is focussed on getting more info. Please download this debug build:

    https://shares.lab02-research.org/tests/156/hass.agent.zip

    And place it anywhere on your PC. You can then copy your current hass.agent's config dir, it should be located in %appdata%\LAB02 Research\HASS.Agent\config.

    Completely close the current running hass.agent instance, and launch the debug variant. As soon as it crashes, please send me the logs in the logs subfolder.

    Note: after a reboot, the normal version will start.

  14. cbarth3 commented on Nov 2, 2022

    @cbarth3
  15. 1 remaining item

  16. LAB02-Admin commented on Nov 3, 2022

    @LAB02-Admin
    Member

    I've published a new beta for you to test @cbarth3:

    https://shares.lab02-research.org/tests/156/hass.agent.zip

    In your case, it was because mqtt is disabled but the mediaplayer doesn't properly check that. So this might not be the fix for the rest (I did fix a few other things as well though, so worth a try).

    Let me know how it goes - if it crashes again, please send the new logs :)

  17. engell90 commented on Nov 3, 2022

    @engell90

    Thanks,
    This version works for me, I hade same issue as cbarth3.

  18. klkohl commented on Nov 3, 2022

    @klkohl
    Author

    The previous version is working for me now. I had uninstalled it previously, but reinstalled when you reached out. So I didn't try the beta version. Glad it's working for everyone now.

  19. LAB02-Admin commented on Nov 3, 2022

    @LAB02-Admin
    Member

    Great!

  20. cbarth3 commented on Nov 3, 2022

    @cbarth3

    The latest one will stay running now and allow me to open the tray icon and adjust the settings. Now I just need to figure out why I can't connect to it from home assistant.

  21. LAB02-Admin commented on Nov 4, 2022

    @LAB02-Admin
    Member

    Connect what exactly @cbarth3?

  22. cbarth3 commented on Nov 4, 2022

    @cbarth3

    Connect what exactly @cbarth3?

    The local api connection. Gives me failed to connect.
    Screenshot_20221104_091701

  23. LAB02-Admin commented on Nov 4, 2022

    @LAB02-Admin
    Member

    Have you executed the port reservation:

    image

    If it doesn't work after that, open a new ticket and we'll sort it out

  24. hastarin commented on Nov 5, 2022

    @hastarin

    I'm getting the same error as @slunat and have just run the debug build and it's crashed after which it's crashing on startup.

    I've included the log though the last thing logged is at 13:46:50 and Event Viewer shows the actual crash at 13:52:21 so I'm not sure it's going to help you?

    [2022-11-05] HASS.Agent_20221105.log

    From what I can ascertain via web search it points to some unmanaged code trying to access memory it shouldn't?

    Application: HASS.Agent.exe
    CoreCLR Version: 6.0.1022.47605
    .NET Version: 6.0.10
    Description: The process was terminated due to an internal error in the .NET Runtime at IP 00007FFF3290224B (00007FFF32730000) with exit code c0000005.
    
    Faulting application name: HASS.Agent.exe, version: 2022.14.0.0, time stamp: 0x6331eb0e
    Faulting module name: coreclr.dll, version: 6.0.1022.47605, time stamp: 0x6331e1bc
    Exception code: 0xc0000005
    Fault offset: 0x00000000001d224b
    Faulting process id: 0x0x20F8
    Faulting application start time: 0x0x1D8F0C2F4DCBA5C
    Faulting application path: C:\tools\hass.agent\HASS.Agent.exe
    Faulting module path: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.10\coreclr.dll
    Report Id: f3d92f28-ce6f-4338-92e3-55caf18694f8
    Faulting package full name: 
    Faulting package-relative application ID:
    
  25. hastarin commented on Nov 5, 2022

    @hastarin

    I'm not sure it helps but I guess more info can't hurt even if it's just documenting co-incidence. I could still run the normal version when the Beta was failing. I copied my configuration over again in case I'd tweaked anything and then I was able to run the Beta again, so I'll leave it running.

    I can see you're using a COM wrapper for Windows Update so I'm going to try removing that sensor to see if it helps.

    EDIT: It didn't help but removing all sensors has allowed me to run it, putting the file back crashes on startup. Process of elimination time! ...

    EDIT: No luck. I notice when it crashes on startup the cursor changes to a wait cursor shortly before the window disappears.

  26. hastarin commented on Nov 5, 2022

    @hastarin

    Just a note that I noticed I was getting an error in my logs at a similar time, within 30s, of a crash:

    The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID 
    {2593F8B9-4EAF-457C-B68A-50F6B8EA6B54}
     and APPID 
    {15C20B67-12E7-4BB6-92BB-7AFF07997402}
    

    I followed the guide linked below but using the IDs from my error message:
    https://www.kapilarya.com/fix-event-10016-error-the-application-specific-permission-settings-do-not-grant-local-activation-permission-in-windows-10

    I haven't had a crash since, but it might be too early to call it a solution. 🤞

    EDIT: I've run both the beta and the normal version for a few hours each without a crash so this is definitely worth trying for others that may see similar entries around the time of the crash.

  27. LAB02-Admin commented on Nov 9, 2022

    @LAB02-Admin
    Member

    Fixes implemented in the latest beta, closing this

  28. LAB02-Admin commented on Nov 10, 2022

    @LAB02-Admin
    Member

    Sorry @hastarin completely missed your additions yesterday! Thank you for that, I'll add it to the docs :)

  29. queesamor commented on Sep 8, 2023

    @queesamor

    I am experiencing essentially the exact symptoms as one of the others above ( #156 (comment) ), except I'm on version 14 instead of version 13. I am also on Windows 10.

    Given the version difference, I am hesitant to download the debug build that you created, since it isn't a fork from the version of the app that I'm running.

    How can I help solve this so it stops crashing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions