pdir crashes horribly in one specific folder

#1
Ok, this really has me stumped. I have a folder with some visio stensils. When I dir into the folder, all files are properly displayed. Same as when i pdir into the same folder. But when I try to use any field in pdir, all hell breaks loose:
  • When on the same PC, TCC crashes with a GPF
  • When viewing the same folder from a network share, sometimes there's a GPF, other times various junk appears in the command output.

I'm using TCC 10.00.67, and I've also tried it with TCC/LE 10.00.67.
I'm running Windows Vista 64-bit SP1 (and I also tried it on Windows Server 2008 64-bit SP1)

The relevant TCMD.gpf contains the following:

Code:
TCC  10,00,67
Module=C:\Program Files (x86)\JPSoft\TCMD10\TakeCmd.dll
Address=100573CE
Exception=C0000005
EAX=00200070  EBX=051345E8  ECX=00000027  EDX=00000001
ESI=576A13A8  EDI=051345E0  EBP=00D87554  ESP=00D830FC
CS=00000023  DS=0000002B  ES=0000002B  SS=0000002B
Flags=00010202

Stack:
1 : TakeCmd.dll 0001:000563ce
I can try whatever test you need to find out what exactly is happening here... I can also post a zip file with the folder contents - it seems that only the specific files cause this trouble. I would include more output, but this post would get very big, very fast!

Still, I'm attaching some test cases (BTW, some of the icons in the "manage attachments" page are broken; namely "bat", "btm", "cmd" and "gpf" - all the relevant gifs come up as 404s).

pdir-full.txt is the result of pdir * in that folder.

More weirdness:

If I redirect the pdir output into some file, it seems it works. When I executed pdir /(fpn) > C:\2\pdir-z.txt, this completed successfully. When I did pdir /(fpn), the following GPF was generated:
Code:
TCC  10,00,67
Module=C:\Program Files (x86)\JPSoft\TCMD10\TakeCmd.dll
Address=10057A8F
Exception=C0000005
EAX=4CBB2008  EBX=00017DB0  ECX=053B0208  EDX=05A00270
ESI=00017DB0  EDI=00001F10  EBP=053B0208  ESP=00D7AF28
CS=00000023  DS=0000002B  ES=0000002B  SS=0000002B
Flags=00010202

Stack:
1 : TakeCmd.dll 0001:00056a8f
I'm at a loss here, I can reproduce the bug consistently, but I cannot isolate any variables to help!
 

Attachments

#2
I'd like to add that this whole thing is part of a batch file that I'm using to index all my hard disks. Perhaps the problem starts from some memory leak or something, so I'm also posting the batch file here:
Code:
@echo off
setlocal
chcp 1253
set output=%@quote[%AppData%\TerraSoft\AllDrives-%_isodate.txt]
echo Catalog for %_date %_time > %output
for %hd in (%_hdrives) do gosub dirall %hd
izip -9mj %@replace[txt,zip,%output] %output
endlocal
quit

:dirall %drive
if %drive==%systemdrive return
echo Cataloging Drive %drive%...
setdos /x-8
pdir /(dy-m-d zc fpn) %drive\ /a:-d /s /[!$Recycle.bin] >> %output
setdos /x0
return
 

rconn

Administrator
Staff member
May 14, 2008
10,434
95
#3
gschizas wrote:

> Ok, this really has me stumped. I have a folder with some visio stensils. When I *dir* into the folder, all files are properly displayed. Same as when i *pdir* into the same folder. But when I try to use any field in *pdir*, all hell breaks loose:
> * When on the same PC, TCC crashes with a GPF
> * When viewing the same folder from a network share, sometimes there's a GPF, other times various junk appears in the command output.
I can't reproduce that here. The crash address is in the memory
allocator, though I doubt it's a problem with the allocator itself --
more likely a munged pointer.

Please email me (directly, not through the forum) a zip file with the
contents of the folder.

Rex Conn
JP Software
 

rconn

Administrator
Staff member
May 14, 2008
10,434
95
#4
gschizas wrote:

> Ok, this really has me stumped. I have a folder with some visio stensils. When I *dir* into the folder, all files are properly displayed. Same as when i *pdir* into the same folder. But when I try to use any field in *pdir*, all hell breaks loose:
> * When on the same PC, TCC crashes with a GPF
> * When viewing the same folder from a network share, sometimes there's a GPF, other times various junk appears in the command output.
>
>
> I'm using TCC 10.00.67, and I've also tried it with TCC/LE 10.00.67.
> I'm running Windows Vista 64-bit SP1 (and I also tried it on Windows Server 2008 64-bit SP1)
I downloaded your zip file and created a new directory with your files.
I then ran "*pdir /(fpn)*" 1,000 times on that directory and it never
failed.

Have you got anything else running that might be intercepting disk i/o,
or injecting a dll into TCC's process?

Rex Conn
JP Software
 
#5
gschizas wrote:

I downloaded your zip file and created a new directory with your files.
I then ran "*pdir /(fpn)*" 1,000 times on that directory and it never
failed.

Have you got anything else running that might be intercepting disk i/o,
or injecting a dll into TCC's process?

Rex Conn
JP Software
I've opened Process Explorer and, apart from standard Windows Components, there doesn't seem to be anything there.

I'm attaching the list of DLLs loaded (as reported by Process Explorer)

Also, to find out what is the problem with copying (as I have e-mailed you), I'm going to make a new virtual PC and install 64-bit vista and check out if I can reproduce the copying as well as the pdir problem in it.
 

Attachments

#6
Also, to find out what is the problem with copying (as I have e-mailed you), I'm going to make a new virtual PC and install 64-bit vista and check out if I can reproduce the copying as well as the pdir problem in it.
Test results: I can't reproduce it either. So I'll have to find out which component is messing up my I/O...