Author Topic: 3DBee (Cover Flow) Plugin  (Read 53778 times)

kimt1688

  • Jr. Member
  • **
  • Posts: 115
Apart from this, when you are making minor edits to a playlist that is currently playing, such as changing the rating or modifying the number of times it has been played, the cover art for the currently playing track may be displayed as a blank image.
This doesn't affect the playback, so I don't mind.
No image current Album4

When I unchecked “Move Flow on selection”, the phenomenon of the cover art disappearing during playback seemed to stop, even if I set the rate.

BoringName

  • Sr. Member
  • ****
  • Posts: 962
I haven't forgotten about this, I've just been a bit sidetracked with the UPnP plugin. I'll probably take a look next week.

cereal_eater

  • Jr. Member
  • **
  • Posts: 24
Hello BoringName,

thank you for your plugin, but today I get the following error message:

Code
MusicBee v3.6.9202.37404D (Win10.0), Mar 28, 2025, 10:26 PM:

System.Reflection.TargetInvocationException: An invocation target threw an exception. ---> System.ArgumentOutOfRangeException: The index was out of range. It cannot be negative and must be less than the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at MusicBeePlugin._3DBee.LoadAlbumTexture(Int32 index)
at MusicBeePlugin._3DBee.ViewAlbums(Int32 index, Boolean reflect)
at MusicBeePlugin._3DBee.DrawAlbums(Boolean reflect)
at MusicBeePlugin._3DBee.OpenGLControl_OpenGLDraw(Object sender, OpenGLRoutedEventArgs args)
--- End of internal exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.RoutedEventArgs.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 SharpGL.WPF.OpenGLControl.DoRender()
at MusicBeePlugin._3DBee.RenderEventProcessor(Object myObject, EventArgs myEventArgs)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

This post reports the same error.

BoringName

  • Sr. Member
  • ****
  • Posts: 962
Hello BoringName,

thank you for your plugin, but today I get the following error message:

Did this occur during normal playback or after you did something like editing/deleting a track?

I have a slightly (just slightly) better idea of what I'm doing now than when I originally wrote this thing so there is probably a few improvements I can make to the code.

I expect I'll probably be dealing with the UPnP stuff for another week and then I'll focus on this.

cereal_eater

  • Jr. Member
  • **
  • Posts: 24
Did this occur during normal playback or after you did something like editing/deleting a track?

I used the plugin before, but disbaled it in the Panels Configuration and I certainly edited/deleted some tracks.

I reproduced the error by starting musicbee enabling the plugin in Configure Layout -> Arrange Panels... Then I resized the panel and double clicked on a album cover. Playback starts. Then I switched to an other tab. When returning to the coverflow tab it was blank and the error message appeared. Playback continues. After restarting musicbee, the slides reappear, but after switching to an other tab, it is gone again and the error message appears again.

I expect I'll probably be dealing with the UPnP stuff for another week and then I'll focus on this.

Thanks! Take your time!

BoringName

  • Sr. Member
  • ****
  • Posts: 962
I used the plugin before, but disbaled it in the Panels Configuration and I certainly edited/deleted some tracks.

Are you using the latest version?

but after switching to an other tab, it is gone again and the error message appears again.

That's an odd one, switching nodes shouldn't cause any issues.

cereal_eater

  • Jr. Member
  • **
  • Posts: 24
Yes, I did a fresh install, but the problem persists.

BoringName

  • Sr. Member
  • ****
  • Posts: 962
New version - 3DBee_2.6.1

Changes
- Updated framework Net target to 4.8
- Updated the SharpGL library to use a new render method that substantially reduces CPU usage, particularly for large libraries.

I haven't made any fixes for the errors some users have reported. I'll get there eventually....

I haven't done a lot of testing with the updated SharpGL library but it does seem a lot smoother to me.

If you also use VUMeter, you should update that as well. I have just released a new version of that which targets 4.8 also. There also some info in the VUMeter thread if you get a blank panel after updating.

edit: If you have any SharpGL*.dll files in Musicbee's plugin folder, you should remove these when you update to this version. Older versions packaged these files separately but they are all included in the single mb_3Dbee.dll now and leaving the SharpGL DLL's in there might cause conflicts.
Last Edit: July 06, 2025, 01:11:28 AM by BoringName

kimt1688

  • Jr. Member
  • **
  • Posts: 115
I've only tried it once, so I can't say for sure.
In the previous version, when I performed edits that involved deleting playlists, switching the cover art to be displayed one after another, and then moving tracks between playlists, changing the playlist to be played, and changing the cover art to be displayed, MusicBee crashed with an OutOfMemory Error.
In the new version, the switches are now handled properly, and the program continues to run smoothly afterward.
Since the garbage collection has changed, could this be due to changes in memory handling?
I'm not entirely sure, but it's been a huge help for me.

Addendum
I will write down the editing tasks I always perform.
There are four albums, and all of them have different cover art. Each album contains six tracks.
Leave one track from each of the four albums and delete the rest from the playlist.
Copy the remaining tracks to another playlist and confirm that they have been copied.
Delete the four tracks (copied tracks) from the first playlist.
Select a completely different playlist and start playback.
Last Edit: July 07, 2025, 10:52:40 PM by kimt1688

BoringName

  • Sr. Member
  • ****
  • Posts: 962
Since the garbage collection has changed, could this be due to changes in memory handling?

After updating both of my plugins that use the SharpGL library, it's pretty clear the old version had some major performance issues under certain environments. I don't know what it is about larger libraries in Musicbee that trigger the issue but there must be something that causes the library to use excessive resources. Steven couldn't see anything and I don't have enough experience to figure it out. I haven't gone through the SharpGL patch fully to see what they changed but I have a feeling it wouldn't help me figure it out anyway. All I can go on is the comments of the user that created the pull request which stated the new method isn't reliant on Garbage Collection. So I assume it has something to do with that but I don't really know.

I expect it's just a quirk of how it's all embedded. Currently it's a WPF control, nested in an Element Host control, nested in a Musicbee panel control. The first time I fired it up I was in complete disbelief it actually worked.