Author Topic: "Unable to Access" Newly Created Filters + Startup Error  (Read 2401 times)

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1269
I keep a few versions of old EXEs so I can revert and see where any potential bugs may have began.

On v3.4.7802 P I have no problems accessing the tab that holds one of my filter sets, as well as creating new ones.
The next version I updated to (v3.4.7819 P) is when I started being unable to access the tab at times. I'm not sure if there are any versions before this one that had that problem. This is the corresponding error message that appears whenever I try to access one already-made filter (how I came to discover the bug.) The most recent version (v3.4.7835 P) also has the same issue.

Code
6/20/2021 7:24:29 AM - 10.0.18363.0 - 3.4.7835.38720P - System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at #=zxdPeeS9uFa8oJzGFQK7gQYcaPZA_.#=zsB044mSUMQY30BuvBw==.#=zthNDZ$qOJP$3()
   at #=zxdPeeS9uFa8oJzGFQK7gQYcaPZA_.#=qrHUpM00QPGY3DQu5BQe0K5SFTDke_ASBMOV6KCxuje8=._Lambda$__0()

For the most recent version, this error appears in the Error Log, but isn't represented on screen.
I don't have any devices connected, though I do have one or two device profiles saved. I haven't it or them used in months, however.

Code
6/20/2021 7:16:47 AM - 10.0.18363.0 - 3.4.7835.38720P - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotSupportedException: FileStream was asked to open a device that was not a file. For support for devices like 'com1:' or 'lpt1:', call CreateFile, then use the FileStream constructors that take an OS handle as an IntPtr.
   at Microsoft.Win32.Win32Native.SafeCreateFile(String lpFileName, Int32 dwDesiredAccess, FileShare dwShareMode, SECURITY_ATTRIBUTES securityAttrs, FileMode dwCreationDisposition, Int32 dwFlagsAndAttributes, IntPtr hTemplateFile)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at MusicBeePlugin.AdvancedSearchAndReplaceCommand.Init()
   at MusicBeePlugin.Plugin.ReceiveNotification(String sourceFileUrl, NotificationType type)
   --- End of inner 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.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at #=zczq8GPDYHliGujFHXg==.#=zZdSYGklgZH8_()

***This doesn't happen on subsequent openings.
Last Edit: June 20, 2021, 01:33:31 PM by The Incredible Boom Boom

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9348
I keep a few versions of old EXEs so I can revert and see where any potential bugs may have began.

On v3.4.7802 P I have no problems accessing the tab that holds one of my filter sets, as well as creating new ones.
The next version I updated to (v3.4.7819 P) is when I started being unable to access the tab at times. I'm not sure if there are any versions before this one that had that problem. This is the corresponding error message that appears whenever I try to access one already-made filter (how I came to discover the bug.) The most recent version (v3.4.7835 P) also has the same issue.

   at MusicBeePlugin.AdvancedSearchAndReplaceCommand.Init()
It looks like the second error is related to a plugin. Specifically the Advance Search and Replace portion of Additional Tagging and Reporting Tools.

I suggest disabling the plugin and restarting MB to see if that (temporarily) fixes it. If it is indeed the issue, boroda (the ATRT developer) hasn't been on the forum in over a year. But I would post something in that plulgin's thread.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34346
for the first error, looking at the code the only way i can it happening is if somehow no sort order is set or alternatively you managed to create and use a custom sort that refers to the Rank field or the custom sort is empty. Both of those things should not be possible when updating custom sorts through the UI

In any case this should work with those scenarios:
https://getmusicbee.com/patches/MusicBee34_Patched.zip
Last Edit: June 21, 2021, 10:16:15 AM by Steven

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1269
for the first error, looking at the code the only way i can it happening is if somehow no sort order is set or alternatively you managed to create and use a custom sort that refers to the Rank field or the custom sort is empty. Both of those things should not be possible when updating custom sorts through the UI

In any case this should work with those scenarios:
https://getmusicbee.com/patches/MusicBee34_Patched.zip

That was it. The patch works and when I viewed the "Sort by" fields, nothing was checked. Don't know how that happened, as that particular tab is one of the ones I use least and was just sorted by Year/Album.
Thanks for the quick fix, though!
Last Edit: June 21, 2021, 01:27:14 PM by The Incredible Boom Boom