Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: CUETools: Illegal Characters in path "C:\\1.cue" ? (Read 6112 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

CUETools: Illegal Characters in path "C:\\1.cue" ?

Hi I have run into a exception trying to encode the tracks from an particular EAC, namely "Illegal Characters in path".
I had a theory that just maybe it was converting path names to utf16 or something, But I just can't find the problem so I'm hoping I can get some support here.

The Error.


When I delete the highlighted text the C# Interpreter? seems to crash, trying to write a log on it's way out.


Many thanks in advance.

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #1
Could you please post the contents of the .cue file?
CUETools 2.1.6

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #2
Could you please post the contents of the .cue file?


Code: [Select]
REM GENRE Game
REM DATE 2011
REM DISCID 22037A04
REM COMMENT "ExactAudioCopy v0.99pb5"
PERFORMER "Stygian Riverside"
TITLE "Sadistic Scarlet Sister<BR>+"
FILE "Sadistic Scarlet Sister BR +.tta" WAVE
  TRACK 01 AUDIO
    TITLE "S3 Intro"
    PERFORMER "MAX BEAT"
    FLAGS DCP
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Sadistic Scarlet Sister<BR>"
    PERFORMER "??"
    FLAGS DCP
    INDEX 01 01:08:00
  TRACK 03 AUDIO
    TITLE "Reflections"
    PERFORMER "PEATH2"
    FLAGS DCP
    INDEX 01 06:10:02
  TRACK 04 AUDIO
    TITLE "Reflections(DEMO)"
    PERFORMER "MAX BEAT"
    FLAGS DCP
    INDEX 01 10:32:02

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #3
TITLE "Sadistic Scarlet Sister<BR>"

< and > characters are illegal for file and folder names.

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #4
It shouldn't be illegal in this context, it's a single file with TITLE being the tag.
I think this exception is related to CUETools' file searching feature. I am usually transcoding into a NTFS formatted RAM disk, and putting the .cue and audio files directly to root leads to a similar error message complaining about not being able to access the System Volume Information folder (you shouldn't be touching this anyway). If I'm right, it needs a more graceful way of handling "access denied" responses.

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #5
What you said makes me think it's to do with C# Routines.
For example if I edit the album title I get an access denied to C:\Windows\CSC I can't imagine why CUETools or Windows would be trying to use this feature at that point (I disabled Offline Files and continue to get the error).

But I don't know my programming knowledge is minimal and the Cue Sheet seems pretty standard, It loads in Foobar2k fine.

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #6
Quote from: lvqcl link=msg=0 date=
TITLE "Sadistic Scarlet Sister<BR>"

< and > characters are illegal for file and folder names.


Quote from: [b]ChronoSphere[/b] link=msg=0 date=
It shouldn't be illegal in this context, it's a single file with TITLE being the tag. I think this exception is related to CUETools' file searching feature.


Quote from: [b]2legs[/b] link=msg=0 date=
For example if I edit the album title I get an access denied to C:\Windows\CSC


By lvqcl's post, CUETools uses value from TITLE 'slot' for to build the PATH info it needs for something ? ... when there are reserved characters/names in the TITLE name or you have given TITLE a value which does not exist as a path, you sure get some sort of an error.

Supposeingly Foobar2k does not build PATH info the way as CUETools does so that's why no errors there.


CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #7
I don't think it's the .cue's fault, for example take this cue:
Code: [Select]
REM GENRE Anime
REM DATE 2014
PERFORMER "ELISA"
TITLE "ミレナリオ"
FILE "ミレナリオ.wav" WAVE
  TRACK 01 AUDIO
    TITLE "ミレナリオ"
PERFORMER "ELISA"
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Sign -約束の鐘-"
PERFORMER "ELISA"
    INDEX 01 04:56:72
  TRACK 03 AUDIO
    TITLE "Rain Cage"
PERFORMER "ELISA"
    INDEX 01 09:16:48
  TRACK 04 AUDIO
    TITLE "ミレナリオ (TV Size)"
PERFORMER "ELISA"
    INDEX 01 13:27:39


Putting it directly in my RAM disk and attempting to encode results in
Code: [Select]
R:\ミレナリオ.cue: Access to the path 'R:\System Volume Information' is denied..


Putting it into R:\temp encodes fine. There are also no illegal characters in the .cue at all. Maybe it's a different bug to yours though.

edit: yeah it is. Just replaced the album name in my cue with yours and it complains about invalid path (I have %album% in my output formatting). There is a "force ANSI names" option in CUETools, but that could also get rid off the Japanese characters depending on your locale. IMHO, CUETools should filter out illegal path characters automatically, just like foobar does. There aren't that many of them: \ / : * ? < > | (according to windows)

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #8
...
Putting it directly in my RAM disk and attempting to encode results in
Code: [Select]
R:\?????.cue: Access to the path 'R:\System Volume Information' is denied..
  Putting it into R:\temp encodes fine.
...


Does the RAM disk software you are using have its own FS (file system) and/or does its FS support all available character sets your OS does?

FYI: System Volume Information
Quote
In the root of every drive is a folder called "System Volume Information".  If your drive is NTFS, the permissions on the folder are set so not even administrators can get in there.

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #9
Code: [Select]
C:¥1.cue
C:¥2.cue
are definitely not valid paths.
It's only audiophile if it's inconvenient.

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #10
Thanks to all the input I found some things out.

The < & > were the cause of the "Access Denied" shown in the first screenshot (Even thought I'm using a manual filename of "2.cue" for the output), However it still results in a exception when editing the TITLE tags that included the invalid characters (like in the second screenshot).

What Juha said in the post before
Quote
By lvqcl's post, CUETools uses value from TITLE 'slot' for to build the PATH info it needs for something ?
sounds like what is happening.

My reasoning, Something I didn't originally see is in using the template
Code: [Select]
[%directoryname%\]%filename%.cue
the output filename gets an extra backslash like
Quote
C:\\1.cue
(Of course removing the extra backslash doesn't result in anything new) But the fact that it 's adding another "\" means it's adding a directory to the output path right?

Well anyway, I guess it is with how CUETools builds it's output path (in this case at least), because if I work in a directory like C:\1\1.cue it bypass the errors (or atleast the phantom directory bug, I used & in the tags apposed to < & >).

I think CUETools can actually handle illegal characters in tags, It will already replace some characters with a underscore when they are in a filename (with force ANSI filenames off), For example I can remove the < & > let it analyze the CUE Sheet than in the tag dialog I can re-add < & > and the filename will result in _BR_ in this case.

The phantom directory appears whenever working from the root (I don't know if it's well know not to work from there with CUETools, but I didn't find anything about this).

The exception related to the invalid characters occurs when the program initially analyzes the CUE Sheet and has a invalid character in a tag, but CUETools has no problem handling output filenames with invalid characters.

Thanks again, Hope this helps the developer and anyone work around the problem.

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #11
Code: [Select]
C:¥1.cue
C:¥2.cue
are definitely not valid paths.
The Japanese fonts provided with Windows display "\" using the same glyph as "¥". Those are valid paths.

The other issues 2legs is having may be in some way related to using a Japanese-localized version of Windows, especially if no one else is able to reproduce them.

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #12
Does the RAM disk software you are using have its own FS (file system) and/or does its FS support all available character sets your OS does?
I wouldn't know how to tell. I can choose FAT32 and NTFS when creating a new RAMdisk.

Quote
FYI: System Volume Information
Quote
In the root of every drive is a folder called "System Volume Information".  If your drive is NTFS, the permissions on the folder are set so not even administrators can get in there.

I am aware of that, hence why I said CUE Tools shouldn't even be touching that folder in my first post

I think CUETools can actually handle illegal characters in tags, It will already replace some characters with a underscore when they are in a filename (with force ANSI filenames off), For example I can remove the < & > let it analyze the CUE Sheet than in the tag dialog I can re-add < & > and the filename will result in _BR_ in this case.
Interesting. Sounds like it's only handled when you modify tags, but not if the tags already contain invalid character names.

Quote
The phantom directory appears whenever working from the root (I don't know if it's well know not to work from there with CUETools, but I didn't find anything about this).
The double backslash shouldn't result in a phantom directory, it should be autocorrected to a single backslash. At least that's how the rest of the programs work. The only context where \\ is valid is accessing a server (\\servername), but not in case of C:\\1.cue.

The other issues 2legs is having may be in some way related to using a Japanese-localized version of Windows, especially if no one else is able to reproduce them.
Anyone can modify a valid cuesheet to have a < or a > in it's TITLE to test it actually. I don't think it's a Japanese locale related issue, as it's a half-width form of the character that is used here. Half-width <,> are part of any locale, while full-width (?,?) are part of CJK locales and Unicode.

Also, all NT6.x are fully unicode capable, meaning there is no such things as "Japanese" or "English" windows, the locales are only used as a fallback when a program doesn't support unicode. For example, my "Japanese" windows is actually a MSDNAA US version of win 8.1 which I switched to Japanese via control panel -> region -> administrative tab.

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #13
Also, all NT6.x are fully unicode capable, meaning there is no such things as "Japanese" or "English" windows, the locales are only used as a fallback when a program doesn't support unicode.
CueTools may be using that fallback in order to parse the cue file. The text editor in the screenshot shows "??" rendered as "•]", which is what I see when I encode that text using the Japanese non-Unicode encoding, then parse it using another locale's non-Unicode encoding.

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #14
Also, all NT6.x are fully unicode capable, meaning there is no such things as "Japanese" or "English" windows, the locales are only used as a fallback when a program doesn't support unicode.
CueTools may be using that fallback in order to parse the cue file. The text editor in the screenshot shows "??" rendered as "•]", which is what I see when I encode that text using the Japanese non-Unicode encoding, then parse it using another locale's non-Unicode encoding.


The "•]" was because of the Font used, I changed the color scheme in Notepad++ to emphasize the highlighted portion.
I am using the Japanese codepage just for clarification.

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #15
The CUE is probably not saved as utf-8 (with or without BOM). Npp always opens ANSI with the current system codepage, but allows to change the encoding via the menu. Whether or not CUETools is using that fallback to parse the cue is irrelevant in this case, as those brackets are part of every locale and the only reason why it leads to the error is because the NTFS specification does not allow those characters in path.

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #16
Code: [Select]
C:¥1.cue
C:¥2.cue
are definitely not valid paths.

Under Japanese locale + Japanese fonts, path separators are rendered in yen sign like that (Historically, ASCII 0x5c is mapped to yen sign in Shift_JIS).

CUETools: Illegal Characters in path "C:\\1.cue" ?

Reply #17
The CUE is probably not saved as utf-8 (with or without BOM). Npp always opens ANSI with the current system codepage, but allows to change the encoding via the menu. Whether or not CUETools is using that fallback to parse the cue is irrelevant in this case, as those brackets are part of every locale and the only reason why it leads to the error is because the NTFS specification does not allow those characters in path.


Yes, But as I mentioned before CUETools (at least the part that writes files to disk) has no problem writing filenames with illegal character's (Replacing them with underscores) so whether or not illegal character's within TAGS are used in filenames shouldn't actually matter.

I will take a stab and guess that what is actually throwing the exception is probably the library used to parse the CUE Sheet, anyway I'm sure the developer knows the cause.

Also the post where I defined the phantom directory problem should've been written like this
Quote
The phantom directory appears whenever working from the root with a template using %directoryname%


 
SimplePortal 1.0.0 RC1 © 2008-2021