INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Long Filename Crashes -- Windows Bug?  (Read 2572 times)

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Long Filename Crashes -- Windows Bug?
« on: December 06, 2004, 05:02:46 pm »

We've heard a few reports of MC crashing when hitting really long filenames, and we can now reproduce it.  We'll fix it, but here's what we don't get:

Windows has a filename limit of 259 characters.  If you use Explorer, it'll cut you off even a little before that.

However, Windows lets you rename a file's parent folder to a name that, when combined with the filename, exceeds that 259 character limit.  At that point, weird stuff starts happening.  Windows Explorer (and other programs) can't rename, copy, or move the file.  

The file still shows up when you ask the OS for a list of files, and this causes MC grief since it assumes 259 characters is the real limit.

Has anyone heard of this?  Is this a known bug with Windows?

Sample filename from a user: (263 characters)

C:\Documents and Settings\MBenson\My Documents\My Music\MP3.done\Ludwig van Beethoven\The Complete Beethoven Symphonies (Disc Three)\05-Symphony No. 6 in F major, Op. 68, Pastoral, Awakening of cheerful feeling on arriving in the county_ Allegro ma non troppo.mp3
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re:Long Filename Crashes -- Windows Bug?
« Reply #1 on: December 06, 2004, 05:07:08 pm »

Logged
Matt Ashland, JRiver Media Center

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re:Long Filename Crashes -- Windows Bug?
« Reply #2 on: December 06, 2004, 05:29:57 pm »

I have ran into this problem

you can't really do anything with the file name, within windows it tells you the file does not exist

from your link

Quote
MAXIMUM_FILENAME_LENGTH of 256 and MAX_PATH of 260

would that be 516 chrs?

not sure if running any disk utility will correct the problem (like norton disk dr.)

Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re:Long Filename Crashes -- Windows Bug?
« Reply #3 on: December 06, 2004, 05:48:12 pm »

Quote
MAXIMUM_FILENAME_LENGTH of 256 and MAX_PATH of 260

would that be 516 chrs?

From here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_path_field_limits.asp

"The sum of the fields should not exceed _MAX_PATH."

_MAX_PATH is 260.  I guess "should not exceed" is a suggestion... not a rule :P
Logged
Matt Ashland, JRiver Media Center

GHammer

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1930
  • Stereotypes are a real timesaver!
Re:Long Filename Crashes -- Windows Bug?
« Reply #4 on: December 06, 2004, 09:28:11 pm »

Maximum Path Length

In the Windows API, the maximum length for a path is MAX_PATH, which is defined as 260 characters. A path is structured as follows: drive letter, colon, backslash, components separated by backslashes, and a null-terminating character. For example, the maximum path on the D drive is D:\<256 chars>NUL.

The Unicode versions of several functions permit a maximum path length of 32,767 characters, composed of components up to 255 characters in length. To specify such a path, use the "\\?\" prefix. For example, "\\?\D:\<path>". To specify such a UNC path, use the "\\?\UNC\" prefix. For example, "\\?\UNC\<server>\<share>". Note that these prefixes are not used as part of the path itself. They indicate that the path should be passed to the system with minimal modification. An implication of this is that you cannot use forward slashes to represent path separators or a period to represent the current directory. Note also that you cannot use the "\\?\" prefix with a relative path. Therefore, relative paths are limited to MAX_PATH characters.

When using the API to create a directory, the specified path cannot be so long that you could not append an 8.3 file name.

Note that the shell and the file system may have different requirements. It may be possible to create a path with the API that the shell UI cannot handle.
Logged

mrwul

  • Regular Member
  • World Citizen
  • ***
  • Posts: 178
  • nothing more to say...
Re: Long Filename Crashes -- Windows Bug?
« Reply #5 on: March 13, 2005, 10:09:48 am »

Allow me to to bring this old thread up again.

Up front: this has nothing to do with MC as such, but I figure I am not the only one with
this problem.

Obviously it is free for users to define names/paths themselves. The long filenames wudn't be too much of a problem if all music is titled "The Beatles - Help!"
But in classical music - regretfully long filenames are alsmost unavoidable.

e.g.:

G:\Music\Compilations\Tchaikovsky-Argerich-Rachmaninoff Piano Concerto No.3,
Tchaikovsky Piano Concerto No.1-04-Tchaikovsky_PianoConcerto No.1 in B flat
minor, Op.23_1.Allegro non troppo e molto maestoso-Allegro con
spirito-(320kbps).mp3

Where
1) G:\Music\Compilations\=directory name

2) Tchaikovsky = composer of that specific track

3) Argerich = performer

4) Rachmaninoff Piano Concerto No.3, Tchaikovsky Piano Concerto No.1
=CD-title

5) -04- track


6) Tchaikovsky_PianoConcerto No.1 in B flat minor, Op.23_
=work

7) 1.Allegro non troppo e molto maestoso-Allegro con spirito-(320kbps).mp3
=track title.

I agree, this shd be shorter..., but how??


I've come to notice that maybe some 50-75 of my tracks that exceeded max.length were
cut off/mutilated and got unusuable... :-((

Whether MC cut them off or it was done during a xxcopy operation, I don't know.

My question here is - assuming that others are coping with the same problem
do they have tips as to how they categorized their classical music and stay awa
from the max. filelengths.

(Again, I know, this is no MC-matter, I am deeply sorry to ask it here, but frankly speaking
 the classical newsgroup forums only show uploaded binaries and requests, but there is
no real change of ideas/communication there).

tks
brgds
--

Logged

sapnho

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 301
  • Leave a legacy
Re: Long Filename Crashes -- Windows Bug?
« Reply #6 on: March 13, 2005, 10:16:04 am »

I also ran into this problem as most of my music is classical. What I ended up doing is to just have Track-Album as the file name in classics and track-name-album in modern music. There is no point having a "talking" filename anyway. All this information is stored in the tags.

If you can't find a file you can locate it in MC. That solved all my problems with long filenames.
Logged

modelmaker

  • Citizen of the Universe
  • *****
  • Posts: 1531
Re: Long Filename Crashes -- Windows Bug?
« Reply #7 on: March 13, 2005, 05:02:08 pm »

Quote
From wulffra:

(Again, I know, this is no MC-matter, I am deeply sorry to ask it here, but frankly speaking
the classical newsgroup forums only show uploaded binaries and requests, but there is
no real change of ideas/communication there).

This is the right place to ask! This may not be directly related to MC, but it is certainly on topic, part of MC's job is organizing or music and anything that helps us organize our files helps MC manage them.

A while back, I had trouble getting Windows to delete some classical files. I finally lost them when I had to reformat that HD.
Logged
Jay.

"Life is what happens when you're making other plans"     John Lennon.

mrwul

  • Regular Member
  • World Citizen
  • ***
  • Posts: 178
  • nothing more to say...
Re: Long Filename Crashes -- Windows Bug?
« Reply #8 on: March 19, 2005, 09:15:22 am »


Thanks for the feedback - well, I am afraid that there is no real solution for it, when one wishes
to have all kind of details in the filename (so they can be sorted/handled by Explorer).

Hope one day the 256 limit will be set to 1024 or so...  ;)

brgds
--
Logged
Pages: [1]   Go Up