PDA

View Full Version : Crash when exceeding Windows' allowed max. path length


Eto
03-23-2006, 05:25 PM
Musicconverter.exe crashed when I converted a specific file from mp3 to ogg. It converted many other files without problems, but here and there there would be one file it wouldn't convert: musicconverter.exe would crash. But then I saw the full path to the file. It was:

D:\music\Classical\Composers\Shostakovich, Dimitri (1906-1975)\Shostakovich - Symphony no.7 'Leningrad', op.60 (Russian Philharmonic Orchestra - Dmitri Yablonksy) [256]\02 Symphony No. 7 in C major, Op. 60, 'Leningrad' - II Moderato - (Poco allegretto).mp3

I know.. a tad long. But I like to keep my stuff organised! Maybe it wasn't even the originating path that was the problem.. the destination was exactly the same, but was 'D:\OGG\music\etc'. So it had 'OGG' in front of it. I only just noticed that this way I would actually exceed the maximum pathlength allowed by Windows XP itself.. manually adding characters is impossible at some point. So probably that's what caused the crash.

No check seems to be made by musicconverter.exe for max. pathlength for the destination file, causing a crash when it exceeds windows' limits. A popup would be nice, or even disallowing the option in the file browser to 'keep the path', to prevent this.

Shortening the path solved my problem, the file converted just fine.

-edit- despite this slight problem, I am considering registering, it's a wonderful program!

LtData
03-23-2006, 11:22 PM
That's only 104 characters for the output file including your longer path and spaces. The max allowed filename was 255 characters I thought.

Edit: Err, never mind.

Eto
03-24-2006, 04:13 AM
erhm, no it's not. It's 253 characters before the extension exactly as shown above, that is without the \ogg addition... I had checked the 'keep path' option, so it's:
D:\ogg\music\Classical\Composers\Shostakovich, Dimitri (1906-1975)\Shostakovich - Symphony no.7 'Leningrad', op.60 (Russian Philharmonic Orchestra - Dmitri Yablonksy) [256]\02 Symphony No. 7 in C major, Op. 60, 'Leningrad' - II Moderato - (Poco allegretto).mp3

LtData
03-24-2006, 09:19 AM
Ahh, I didn't realize that you meant the "\etc" to be the rest of the path you already had.

Spoon
03-24-2006, 02:54 PM
Will be fixed in R12 (upto 32,000 characters).

Eto
03-30-2006, 06:14 AM
lol, now that length I can live with... Thank you!!

Spoon
03-30-2006, 02:30 PM
Funnily enough Windows Explorer stops working with such long paths (even though it is valid for an NTFS drive)...

Eto
03-31-2006, 06:16 AM
mm, yeah, I noticed too. So maybe supporting 32000 characters isn't the best way, and preventing it is better? People like me can be tempted to create longer filenames than they can use in windows after which you can no longer edit them in Explorer. Maybe a 64 bit windows version does support longer filenames? Would be fun to try. (and support?)

One more thing I noticed: these long pathnames can be a b*tch when backing up your data to dvd, I had to use the ISO960:1999 option with Nero - which *does* allow pathnames longer than 255 characters. Though I wonder what happens when you try to copy backed-up folder into an existing folder on your harddisk. Would windows allow that? Interesting stuff.