Debug MM frozen when adding files to library [#14055]

To get bugs in the current release fixed, please report them here.

Moderator: Gurus

Debug MM frozen when adding files to library [#14055]

Postby AnthonyM1229 » Fri Feb 24, 2017 10:37 am

Hello. I've been testing 1829, offered to me as a debug build after I reported an OS validation bug (which is now fixed).

This being my first debug build I've used, I don't know if the behavior I'm about to describe is typical for debug builds, or unique to this one. I'm guessing it'll be the former.

Before I went to bed, I set MM to add 1,148 OGG files to my library via drag and drop from a Windows Explorer window. Estimating that would take maybe an hour or so, and since I had another unrelated operation in a different program to go on overnight, I figured MM would do its thing overnight, and when I got back on my computer in the morning, the files will have finished adding to the library.

Here's some background before I continue. I used to use the File Monitor to watch my current working folders, until I got frustrated by it often missing 1-10 songs or more, out of expected additions of 500+ songs. Although sometimes, I've had issues with far fewer additions. My folder structure is "<music source>/yyyy/mm" (where "yyyy" is year digits and "mm" is month digits), which typically leads to 1,000+ (sometimes several thousand files) in each of those monthly folders. Because I deal with such a large volume of music, and I'm hypersensitive to things being correct, I have a Windows file indexer program with an on-demand setting to check the number of music files I have on my HDD, and a PowerShell script that runs automatically as part of a command line batch I run after I finish tagging (using an external tagging program) a set of music to be migrated to my library. That script too counts the number of music files I have.

When my MediaMonkey library total and program and script numbers don't agree, though, I would get highly irritated, as that'd mean I'd have to manually re-scan the affected folder, which would mean re-scanning hundreds or thousands of files already in my library, just to get the stubborn few that didn't get added correctly. I hated that "Add/Rescan Tracks to the Library" seems only folder-based, and doesn't permit selecting individual files. That itself is an issue I would love to see addressed, perhaps in MM5?

Anyway, sometimes the File Monitor would have to take 30 minutes to an hour or even occasionally longer, only to miss a few files. That's another issue, the fact that it would often miss one or a few files. And then rescanning the affected folder via Add/Rescan Tracks to the Library would usually take even longer, because it'd have to rescan the existing tracks too, but usually, all was correct by the end.

A few months ago, however, I discovered that it's possible to add files to the library by dragging and dropping them onto the Entire Library node from Windows Explorer. Yes! That's turned out to be a big help for me, as that lets me add exactly the files I want to add, and I've not seen MM missing any of them after I verify the library total at the end. However, adding files this way makes the whole MediaMonkey window unresponsive until it's done adding the files. I estimate that it processes about 30-35 files a minute on my HDD (which seems slow--"Add/Rescan Tracks to the Library" can do ~60 a minute, or ~100 when it's scanning already added files), so, 1,000+ files would definitely take time.

When I got back to my computer this morning, I saw that MediaMonkey had stopped overnight with an error reporting window claiming it was frozen! Ugh! I guess that happened since I was running a debug build. Having never seen that window before, I examined its details, playing around with the tabs, but then I wanted to go back to where I could input my contact info, and I either couldn't, or didn't do it correctly, because the error report all of a sudden sent itself. Great.

But then I saw in my process manager, MediaMonkey ramping up CPU and I/O usage once again, as if it were working normally. Hmm... So, I let it do its thing a little while, thinking it may have still been adding my files from last night. Then 5 minutes later, I got the error window again, claiming MM is frozen! Aha! So it looks like there's a debug routine that fires every 5 minutes. That's good and all, but it interferes with long-running drag-and-drop library adding operations.


After having to dismiss that window at least five times (while typing up this message too), my 1,148 OGG files finally finished adding successfully.

Okay, here's a TL;DR:

  • It would be awesome if Add/Rescan Tracks to the Library could let us choose individual files to add to the library, instead of just folders. Maybe something to consider for MM5?
  • File Monitor, my previous method of adding files to the library, would often miss 1-10 files (and sometimes more) after I've migrated a few hundred, or sometimes over a thousand files to the folder being watched.
  • File Monitor is also only about half as fast at indexing as Add/Rescan Tracks to the Library in my experience. Is there any way to speed that up? Maybe for MM5? (I haven't tried MM5 yet, but would like to much later on.)
  • Dragging and dropping via Windows Explorer, the exact files I want added onto the Entire Library node, works properly, but is also only about half as fast as Add/Rescan Tracks to the Library.
  • Dragging and dropping files in this way makes MediaMonkey totally unresponsive until the files finish adding. Is there any way to keep the window responsive?
  • As a result of the above item, dragging and dropping files in this way while running a debug build results in MM thinking it's frozen every 5 minutes, when it isn't. I actually don't know if this is a "bug" per se, but it definitely seems like sub-optimal behavior. Then again, this could be me just having pushed a debug build beyond a typical usage pattern? I don't know. I don't even know if 1829 has been formally released yet as a regular build. Doesn't look like it, judging from the homepage download links.
AnthonyM1229
 
Posts: 40
Joined: Fri Oct 14, 2011 2:59 pm

Re: Debug MM thinks it's frozen when adding files to library

Postby Peke » Sat Feb 25, 2017 9:11 pm

Hi,
May I suggest One thing. Install latest debug version as PORTABLE (1830) to c:\MMWTemp and start scan.

In case of any errors just disable send over internet and press OK. After you scan is finished, close MMW and Send us c:\MMWTemp\mediamonkey.elf in new ticket.

That will give us exact point where MMW crash and report non responsive.
Best regards,
Pavle
MM Core Developer and Admin of free MediaMonkey extensions Hosting
Image
Image
Peke
 
Posts: 10498
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia

Re: Debug MM thinks it's frozen when adding files to library

Postby AnthonyM1229 » Sat Feb 25, 2017 11:18 pm

I guess I could install the debug 1830 build just before I'm ready to add some more files to my library, and then capture a debug log to try to figure out what goes on behind the scenes during the process. I'll also look for that mediamonkey.elf file. Could be a day or two or longer before my next batch of music is ready, though.

I hope I explained my concerns well enough, however? There wasn't any crash. I don't think I've ever had a crash following any method of adding files to my library. MM simply becomes unresponsive while it's adding files to my library, when I do that by drag and drop from Windows Explorer to the Entire Library MM node. This happens too on regular builds. However, I got tripped up by the debug build warning me every 5 minutes that it thinks it's frozen.
AnthonyM1229
 
Posts: 40
Joined: Fri Oct 14, 2011 2:59 pm

Re: Debug MM thinks it's frozen when adding files to library

Postby rusty » Mon Feb 27, 2017 11:38 am

Hi Anthony,

I tested drag and drop of tracks to the Library node (rather than using add/scan) and there didn't seem to be a problem in my environment, so a debug log would definitely be helpful to show the source of the delay.

As to failure of the File Monitor: are your tracks stored locally or to a network location?

-Rusty
rusty
 
Posts: 7076
Joined: Tue Apr 29, 2003 3:39 am
Location: Montreal, Canada

Re: Debug MM thinks it's frozen when adding files to library

Postby AnthonyM1229 » Tue Feb 28, 2017 12:23 pm

My tracks are all stored locally.

I gathered a debug log the other night, to see if I can figure out what goes on behind the scenes when I add files to my library via drag and drop. I'll try to get around to submitting that in a new ticket sometime today.

When you tested drag and drop, were you still able to play music or otherwise interact with the MediaMonkey window? I can't do anything in that process. The main window hangs with my mouse cursor stuck in the spinning busy state until all the tracks I dropped are added. Taking a cursory look at the debug log I generated, though, there is lots of DB activity in the background, as I would expect. But nothing stood out to me as a reason for why the main window hangs. Maybe support will have an idea, though.

Later on, I'll see if I can gather a debug log for my File Monitor issue as well. It might be a few to several days before I get around to that, however.
AnthonyM1229
 
Posts: 40
Joined: Fri Oct 14, 2011 2:59 pm

Re: Debug MM thinks it's frozen when adding files to library

Postby Lowlander » Tue Feb 28, 2017 12:31 pm

Have you ran File > Maintain Library with complete optimization recently? It can help as freezing often indicates DB slowness.
Lowlander (MediaMonkey user since 2003)
Lowlander
 
Posts: 43497
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Debug MM thinks it's frozen when adding files to library

Postby AnthonyM1229 » Tue Feb 28, 2017 1:05 pm

Yes. I try to run that at least once a month or so. Last time I did it was about a week ago. It doesn't make any difference with the freezing issue.

My DB is huge, though...Could that matter? I have well over 200k tracks.
AnthonyM1229
 
Posts: 40
Joined: Fri Oct 14, 2011 2:59 pm

Re: Debug MM thinks it's frozen when adding files to library

Postby Lowlander » Tue Feb 28, 2017 1:44 pm

But what is the size of the database file? A larger DB will slow things down as more data needs to be processed.

Defragmenting the database file on a non-SSD drive may also offer performance improvements.
Lowlander (MediaMonkey user since 2003)
Lowlander
 
Posts: 43497
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Debug MM thinks it's frozen when adding files to library

Postby AnthonyM1229 » Tue Feb 28, 2017 4:27 pm

My database is 325 MB. I defragment my HDD regularly, the last time having been in the past week. It doesn't have any effect on the freezing issue either.
AnthonyM1229
 
Posts: 40
Joined: Fri Oct 14, 2011 2:59 pm

Re: Debug MM thinks it's frozen when adding files to library

Postby Lowlander » Tue Feb 28, 2017 4:38 pm

I often add files via D&D and don't experience this. A debug log (step 4b) attached to a Support Ticket may show why you see this: viewtopic.php?f=7&t=69
Lowlander (MediaMonkey user since 2003)
Lowlander
 
Posts: 43497
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Debug MM thinks it's frozen when adding files to library

Postby AnthonyM1229 » Tue Feb 28, 2017 6:38 pm

That's interesting. So, are you able to listen to music and/or interact with the MediaMonkey window when in the process of adding files via D&D? It seems like you are, but I just wanted to confirm, before I write up a ticket for this and submit my debug log.
AnthonyM1229
 
Posts: 40
Joined: Fri Oct 14, 2011 2:59 pm

Re: Debug MM thinks it's frozen when adding files to library

Postby Lowlander » Tue Feb 28, 2017 7:14 pm

Yes.
Lowlander (MediaMonkey user since 2003)
Lowlander
 
Posts: 43497
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Debug MM thinks it's frozen when adding files to library

Postby AnthonyM1229 » Wed Mar 01, 2017 5:15 pm

Thank you.

I finally got around to submitting a ticket for this issue. I'm actually not sure if tickets are publicly accessible or tied to just the user who submitted them, but if you're interested, my ticket is at http://www.mediamonkey.com/support/inde ... -724-76221.
AnthonyM1229
 
Posts: 40
Joined: Fri Oct 14, 2011 2:59 pm

Re: Debug MM thinks it's frozen when adding files to library

Postby Lowlander » Wed Mar 01, 2017 5:17 pm

No, tickets are private.
Lowlander (MediaMonkey user since 2003)
Lowlander
 
Posts: 43497
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Debug MM thinks it's frozen when adding files to library

Postby Peke » Wed Mar 01, 2017 10:30 pm

Best regards,
Pavle
MM Core Developer and Admin of free MediaMonkey extensions Hosting
Image
Image
Peke
 
Posts: 10498
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia


Return to Bug Reports (mmw)

Who is online

Users browsing this forum: No registered users and 5 guests