This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#5939 - Long pathname (>255 chars) crashes
Attached to Project:
Rockbox
Opened by Richard Neill (RichardNeill) - Tuesday, 05 September 2006, 01:10 GMT+2
Last edited by Nicolas Pennequin (nicolas_p) - Wednesday, 04 July 2007, 16:41 GMT+2
Opened by Richard Neill (RichardNeill) - Tuesday, 05 September 2006, 01:10 GMT+2
Last edited by Nicolas Pennequin (nicolas_p) - Wednesday, 04 July 2007, 16:41 GMT+2
|
DetailsRockbox version 2006-08-30:
Machine ipod nano (4 GB): I tend to use excessively long filenames on my main computer - up to the 255 char maximum for ResierFS if appropriate. I copied this file onto the iPod nano: Vaughan_Williams_-_A_Sea_Symphony_-_01_-_I_A_Song_for_All_Seas_All_Ships_Behold_the_sea_itself_-_Today_a_rude_brief_recitative_-_Flaunt_out_O_sea_your_separate_flags_of_nations_-_Token_of_all_brave_captains_-_A_pennant_universal.ogg - Trying to select it (from the file browser) causes the nano to instantly crash, with coloured video "static" on the screen. - Trying to select it from the playlist causes it to simply be skipped. Other files with shorter names are fine. Renaming the file to: Vaughan_Williams_-_A_Sea_Symphony_-_01_-_I_A_Song_for_All_Seas_All_Ships.ogg fixed the problem, so it's definitely the filename which caused it. [I double checked - the file md5sum was correct] I didn't do any tests to find the exact buffer size which is critical. However: 139 chars = OK; 233 chars = crash. I hope that info is useful. P.S. Rockbox is great. Thank you so much - oggs on an ipod at last! |
This task depends upon
Closed by Nicolas Pennequin (nicolas_p)
Wednesday, 04 July 2007, 16:41 GMT+2
Reason for closing: Fixed
Additional comments about closing: Reopen if necessary
Wednesday, 04 July 2007, 16:41 GMT+2
Reason for closing: Fixed
Additional comments about closing: Reopen if necessary
/Music/Classical/Vaughan_Williams/Symphonies/A_Sea_Symphony/Vaughan_Williams_-_A_Sea_Symphony_-_01_-_I_A_Song_for_All_Seas_All_Ships_Behold_the_sea_itself_-_Today_a_rude_brief_recitative_-_Flaunt_out_O_sea_your_separate_flags_of_nations_-_Token_of_all_brave_captains_-_A_pennant_universal.ogg
Yes - that's rather long, but ReiserFS (on my desktop) allows 255 chars for each element of the path. When the nano is mounted, the desktop kernel has no trouble with the filename.
[For info, my music is filed thus:
GENRE/COMPOSER/CATEGORY/ALBUM/Composer_-_ALBUM_-_TRACKNUM_-_MOVEMENTNUMBER_MOVEMENT_NAME_-_SUBTITLES.ogg
where Album is not necessarily the name of the CD, but the most sane way to refer to the individual work concerned. For classical music, filing by artist is rather unhelpful!]
This is with current CVS build, dircache enabled, and all settings default (except I increased the dir buffer size and turned off all voice features) in case that might matter.
Filenames longer than 260 characters will not work (firmware/include/file.h:#define MAX_PATH 260). Is this a case of Linux allowing filenames out of spec, or is Rockbox not following it? Either way, it probably shouldn't result in a crash.
And Dircache disabled, not enabled.
"The total path length of a long name cannot exceed 260 characters, including the trailing NUL." (long filenames itself are limited to 255 characters)
While Rockbox shouldn't crash on such filenames it is clearly out of specs.
FS#5736?I can however absolutely positively confirm that Linux is not following the FAT spec.
Edit: Strike that. The filename and path given by submitter still causes Rockbox to break (not crash), so Rockbox is probably not checking that the path fits in the buffer or something like that.
Some examples that cause problems:
echo "Music/Caravan/1971 - In the Land of Grey and Pink/05 - Nine Feet Underground Nigel Blows a Tune Love's a Friend Make It 76 Dance of the Seven Paper Hankies Hold Grandad by the Nose Honest I Did! Disassociation 100% Proof.mp3" | wc -c
225
echo "Music/Red Sparowes/2006 - Every Red Heart Shines Toward the Red Sun/01 - The Great Leap Forward Poured Down Upon Us One Day Like a Mighty Storm, Suddenly and Furiously Blinding Our Senses..flac" | wc -c
194
and several others.