I've been mostly keeping silent with
big new feature requests, for the obvious reasons, but I think this needs to be looked at sooner rather than later.
MC has trouble when you try to Import crazy broken files (or crazy broken permissions on those files), or run Auto Import on directories that contain these kinds of files. I've seen this. We've all seen reports of this over and over on the forums (or
things that look like this anyway). I don't think I need to defend this assertion very much.
First off, it would be really nice if MC could somehow handle these error conditions better. I know, I know... How crazy can it be expected to be? I don't know, can't the import be more thoroughly isolated from the main process so that if it dies, MC can detect the death and recover?
In any case, that is almost certainly much more of a long-term solution kind of thing, unless one of you see something brilliantly simple that was previously missed. I assume not.
But, in the meantime, could we get some kind of tool or reporting to use to find and destroy these bad files? When I've seen it, personally, they were almost always zero-byte files (or those incredibly disproportionate to their expected sizes). They're obviously broken, once you find them in the morass. But, how to do it? If you don't see it in the logs? If you didn't just import a handful of new files, so you can quickly narrow it down? If it is one of 3000, or 30000, or 100000? Often, I find, that MC dies before it successfully logs the
actual bad file, and you're left trying to trace what it was doing through multiple threads, and then find things "nearby" in the filesystem (which has mixed results).
How can we solve this?
Better import logging would be a start. Maybe as it grabs new blocks of files, it can log the directory it is looking at first, or something to narrow it down? Of course,
always logging the filename (and and ensuring this info gets committed to disk, even in the event of a crash in the very next code block),
before any "dangerous" operation would be better. I'm sure you
try to do this, but I'm also quite sure the strategy doesn't always work.
But even that only helps if you only have one, or two, or a group, of corrupt files. The nightmare scenario is that you are trying to recover data from some partially failed volume, which might be strewn with bad files. Three hundred needles in a 60,000 file library haystack, distributed randomly. What do you do?
The advice I've often seen, and even followed once or twice in times long-since passed, is to import methodically, and narrow down the bad files. But this only works well if you have mostly a "known good" library, and you can narrow down the possible offenders to a relatively small group of "possible new offenders". I can't really recommend it with a straight face to a complete newcomer who just wants the thing to work, and it keeps crashing when trying to do the first thing you do with the program: import the files. VLC and mpc-hc might crash when you throw the same kinds of issues at them, but they don't prevent you from effectively using them to view other content. MC does, so I feel like MC needs to provide a solution.
Can this be automated somehow? Could MC have some kind of The Hunt for the Bad Files import mode? Where it isn't actually trying to do full imports on the files, but is doing more of a "passes the smell test" look at the files, without actually importing them? Maybe you could build a small, stripped down version of the import logic, thrown into another process entirely (and not trying to actually import usable data, just pass/fail the files), and then show them in a non-imported Drives & Devices view, with possible bad ones flagged, sorted, and color coded or something?
I'm throwing out ideas... I guess I'm saying that I think it is a real problem, and one that has been ongoing, and can we come up with some mechanism to help people with this unpleasant (and unfortunately a bit more common than we'd like) reality.