dlprows / FocusVolumeControl

Stream Deck+ plugin for controlling the focused application's volume
MIT License
3 stars 1 forks source link

Seems to be crashing very often #5

Closed bananacity closed 9 months ago

bananacity commented 9 months ago

Hi, so after the first update you pushed out it worked great and focused apps showed up and changed as I switched tabs. but a few days after that it takes random amounts of times to detect the first app like half an hour etc and sometimes I can't adjust the volume on it and it won't change programs. and most of the time it just doesn't have any apps detected and falls back to system volume

So just wondering if this is maybe the program crashing and if there's a solution to it because when it worked it worked nicely

dlprows commented 9 months ago

That sounds a lot like a memory leak that I had addressed, and it took until today for elgato to publish to the marketplace

Can you check that you have version 1.1.2 (in the stream deck software, if you right click on the dial action, it will show the name of the plugin, version, and an uninstall button)

And let me know if you're still having trouble?

bananacity commented 9 months ago

Yeah I just uninstalled and reinstalled it and it's version 1.1.2 but it seems to be the same thing still where on startup it takes half an hour or longer to pickup whatever application i have open and then doesn't switch applications after that for a few hours. But I'll test for longer tomorrow incase that changes

dlprows commented 9 months ago

That does sound like its probably crashing.

There's a log at %appdata%\Elgato\StreamDeck\Plugins\com.dlprows.focusvolumecontrol.sdPlugin\pluginlog.log If you attach the logs, I can take a look.

Is there a particular app that you're having trouble with it not detecting? Is there an app that it will only sometimes detect, or is it just consistently not detecting certain ones?

I know of a couple crashes on 1.1.2 with some apps like halo master chief collection. The way I was looking up the name of the app to put on the display would sometimes crash And the way I was looking up the icon to show would sometimes make it look like it crashed because i had the wrong path to a fallback icon for when it fails to look up the app icon

So you could also try the latest pre-release if you don't want to wait for me to be able to look at the logs. https://github.com/dlprows/FocusVolumeControl/releases/tag/v1.2.0

bananacity commented 9 months ago

Sure, here's the logs. I do see quite a lot of "process with an id of 16632 is not running"

When I see it show an app it's usually google chrome or firefox but that's just because I'm mostly on those apps so I guess when it works it just picks up what's active. but most of the time it simply displays "focused app volume" and not a fallback

I'll test out the pre-release now and let you know if that might fix it

pluginlog.log

bananacity commented 9 months ago

Small update, installed the pre release and it took a few hours to detect chrome and for a minute it switched between chrome, firefox, steam like normal then got stuck on chrome and won't adjust its volume again unfortunately so doesn't seem like it fixed it

dlprows commented 9 months ago

looking through the log, one of the exceptions is one that i fixed where it will crash while starting up. When that would happen, the plugin would crash, and shut down, and it couldn't get started again until the stream deck software starts up now it will catch the error to not crash, and just rely on the update loop to get it showing what it should be

the rest of the log where its saying "process with an id of ___ is not running" is more concerning this is particularly odd because the application is iterating over the list of audio sessions, to get the process id. So basically its like this

Windows: there's an audio process with an id of 16632 running App: please give me the process information for the process with id 16632 Windows: there is no process with that id one second later Windows: there's an audio process with an id of 16632 running (repeat indefinitely)

So i would expect a log from the pre release to look similar.

This is a problem because its kind of fundamental to the application working.

Do you happen to have multiple users that use the same computer? Can you check and see if the new log is similar? Are you using an account that isn't an administrator?

I'm kind of just making wild guesses of what could be causing something like this to not be working, because there's nothing in microsoft's documentation that says anything other than "there is no process with that id" even though there clearly is

I have some ideas of a different way i could try getting the process info, but it will take some time, and i'm not even sure if it'll fix it since i'm not sure what could cause the problem in the first place

bananacity commented 9 months ago

You know what, I think the issue will be with my windows setup, I just plugged it into another windows PC and it works flawlessly.

I have another windows user account for homeassistant but I don't use that so I'll try removing it and see if it works and some other settings or apps maybe that I have running. If I figure out what it was I'll update this incase someone else has a similar setup and issue

bananacity commented 9 months ago

Just deleted my 2nd windows user account and it works instantly after restarting my PC. I guess that was the issue, might be worth mentioning that in the docs in case others have multiple accounts and run into that

dlprows commented 9 months ago

I think i can do a little bit more error handling to try and keep that from happening. It just might take a little time, i usually work on this on weekends, and i have things coming up.

Thanks for troubleshooting that with me, and let me know if you have any more problems

bananacity commented 9 months ago

damn, well today when i started up my PC it's back to not working. same error in the logs about the process not found. it was working perfectly all of yesterday so I'm not sure why a restart would break it. tried to uninstall and reinstall the v1.2 like last time but now that doesn't work. Will test around some different stuff and see if i can figure out why

dlprows commented 9 months ago

Did you try the updated 1.2.0 I made today, or just the one you downloaded yesterday

bananacity commented 9 months ago

ah yeah the new one works again perfectly,

and the updates are great