Author Topic: [SOLVED] CPU usage issue after stopping playback  (Read 1655 times)

hoodini123

  • Newbie
  • *
  • Posts: 4
I've searched the forum, but didn't find anything relating to my issue, so I decided to make this thread.
I've been using Musicbee at least since v2.5, but sadly I don't remember when this issue first occurred. I'm pretty sure it began after the release of v3, though.

I just updated to v3.2.6812, but the problem persists.



Whenever I stop the audio playback using either the media keys on my keyboard or mouse, as well as when I stop the playback using the GUI button, the CPU usage does not decrease. Right after starting the program, it uses less than 1% of my CPU. During playback it uses roughly 6 to 9%. After stopping the playback it still uses around 8%.

However, if I pause the playback instead of stopping it (again using the media keys or the GUI), Musicbee uses around 2% of my CPU. If I press the stop button again while the track is paused (without restarting the playback first), the CPU usage immediately jumps back to around 8%. Interestingly, if I start the playback after stopping it and then pause it again, the CPU usage goes back to 2%.




In short: While the playback is stopped, CPU usage is as high as during playback. While the playback is paused, the CPU usage is way lower than during playback.
Really weird.


The playback is smooth at all times, even after days of Musicbee idling and hours of playback. The issue occurs with .mp3, .m4a and .flac. I didn't test any other formats. The three plugins Musicbee comes with by default are disabled.
There doesn't seem to be anything relevant in the error log (there are no actual errors listed since March).


What could be causing this?


I'm using the following setup:
Windows 8.1
i5-6600k
Musicbee installed on SSD, music files on HDD
Onboard soundcard (ASUS Ranger VIII - updating the BIOS did not resolve the issue)
Realtek HD Audio driver v6.0.1.7904 (the latest driver provided on the ASUS website - I've tried older drivers as well, no dice)
tried DirectSound and WASAPI (shared) output with the same results
All other software/drivers should be up-to-date.

I've tried to provide as much relevant information as I could, if I missed anything let me know.
Last Edit: August 27, 2018, 08:08:28 PM by hoodini123

redwing

  • Guest
During playback it uses roughly 6 to 9%. After stopping the playback it still uses around 8%.

Not sure why playback alone uses that much of your CPU in the first place. My laptop goes rarely over 2% just with playback.
You might want to try other players (Foobar, iTunes, AIMP, VLC, etc.) and compare the usage to see if it's really an MB-related issue.
Also make sure to disable all plugins /EQs / VST / DSP plugins for this test.

hoodini123

  • Newbie
  • *
  • Posts: 4
Thank you for your reply! As you suggested, I tried other players. I played the same .mp3 file in all players I had installed (one after the other, not at the same time).
Here are the results:



Musicbee does indeed seem to use an unusual amount of CPU processing power during playback/while stopped.

The settings in all programs are (or at least should be) on the default, except for Musicbee where I disabled the default plugins (I had the same results with them enabled) and rearranged the layout. Musicbee is also the only one that has a full library, but that probably doesn't matter here. Equalizer is disabled.
I really can't think of any setting I might have changed that could be responsible for the high CPU usage.




While writing this post I realized that I haven't tried the portable version of Musicbee yet. It does not have any issues at all as you can see below.


(v3.2.6760)

Something was wrong. In a last ditch effort, I tried running the installed v3.2.6812 as Administrator.



And there you go.

Now how did this happen? Turns out all folders in my Program Files folder (as well as the Program Files folder itself) were set to read-only. Whenever I try to modify a file in the programs folder, I get a popup that tells me I need admin rights to do that. The popup has a button to confirm that I really want to make these changes and it works fine.
This didn't happen on any other Windows version I've used. I already disable UAC on all of my machines, but on this machine the nag screens still appeared. Since this is my first computer running Windows 8.1, I assumed this was intentional and mandatory (for security reasons).

But apparently this isn't the case. For some reason the User Account Control Settings in the Windows Control Center did not turn off UAC entirely. I checked the relevant registry entry and sure enough, UAC was still enabled, despite the GUI telling me that it's turned off. I don't even know...  :-X
At this point I'm kind of used to UAC (it's way less annoying than it used to be), so I'll keep it on for now. I'll look further into this tomorrow though, I don't like my system doing things I didn't instruct it to do.


I have removed the read only flag from Musicbee's installation folder and now it's working perfectly.

But now I'm wondering why Musicbee needs write permissions for the installation folder in the first place. It does not seem to be modifying any files in that folder while running from what I can tell. I can't even see it (or any other process) accessing the installation folder (using Process Hacker). It's the first time that I noticed any program was acting like this and as I've said before, all program folders are read only by default.

I'm also curious if something similar happened to anyone else or if this is an issue entirely on my end. If it's indeed an isolated issue I apologize for making this thread and wasting your time  :)  At least I got it working now.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 35002
But now I'm wondering why Musicbee needs write permissions for the installation folder in the first place.
Only on the first installation, which the installer requests. After that no write permission is needed and I dont see how changing to/from read-only would make any difference

hoodini123

  • Newbie
  • *
  • Posts: 4
Only on the first installation, which the installer requests. After that no write permission is needed and I dont see how changing to/from read-only would make any difference

Thank you for taking the time to read this thread.
I've got bad news, I was entirely wrong yesterday. I misunderstood the read-only flag on Windows. Resource usage was back to normal right after 'changing the folder permissions' (must have been a weird coincidence), so I assumed that was the solution. But shortly after making my last post, the CPU usage went back up (same behavior as described in the original post), both with the installed version as well as in the portable version (with or without admin privileges). I was too tired tomake another post in this thread and went to sleep. I'm really sorry for the confusion!


I left Musicbee in idle over the night, but the CPU usage was still the same when I woke up.
After backing up my settings/library to my desktop and scanning my computer for malware, I have manually deleted the Musicbee folders in Appdata\Local and AppData\Roaming, then I uninstalled the software entirely.
I installed the latest version of Musicbee on another drive (i.e. not the system drive), to make sure it wasn't an issue with the hardware. I didn't import my settings or library and played a different file. Same result.
I deleted the AppData folders again just in case and tried the portable version from yet another drive. I left all settings on default, same result.

To rule out any programs interfering with Musicbee, I restarted my computer and disabled as many background processes as possible. I also considered that it might be some bug in the system monitor software I'm using, so I compared the displayed CPU usage with the one in Microsoft's task manager as well as Microsoft's Process explorer. I still got the same results in all three applications.



I also checked for anything out of the ordinary in the Windows Event Viewer, but couldn't find anything.
Musicbee's error log was empty.
I don't know what else I could try to make this go away and I still don't understand why it shortly went back to normal yesterday.


Then I decided to try Musicbee on my laptop (which is running Windows 8.0). It had v2.3.5188 installed. This version on that machine uses around 3% CPU during playback and around 1% afterwards on a mobile i5 3rd gen. So it seems that this is an issue exclusive to my desktop computer. I have not seen anyone experiencing anything similar on the forums or elsewhere on the internet.

I can't think of anything 'special' about this machine that might be causing this and other players don't seem to have any issues with playback/pausing files.

But I love Musicbee and I really want it to work properly on this computer.



Edit:
I still had the installer for Musicbee v2.5.5804 on my disk. After installation, the library had all of my files, even the ones I added recently and it uses between 1 and 5% during playback depending on the file and once playback is stopped, the CPU usage goes down to ~0.01%. I'll be using that until another solution for v3 is found.
Last Edit: August 27, 2018, 07:36:37 PM by hoodini123

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 35002
the only suggestion i have is to:
(a) choose DirectSound in output mode in the Player preferences
(b) if that doesnt work, replace bass.dll with the one that came with v2.5

hoodini123

  • Newbie
  • *
  • Posts: 4
the only suggestion i have is to:
(a) choose DirectSound in output mode in the Player preferences
(b) if that doesnt work, replace bass.dll with the one that came with v2.5

Replacing the bass.dll did the trick, thank you! v3.2.6760 portable is now working perfectly, less than 1% usage during playback and ~0.01% after stopping the playback.

I'm terribly sorry for all the confusion I might have caused, but thank you a lot for the quick support!