[Fatal Error] Invalid file creating error (ADS problem)

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
songinnight
Junior Member
Junior Member
Posts: 3
Joined: 2009-01-06, 11:55 UTC
Contact:

[Fatal Error] Invalid file creating error (ADS problem)

Post by *songinnight »

At first, I like TC very much awesome
it's for 5 years using tc.
But now I encountered critical problem.

:shock:

I'm using Windows vista 64 sp1.
cpu:Q9550, ram:4GB, Asus P35 mainboard, hdd:WD640GBx2(raid0)
(I tested with TC 7.02a, TC 7.04a)

(caution : DO NOT RUN BELOW!!! IT CAN CAUSE CRITICAL FILE ERROR)



1. put cursor to "[..] <DIR>"

2. press Shift + F4 (this function is creating file with notepad)

3. "Enter file name to edit:" window pops up.

4. type in "(anything) :(anything)"
ex) crysis :warhead.txt

5. then notepad crashes and Immortal File create - "crysis ". You cannot delete, copy, edit the file. also cannot delete the upper folder.


I think this is very critical bug.

If you know solution about this please help me.


(*)-----------
Probably I think only in vista-64bit the error occurs.


(*)-----------
It happens in Win XP SP3 (32bit) too.
"(space):" causes wrong file.


(*)-----------
Ahh.. it is not TC's bug. it is windows problem. if excute notepad like below
Start > Run > "notepad c:\asdf :11" and save
then, ADS file "asdf " would be created.
(Thanks karlchen for good advices)

Then how can I delete these files. plz help me.


(*)-----------
here's good site about ADS (Alternate Data Stream).

http://www.bleepingcomputer.com/tutorials/tutorial25.html

I used ADSSPY but I cannot delete ADS files which named like this "asdf(space):1234"
What's problem~~~ I'm almost crazy.
Image: http://pds13.egloos.com/pds/200901/06/10/d0001810_49636f4db4bf5.gif
Image: http://pds12.egloos.com/pds/200901/09/10/d0001810_4966bf84a06bc.gif
Last edited by songinnight on 2009-01-09, 03:08 UTC, edited 20 times in total.
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hi, songinnight.

The filename crysis : warhead.txt actually means this: a file named crysis (trailing space) having an ADS (alternate data stream) named warhead.txt (leading and trailing spaces).
As a lot of Windows programmes cannot handle ADS this may be the source of the problem.
Notepad actually just understand this: Create a file named "crysis ", without the double quotes, but including the trailing space character. (*) This trailing space is what causes trouble with most file operations.

By the way, I could not quite reproduce the described behaviour using:
+ Windows XP Pro SP2 (32bit)
+ TotalCommand 7.04a
+ with a fresh INI file (/I=.\fresh.ini), i.e. using default settings

Notepad does not crash here. Instead it creates the file "crysis ". (Note the trailing space character.)
Indeed T.C. pretends that the file does not exist if you press F3 (Lister) on it e.g.
Yet, T.C. 7.04 a can delete it without any hassle here.
Indeed deleting it is the only operation which T.C. 7.04a performs on this file at all.

Kind regards,
Karl
--
(*)
I can tell that T.C. passes the complete name crysis : warhead.txt to the editor. Because when I use my default editor for this operation instead of Notepad, it will complain that it cannot save a backupfile of crysis : warhead.txt which it wants to name crysis : warhead.txt.$$$.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6498
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: [Fatal Error] Invalid file creating error :o

Post by *Horst.Epp »

songinnight wrote:At first, I like TC very much awesome
it's for 5 years using tc.
But now I encountered critical problem.
...
I think this is very critical bug.

If you know solution about this please help me.
I don't know why that should be a very critical problem ?
No one normallly uses file names like that.
songinnight
Junior Member
Junior Member
Posts: 3
Joined: 2009-01-06, 11:55 UTC
Contact:

Post by *songinnight »

I don't know why that should be a very critical problem ?
No one normallly uses file names like that.
Because, tc is application which control's many important files and directories.
the most important is stability I think.

If you create txt file(Shift+F4) in TC using copy/paste or by misstake and unfortunately there is " :", the file would be immortal.
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [Fatal Error] Invalid file creating error :o

Post by *white »

songinnight wrote: 5. then notepad crashes and Immortal File create - "crysis ". You cannot delete, copy, edit the file. also cannot delete the upper folder.
Have you tried explorer to delete the file or upper folder?
Did you try inplace renaming with Total Commander?
Is the file locked by any change? (Did you reboot?)
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3864
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Notepad actually just understand this: Create a file named "crysis "
Isn't it TC who creates the file and starts the editor after this with the acc. file?

In this case TC has to strip leading and trailing spaces at least, before creating the file. (as TC already does if you copy a file)

May this scenarios are given:
1. Due to the (accidentally) used ADS notation a file "crysis" with ADS text "warhead.txt" is created.
Next the editor is launched with filename "crisis"

2. reject a filename containing ":" at Shift-F4 usage (to inhibit accidentally ADS usage notation)
#5767 Personal license
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hi, sqa_wizard.

Of course you are right, T.C. itself creates the file "crysis : warhead.txt ". And it seems it really creates a file named "crysis " having the empty ADS " warhead.txt ". (Double quotes are only used to make the space characters visible.)

And it passes the complete name "crysis : warhead.txt " to Notepad as a commandline argument.
Sysinternals Process Explorer wrote:Command line:
notepad.exe "crysis : warhead.txt "
I was wrong about Notepad in my previous post: :oops:
Notepad does write any text I type to "crysis : warhead.txt ", i.e. to the ADS.
type "crysis : warhead.txt "
The text is inside the ADS.
(This is the text which I typed inside Notepad.)

I agree it would be really helpful if T.C. made sure:
+ no (unwanted?) ADS are created
+ no invalid filenames are created (those which it cannot handle ifself later on)

The trouble is really caused by the trailing space character in "crysis ". Create "crysis:warhead.txt" instead using Shift+F4 inside T.C., no problems at all.

Kind regards,
Karl
songinnight
Junior Member
Junior Member
Posts: 3
Joined: 2009-01-06, 11:55 UTC
Contact:

Re: [Fatal Error] Invalid file creating error :o

Post by *songinnight »

white wrote: Have you tried explorer to delete the file or upper folder?
Did you try inplace renaming with Total Commander?
Is the file locked by any change? (Did you reboot?)
Of Course. I did everything.
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hi, songinnight.
Probably I think only in vista-64bit the error occurs.
The only 64bit Windows where I can test is Windows 2003 Std SP2 64bit. This is not equivalent to Vista 64bit. So the results may not be meaningful for Vista 64bit. :( But I will give it a try ...
"(space):" causes wrong file.
Confirmed, the trouble is caused by the trailing space in the main filename "crysis ".
Ahh.. it is not TC's bug. it is windows problem.
Thanks to sqa_wizard's explanation I found out that my first post was incorrect. It is T.C.'s fault. T.C. creates the file "crysis : warhead.txt ".
On Windows systems where Notepad does not crash, it will write everything which you type to the ADS " warhead.txt ". You can verify it does by opening cmd.exe in the folder where "crysis : warhead.txt " lives and run the command type "crysis : warhead.txt ".
Then how can I delete these files.
On the Windows systems where I have tested so far (all 32bit), T.C. 7.04a could delete the file "crysis : warhead.txt ": select "crysis ", press DEL, confirm.
The other way which works is by using the short filename (often referred to as DOS name).
Open a cmd.exe window in the folder where "crysis : warhead.txt " lives. Type "dir /x crys*.*". This will show the short filename for "crysis ", too.
type del crysis~1 inside the T.C. commandline. (In case the short name is crysis~2, use that name. In case it is crysis~3, use that name, etc.)

HTH,
Karl
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC 7.04a can delete the file if you have not disabled alternate DOS names. It uses the DOS name to delete it then.
Author of Total Commander
https://www.ghisler.com
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Confirmed. And I said so in my previous (overly verbose) post:
On the Windows systems where I have tested so far (all 32bit), T.C. 7.04a could delete the file "crysis : warhead.txt ": select "crysis ", press DEL, confirm.
:wink: Karl
Post Reply