Author Topic: VUMeter Plugin  (Read 50440 times)

BoringName

  • Sr. Member
  • ****
  • Posts: 916
I'm experiencing a strange problem.
Both MusicBee and VUMeter are suddenly responding extremely sluggish.

Sorry, been away for a few days...

The error you reported is a Musicbee error, not an error from VUMeter. Does the slowdown only occur with VUMeter enabled?


The letters of the text 'Skin Loading' always have looked a bit crooked to my eyes.

Bit strange. It uses the same code as 3DBee for the album/artist info and looks ok on my screen. There will always be some antialiasing when it's zoomed in but not crooked like your image. the "L" is perfectly straight for me no matter what size I make the VUmeter window.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
I'm experiencing a strange problem.
Both MusicBee and VUMeter are suddenly responding extremely sluggish.
The error you reported is a Musicbee error, not an error from VUMeter. Does the slowdown only occur with VUMeter enabled?
I'm pretty sure it is related to the VUMeter plugin.
As I said, it's a clean install with no other plugins installed.
I had some extreme slowdowns with MusicBee itself, but only when the plugin was installed.
Currently MB seems to work o.k., but VUMeter is working 'in slow-motion'.
I'll post the error message in the Bugs topic. Let's hope it gives Steven a clue what the problem might be.

sveakul

  • Hero Member
  • *****
  • Posts: 3262
If the issue begin with the latest plugin version have you tried backing down to an earlier version and seeing if it persists?  Does changing loaded meter format types affect it?  I'm not having any problems with 2.5.1 and the latest MusicBee running Windows 11 24H2 but I do not change meters much either or have a large MusicBee library.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
I'm pretty sure it is related to the VUMeter plugin.

You're going to have to do the trouble shooting on this one because I can't replicate it.

It sounds like it might be intermittent but no slow down has occurred when VUMeter is disabled?
Does changing the currently loaded skin effect it at all?
5000 albums is a decent size library. Does it still occur with a smaller library?

There is nothing in the code that would be effected by the library size. At this point I'm more inclined to think it's an issue with Musicbee and the new library and VUMeter slowing down is just a side effect of possibly not getting enough resources to run smoothly because of whatever that issue is.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
New version VUMeter2.6.zip

Changes
- New Option "Compress LZMA". This is only visible when a foobar skin is loaded and will convert the currently loaded skin to LZMA format. Skins with separate files eg) Grundig 1.bin, Grundig 2.bin will be replaced with "Grundig .bin" and the original files deleted. Single file skins will be overwritten. It takes a temp copy which is written back upon error so it shouldn't result in any file loss if the conversion fails. It doesn't care what compression the source has, so you can compress a file that is already LZMA and it will just overwrite it. You may notice a small file size change in this scenario but it will have no functional change.
- Improved the position behaviour of the confirmation box so it cannot appear offscreen.

The status of the file saving process is displayed on the status bar element so you need that element in your UI to see them. I'm considering putting the "Skin loading" message in there as well and removing it from the VUMeter window so it would just be a black screen while loading. The user still gets a notification that it's loading in the status bar and I don't have to worry about funky font problems trying to draw text.

Adson

  • Full Member
  • ***
  • Posts: 249
I have only now - unfortunately very late - discovered this wonderful plugin and tried it out.
I think it enriches and improves the UI of MB immensely. It's a real pleasure to simply watch the needles of the VU meter :-)

Many thanks to everyone who helped to develop this plugin. It was certainly a lot of work, but it was worth it.

I would be really happy to see more similar plugins in the future. Unfortunately, my skills as a programmer are not sufficient to create something like this myself.
But I would be happy to test something or translate it into German at any time if needed.

Good luck with the further work on the great VU-Meter plugin.

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10266
Here I go again...

I have set up a test PC and copied over my portable version of MB, changing the paths where necessary. At first VUMeter 2.5.1 wasn't showing in the panel. The panel was completely blank. No context menu on right-click. No nothing. I tried with 2.6 and same thing. Finally realized I had forgotten to change the path to the VUMeter skins. Now when MB launches, the panel is black and before I can right-click it, MB throws an error. It won't let me copy the error message and immediately closes when I click OK. I was able to get the error message from the log. If I remove the plugin .dll, MB starts and works as expected.

Code
MusicBee v3.6.9101.34338P  (Win10.0), 6 Dec 2024 16:32:

System.OverflowException: Value was either too large or too small for an Int32.
   at System.Convert.ToInt32(Double value)
   at MusicBeePlugin.VUMeter.SetPivotOffset()
   at MusicBeePlugin.VUMeter.FillVertexArrays()
   at MusicBeePlugin.VUMeter.Window_SizeChanged(Object sender, SizeChangedEventArgs e)
   at System.Windows.SizeChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.FrameworkElement.OnRenderSizeChanged(SizeChangedInfo sizeInfo)
   at System.Windows.ContextLayoutManager.fireSizeChangedEvents()
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.UIElement.UpdateLayout()
   at System.Windows.Interop.HwndSource.Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Interop.HwndSource.LayoutFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Here I go again...

What folder are the skins located in currently?

Try editing the mbVUMeter.Settings.xml file

Close musicbee and delete the value for lastSkin. You should get an error that it failed to load the skin when starting musicbee but you shouldn't get the exception error.

Before you delete it can you copy it here, just remove your username if it's part of the path.

Also include the value for the skinFolder path if you have set that too.
Last Edit: December 06, 2024, 10:57:35 PM by BoringName

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10266
The VUMeter skins are in D:\MusicBee\Plugins\VU Skins

Here's the .xml file
Code
<?xml version="1.0" encoding="utf-8"?>
<SavedSettingsType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <skinFolder>D:\MusicBee\Plugins\VU Skins</skinFolder>
  <framerateMax>60</framerateMax>
  <lastSkin>M4762</lastSkin>
  <dbOffset>0</dbOffset>
  <hideHeader>true</hideHeader>
  <singleMeter>false</singleMeter>
  <eventMode>false</eventMode>
  <loadDefaults>false</loadDefaults>
  <peakLED>false</peakLED>
  <ignoreGain>false</ignoreGain>
  <customColours />
  <isVertical>false</isVertical>
  <centerY>false</centerY>
  <centerX>true</centerX>
  <curveAdj>0</curveAdj>
  <bgColour>-16777216</bgColour>
  <MobilityPositive>0.045</MobilityPositive>
  <MobilityNegative>0.045</MobilityNegative>
</SavedSettingsType>

Deleted the 'last skin' line and restarted MB. Another error (perhaps it's the same as first reported) and MB closes when OK is clicked in the error window.
Code
MusicBee v3.6.9101.34338P  (Win10.0), 6 Dec 2024 20:14:

System.OverflowException: Value was either too large or too small for an Int32.
   at System.Convert.ToInt32(Double value)
   at MusicBeePlugin.VUMeter.SetPivotOffset()
   at MusicBeePlugin.VUMeter.FillVertexArrays()
   at MusicBeePlugin.VUMeter.Window_SizeChanged(Object sender, SizeChangedEventArgs e)
   at System.Windows.SizeChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.FrameworkElement.OnRenderSizeChanged(SizeChangedInfo sizeInfo)
   at System.Windows.ContextLayoutManager.fireSizeChangedEvents()
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.UIElement.UpdateLayout()
   at System.Windows.Interop.HwndSource.Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Interop.HwndSource.LayoutFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

BoringName

  • Sr. Member
  • ****
  • Posts: 916
The VUMeter skins are in D:\MusicBee\Plugins\VU Skins

I know what causes that error but I've put things in place so it can't happen and every attempt I've made to replicate your problem just results in the "Error loading skin" popup and everything works as normal once you click ok, which is exactly what it should be doing when it can't find a skin.

If you right click d:\musicbee\plugins\mb_VUMeter.dll, select Properties then Details, what File Version is listed there?

Is there a mb_VUMeter.dll file located anywhere else on your system?

edit: Also where was the mbVUMeter.Settings.xml file located that you deleted the "lastSkin" value from?
Last Edit: December 07, 2024, 02:06:53 AM by BoringName

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10266
If you right click d:\musicbee\plugins\mb_VUMeter.dll, select Properties then Details, what File Version is listed there?

Is there a mb_VUMeter.dll file located anywhere else on your system?

edit: Also where was the mbVUMeter.Settings.xml file located that you deleted the "lastSkin" value from?

mb_VUMeter.dll is v2.6.0.0
mbVUMeter.Settings.xml is in D:\MusicBee\AppData\Plugins\VUMeter
There is no other mb_VUMeter.dll in the MB root, nor anywhere else on the D:\ drive.



Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

BoringName

  • Sr. Member
  • ****
  • Posts: 916
mb_VUMeter.dll is v2.6.0.0
mbVUMeter.Settings.xml is in D:\MusicBee\AppData\Plugins\VUMeter
There is no other mb_VUMeter.dll in the MB root, nor anywhere else on the D:\ drive.

It's a mystery....

I did find one issue if the value set for the skinFolder in the XML and also D:\Musicbee\Plugins\VUMeter\VUSkins don't exist. But for me that just resulted in the panel not loading at all.

Create the following folder and see what happens

D:\Musicbee\Plugins\VUMeter\VUSkins

If that doesn't work. Try removing the skinFolder value from the XML file and try again.


BoringName

  • Sr. Member
  • ****
  • Posts: 916
New version - VUMeter2.6.1.zip

Changes -
- Cleaned up initial skin loading to better handle missing folders or skins. If the skinFolder value is populated in the XML but doesn't exist and also none of the default skin folders exist, it will create AppData\Plugin\VUMeter\VUSkins and set that as the skin folder.

There are a few other misc changes that might fix Phred's issue but not 100% on that....

edit: just a refresher on the logic. This is the order it will set the skin folder, if the folder doesn't exist goes to the next one.
skinFolder value set in the XML file.
AppData\Plugins\VUMeter\VUSkins - Persistent storage, this is the default for the installed version of musicbee
Musicbee\Plugins\VUMeter\VUSkins - this is the default for the portable version.

if none of those exist it will create a folder in persistent storage which will typically result in the following
Installed version - C:\Users\<username>\AppData\Roaming\MusicBee\Plugins\VUMeter\VUSkins
Portable version - C:\Musicbee\AppData\Plugins\VUMeter\VUSkins
Last Edit: December 07, 2024, 04:43:43 AM by BoringName

sveakul

  • Hero Member
  • *****
  • Posts: 3262
phred I thought you were all set after your BIOS update!

I believe some of the problem lies with the MB panel element "vu meter" not having been removed from the "active" side first, before you tried the plugin file deletions, etc.

Start MB anyway you can, and be sure that in "Arrange Panels" any "vumeter" element still on the left side has been dragged back over to the "pool" on the right.  THEN, exit MB, and delete any instance of "mbVUMeter.dll", "mbVUMeter.Settings.xml," and the VUMeter skins folder (s) (after backing up the sins!) wherever they exist.

Now, start MusicBee, and install the plugin clean, drag the element from layout to where you want it, and exit MB.  Now, make a skins folder wherever you wanted it, put the skins in it, and edit the xml file to reflect that path.  Start MB.  Success?  BTW for now I would use version 2.6 not 2.6.1 of the plugin just to be sure the new auto-find-skin-folder feature doesn't complicate what you've done.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
the new auto-find-skin-folder feature doesn't complicate what you've done.

It's not really new, the behaviour is the same as it's been for quite a while, the only difference is I'd missed a check to see if the default VUSkins folder actually existed and that was causing problems when it didn't. Now it checks if it exists and creates it if it doesn't (if all the previous attempts to find a skin folder fail).

It wouldn't have been a problem for anyone installing with the "add plugin" button as that creates the necessary folders. It was just an issue when moving things around manually like in Phred's case.