Author Topic: Additional Tagging & Reporting Tools  (Read 917185 times)


phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9299
@boroda-

At this point I can't say with 100% certainty, but it appears the last two updates (today and yesterday) to ATRT is causing MB to lock up on my Windows 10 machine.

I've been using MB 3.3.7154 P with no issues since it was released. Today I patched to 3.3.7165 P and MB would launch as normal but within five minutes (often less) it would lock up. Totally unresponsive. Had to kill the process to exit. I had also updated ATRT to today's version, so I rolled that back to yesterday's. MB still locked up. I rolled MB back to 7154 and still got lock ups. I rolled ATRT back to the update issued August 3 2019 and MB hasn't locked up (so far) after 15 minutes of use. So right now, ATRT from Aug 3 seems to be playing nice with MB 3.3.54.

I took a chance and patched MB to 7165 and I haven't had any lock ups for about thirty minutes. So I'm fairly certain there's an issue with the last one or two updates to ATRT.

There is nothing in the error log.

Let me know if there's anything I can do to help you troubleshoot this. Or to disprove it's ATRT.

Also, while I have your attention, could you go back to having version numbers, or dates, as part of the filename for your releases instead of using "latest."? This would/should make it more clear for me (and others) to tell you which version they're using instead of saying, like I did, the version released today. My 'today' is more likely your 'tomorrow'. Or visa versa.

Thanks.
Last Edit: August 15, 2019, 11:33:37 PM by phred
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

boroda

  • Sr. Member
  • ****
  • Posts: 4595
i'll take a look at possible issues. have you any auto library report's presets? all recent changes have been connected to alr.

for plugin versions: open plugin settings, you'll see plugin version at left bottom corner of the settings panel.


phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9299
i'll take a look at possible issues. have you any auto library report's presets? all recent changes have been connected to alr.
No, I don't have any auto-library report presets.

Quote
for plugin versions: open plugin settings, you'll see plugin version at left bottom corner of the settings panel.
Ahhh --- good to know. Thanks for pointing that out.

@phred, try this version:
http://www.mediafire.com/file/h2t08o9562efboi/mb_TagTools_latest.zip/file
So far, so good. MB has been running with the updated version for about 15 minutes. I'll report back if there's a lock up later in the day, but as of right now, it looks like you squashed it.

Thanks for the quick work.
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

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9299
It took a while, but MB is locking up again. This time it happened when I started playing a CD. After a number of times of killing the process followed by a relaunch and immediate freeze, I restored ATTR 5.1.7154, which was the version I was using successfully until today's update (5.2.7167.)

Relaunching MB and the CD, all is working well. At this point I can say utmost certainty, that something changed after 5.1.7154 that is causing this issue.

I'm content to keep running this slightly older version. Let me know if there's something I can do on my side as you try to find this pesky little bugger.
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


Nixander

  • Jr. Member
  • **
  • Posts: 102
//Edit: okay I solved it myself. I deactivated autobackup and restarted the computer. I guess the baseline file was being used by the autobackup. :)




Hey Boroda,
I just deleted 4000 genre-tags by accident. Luckily I made a tag backup before. But When I click on "open", after selcting the backup, nothing happens... Does it work in the background and needs a lot of time?

After a long wait I just got this error:


Quote
MusicBee v3.3.7016.32512 (Win10.0), 8 Sep 2019 22:42:

System.IO.IOException: Der Prozess kann nicht auf die Datei "D:\Dokumente\Backups\Musicbee Tag Backup\MusicBee - Baseline.bbl" zugreifen, da sie von einem anderen Prozess verwendet wird.
   bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   bei 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)
   bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   bei MusicBeePlugin.BackupType.Load(String fileName, String backupFileExtension)
   bei MusicBeePlugin.BackupType.save(String fileName)
   bei MusicBeePlugin.BackupIndex.saveBackup(String backupName, String statusbarText, Boolean isAutocreatedParam)
   bei MusicBeePlugin.Plugin.regularAutobackup(Object state)
   bei System.Threading.TimerQueueTimer.CallCallbackInContext(Object state)
   bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.TimerQueueTimer.CallCallback()
   bei System.Threading.TimerQueueTimer.Fire()
   bei System.Threading.TimerQueue.FireNextTimers()
   bei System.Threading.TimerQueue.AppDomainTimerCallback(Int32 id)
Last Edit: September 09, 2019, 08:25:56 AM by Nixander

The Freezing Chicken

  • Newbie
  • *
  • Posts: 4
Hi Boroda. First of all, what a wonderful plugin. Very useful.

Anyway, I tried to use the $Random function and I noticed that it generates a lot of duplicate numbers, so I took the liberty to look at your source code and found how you implemented that.
Your code looks like this
Code
public string CustomFunc_Random(string max_number)
{
    return (new Random()).Next(int.Parse(max_number) - 1).ToString("D" + (int)Math.Log10(float.Parse(max_number) + 0.5));
}

The problem with this is that a Random instance probably works by generating a seed from the current system tick counts or something like that, so if you do a "new Random()" you end up restarting the sequence until the tick count changes.

What I suggest is to store the Random instance in a static field and calling Next on it, like this
Code
static readonly Random randomGen = new Random();



public string CustomFunc_Random(string max_number)
{
     return randomGen.Next(int.Parse(max_number) - 1).ToString("D" + (int)Math.Log10(float.Parse(max_number) + 0.5));
}
This way the seed gets generated only once and the sequence behaves randomly.

Also I'm not sure why you do "-1" on the max number, because that makes the generator generate numbers between 0 and max_number-1, so if I put "10" in the function it goes from 0 to 8. Not sure that's what you want but maybe there's a reason I don't know.

Johan_A_M

  • Jr. Member
  • **
  • Posts: 117
Thanks for a fantastic plugin @boroda! I was looking for a preset that would move featured artist from artist to title but couldn't find one. Is this possible to create via the preset editor?
Cheers!

Johan_A_M

  • Jr. Member
  • **
  • Posts: 117
I'm probably blind, but how would I easily copy just a part of a tag to another tag? For example, in the <album> "Hôtel Costes, volume 8", I'd like to copy volume 8, or at least 8, to another tag.
Thanks in advance!

boroda

  • Sr. Member
  • ****
  • Posts: 4595
Hi Boroda. First of all, what a wonderful plugin. Very useful.

Anyway, I tried to use the $Random function and I noticed that it generates a lot of duplicate numbers, so I took the liberty to look at your source code and found how you implemented that.
Your code looks like this
Code
public string CustomFunc_Random(string max_number)
{
    return (new Random()).Next(int.Parse(max_number) - 1).ToString("D" + (int)Math.Log10(float.Parse(max_number) + 0.5));
}

The problem with this is that a Random instance probably works by generating a seed from the current system tick counts or something like that, so if you do a "new Random()" you end up restarting the sequence until the tick count changes.

What I suggest is to store the Random instance in a static field and calling Next on it, like this
Code
static readonly Random randomGen = new Random();



public string CustomFunc_Random(string max_number)
{
     return randomGen.Next(int.Parse(max_number) - 1).ToString("D" + (int)Math.Log10(float.Parse(max_number) + 0.5));
}
This way the seed gets generated only once and the sequence behaves randomly.

Also I'm not sure why you do "-1" on the max number, because that makes the generator generate numbers between 0 and max_number-1, so if I put "10" in the function it goes from 0 to 8. Not sure that's what you want but maybe there's a reason I don't know.

you are quite right and i will rewrite random function.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
I'm probably blind, but how would I easily copy just a part of a tag to another tag? For example, in the <album> "Hôtel Costes, volume 8", I'd like to copy volume 8, or at least 8, to another tag.
Thanks in advance!
create own preset, search for:

Code
^(.*?),\s*(.*)$|^.*$

replace with:

$2

in step 1.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
new implementation is

Code
        public string CustomFunc_Random(string max_number)
        {
            return RandomGenerator.Next(int.Parse(max_number) + 1).ToString("D" + (int)Math.Round(Math.Log10(float.Parse(max_number) + 1)) + 0.5);
        }



http://www.mediafire.com/file/h2t08o9562efboi/mb_TagTools_latest.zip/file
Last Edit: September 20, 2019, 10:26:20 AM by boroda

boroda

  • Sr. Member
  • ****
  • Posts: 4595
//Edit: okay I solved it myself. I deactivated autobackup and restarted the computer. I guess the baseline file was being used by the autobackup. :)




Hey Boroda,
I just deleted 4000 genre-tags by accident. Luckily I made a tag backup before. But When I click on "open", after selcting the backup, nothing happens... Does it work in the background and needs a lot of time?

After a long wait I just got this error:
...


i've overlooked this situation. this must be fixed now. download link is the same.