Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

IF ISAPP failure

May
572
4
Using TCC 10.00.41 Windows XP [Version 5.1.2600] SP3

TCC fails on an IFF ISAPP test. The process just disappears.
This happens whether TCC is run in a TC tab or independently.

I had first noticed this when build 30 wacs available, but disabled the
offending command file from running by test for %_4ver being greater than 9.9.

Now I've gotten around to trying to isolate it.

In version 9 and earlier, this worked.

I've checked my syntax, and I'm reasonably sure I'm not using unsupported
syntax nor unsupported features.

Here's an excerpt of the log file with a TCC 10.00.40 failure:

[01-25-09 17:06:33][316] taskwatch1.bat
[01-25-09 17:06:33][316] echo off
[01-25-09 17:06:33][316] if "%1" eq "min" .and. 0%_tctab eq 0 window min
[01-25-09 17:06:33][316] if "%_par_pgm" eq "svchost" window min
[01-25-09 17:06:33][316] echo Running C:\work\taskwatch1.bat at 01-25-2009 17:06:33 EST
[01-25-09 17:06:33][316] if %@index["%_wintitle",\svchost.exe] gt 0 echo Running as a system service.
[01-25-09 17:06:33][316] if not defined tclib set tclib=c:\tc32
[01-25-09 17:06:33][316] set activewindow=TC 10 - TCC Prompt
[01-25-09 17:06:33][316] iff defined activewindow then
[01-25-09 17:06:33][316] if %@words[%activewindow] gt 3 set activewindow=%@word[0-2,%activewindow] *
[01-25-09 17:06:33][316] set activewindow=TC 10 - *
[01-25-09 17:06:33][316] set activepos=22,119,703,1110
[01-25-09 17:06:33][316] set left=119
[01-25-09 17:06:33][316] set top=22
[01-25-09 17:06:33][316] set bottom=703
[01-25-09 17:06:33][316] set right=1110
[01-25-09 17:06:33][316] set activepos=119,22,991,681
[01-25-09 17:06:33][316] set procexp="C:\Program Files\sysinternals\procexp.exe"
[01-25-09 17:06:33][316] iff exist %procexp then
[01-25-09 17:06:33][316] iff isapp %procexp then
Here's an excerpt of the log file with a TCC 9.02.154, showing the same command sequence working:

[01-25-09 17:17:36][1916] taskwatch1.bat
[01-25-09 17:17:36][1916] echo off
[01-25-09 17:17:36][1916] if "%1" eq "min" .and. 0%_tctab eq 0 window min
[01-25-09 17:17:36][1916] if "%_par_pgm" eq "svchost" window min
[01-25-09 17:17:36][1916] echo Running C:\work\taskwatch1.bat at 01-25-2009 17:17:36 EST
[01-25-09 17:17:36][1916] if %@index["%_wintitle",\svchost.exe] gt 0 echo Running as a system service.
[01-25-09 17:17:36][1916] if not defined tclib set tclib=c:\tc32
[01-25-09 17:17:36][1916] set activewindow=TC 9 - TCC
[01-25-09 17:17:36][1916] iff defined activewindow then
[01-25-09 17:17:36][1916] if %@words[%activewindow] gt 3 set activewindow=%@word[0-2,%activewindow] *
[01-25-09 17:17:36][1916] set activewindow=TC 9 - *
[01-25-09 17:17:36][1916] set activepos=0,216,718,1124
[01-25-09 17:17:36][1916] set left=216
[01-25-09 17:17:36][1916] set top=0
[01-25-09 17:17:36][1916] set bottom=718
[01-25-09 17:17:36][1916] set right=1124
[01-25-09 17:17:36][1916] set activepos=216,0,908,718
[01-25-09 17:17:36][1916] set procexp="C:\Program Files\sysinternals\procexp.exe"
[01-25-09 17:17:36][1916] iff exist %procexp then
[01-25-09 17:17:36][1916] iff isapp %procexp then
[01-25-09 17:17:36][1916] iff not iswindow "Process Explorer - Sys*" then
[01-25-09 17:17:36][1916] activate "Process Explorer - Sys*" hide 2> nul
[01-25-09 17:17:36][1916] activate "Process Explorer - Sys*" /pos=854,0,427,730 2> nul
(3 lines beyond the command that had failed in v 10)

And here is the beginning of the TASKWATCH1.BAT down to the ENDIFF corresponding to the
failing IFF:

Code:
@echo off
rem File C:\WORK\taskwatch1.bat, 25-Jan-2009 17:06 EST
if "%1" eq "min" .and. 0%_tctab eq 0 window min
if "%_par_pgm" eq "svchost" window min
echo Running %_batchname at %date% %_time %tzn
rem echo.

if %@index["%_wintitle",\svchost.exe] gt 0 echo Running as a system service.

rem if 0%_4ver gt 9.9 quit

if not defined tclib set tclib=c:\tc32
rem if %@index["%_wintitle",%@name[%_batchname]] eq -1 quit

:: PROCEXP

set activewindow=%_winfgwindow
iff defined activewindow then
  if %@words[%activewindow] gt 3 set activewindow=%@word[0-2,%activewindow] *
  set activepos=%@winpos[%activewindow]
  set left=%@word[1,%activepos]
  set top=%@word[0,%activepos]
  set bottom=%@word[2,%activepos]
  set right=%@word[3,%activepos]
  set activepos=%left,%top,%@eval[%right - %left],%@eval[%bottom - %top]
 endiff

set procexp="%ProgramFiles%\sysinternals\procexp.exe"
iff exist %procexp then
  iff isapp %procexp then
    iff not iswindow "Process Explorer - Sys*" then
      start "Process Explorer" %procexp -t
      delay 1
     else
      activate "Process Explorer - Sys*" hide 2> nul
     endiff
   else
    start "Process Explorer" %procexp -t
   endiff
 endiff
 
dcantor wrote:

> Using TCC 10.00.41 Windows XP [Version 5.1.2600] SP3
>
> TCC fails on an IFF ISAPP test. The process just disappears.
> This happens whether TCC is run in a TC tab or independently.

Not reproducible here either with your batch file or running IFF ISAPP
by itself. (Do you have the same problem running IF ISAPP at the
command line?)

Try running your file in the batch debugger to see exactly where it's
failing.

Rex Conn
JP Software
 
Not reproducible here either with your batch file or running IFF ISAPP
by itself. (Do you have the same problem running IF ISAPP at the
command line?)

Try running your file in the batch debugger to see exactly where it's
failing.

Oops. I should have told you. It seems to work correctly at the interactive command prompt.

I will try with the debugger. That will be a new experience for me; I've never used it before, but it's a reasonable request.

==> Added information <==

I used the debugger and the command file ran normally; no error anywhere.
 
I modified things so that the apparently offending code runs in the original TCC tab when TC is started.

The program again stopped at the IFF ISAPP line, but this time, I got a Windows error window:

Error signature
AppName: tcc.exe AppVer: 10.0.0.41 ModName: takecmd.dll
ModVer: 10.0.0.41 Offset: 0008c6a7
To view technical information about the error report, click here.


I clicked there. It gave me a lengthy error report in a window. The first part looks like this:

Module l
tcc.exe
Image Base: 0x00400000 Image Size: 0x00000000
Checksum: 0x0001971a Time Stamp: 0x497c8f5a
Version Information
Signature: feef04bd
StrucVer: 00010000
FileVer: (10.0:0.41)
ProdVer: (10.0:0.41)
F1agMask: 0000003f
F1ags: 00000002
OS: 00000004
FileType: 00000001
SubType: 00000000
FileDate: 00000000:00000000

and it continues to what looks like a dump of an entire file, or perhaps memory. It also wrote a temporary file with lots of information. I've preserved the file. Rex, should I forward you that file?
 
I modified things so that the apparently offending code runs in the original TCC tab when TC is started.

The program again stopped at the IFF ISAPP line, but this time, I got a Windows error window:

Did you try running it in the debugger? (I'm not convinced that the problem is the IFF ISAPP; it may be the following line that causes your problem.)
 
Did you try running it in the debugger? (I'm not convinced that the problem is the IFF ISAPP; it may be the following line that causes your problem.)

Yes, I tried the debugger. (I thought I mentioned that before.)

In the debugger, the command file works perfectly. (Of course, the value of the name of the current window is different when it's run in the debugger, but I don't think that should matter.)

I checked the variables at each step, and they were right.

Yet, running it without the debugger results in the process just going away unless it's the first tab opened in a new TC session. In that case, the Windows error I described earlier results, and after it's dismissed, TC is still there without any tabs.
 
... it may be the following line that causes your problem.)

After I wrote the previous note, I decided to test your conjecture that it might be the following command. I added echo statements into both branches of the IF ISAPP block and also into both branches of the included IF ISWINDOW block. Here's the revised code:

Code:
set procexp="%ProgramFiles%\sysinternals\procexp.exe"
iff exist %procexp then
  iff isapp %procexp then
    echo "Process Explorer is running somewhere."
    iff not iswindow "Process Explorer - Sys*" then
      echo "There is no Process Explorer window."
      start "Process Explorer" %procexp -t
      delay 1
     else
      echo "There is a Process Explorer window."
      activate "Process Explorer - Sys*" hide 2> nul
     endiff
   else
    echo "Process Explorer is not running."
    start "Process Explorer" %procexp -t
   endiff
 endiff

Upon running it, nothing was echoed, and the last line in the logfile was again the IF ISAPP statement.
 
I changed your "set procexp" to my own copy, and running this as a .btm
gave:
"Process Explorer is running somewhere."
"There is a Process Explorer window."

Both when %procexp contained a folder with a space, and not.


On Mon, Jan 26, 2009 at 4:17 PM, dcantor <> wrote:


> ---Quote (Originally by rconn)---
> ... it may be the following line that causes your problem.)
> ---End Quote---
> After I wrote the previous note, I decided to test your conjecture that it
> might be the following command. I added echo statements into both branches
> of the IF ISAPP block and also into both branches of the included IF
> ISWINDOW block. Here's the revised code:
>
>
> Code:
> ---------
> set procexp="%ProgramFiles%\sysinternals\procexp.exe"
> iff exist %procexp then
> iff isapp %procexp then
> echo "Process Explorer is running somewhere."
> iff not iswindow "Process Explorer - Sys*" then
> echo "There is no Process Explorer window."
> start "Process Explorer" %procexp -t
> delay 1
> else
> echo "There is a Process Explorer window."
> activate "Process Explorer - Sys*" hide 2> nul
> endiff
> else
> echo "Process Explorer is not running."
> start "Process Explorer" %procexp -t
> endiff
> endiff
> ---------
> Upon running it, nothing was echoed, and the last line in the logfile was
> again the IF ISAPP statement.
>
>
>
>
>



--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 
dcantor wrote:

> ---Quote (Originally by rconn)---
> ... it may be the following line that causes your problem.)
> ---End Quote---
> After I wrote the previous note, I decided to test your conjecture that it might be the following command. I added echo statements into both branches of the IF ISAPP block and also into both branches of the included IF ISWINDOW block. Here's the revised code:

Still unable to reproduce any problem with IFF ISAPP (and the crash
address you provided isn't in IFF or anything called by IFF).

Any chance you can reduce the problem to a smaller reproducible failcase?

Rex Conn
JP Software
 
dcantor wrote:

Still unable to reproduce any problem with IFF ISAPP (and the crash
address you provided isn't in IFF or anything called by IFF).

Any chance you can reduce the problem to a smaller reproducible failcase?

Rex Conn
JP Software

I'm certainly willing to try. If you know that the crash address wasn't in IFF, perhaps you know what it was in. Knowing that might give me a clue as to what to try.

Thanks for working on it. I'm sure I can find another way to accomplish what I'm doing there, but I suspect you'd like to conquer the bug as much as (or maybe more than) I'd like it.
 
dcantor wrote:

> ---Quote (Originally by rconn)---
> dcantor wrote:
>
> Still unable to reproduce any problem with IFF ISAPP (and the crash
> address you provided isn't in IFF or anything called by IFF).
>
> Any chance you can reduce the problem to a smaller reproducible failcase?
>
> Rex Conn
> JP Software
> ---End Quote---
> I'm certainly willing to try. If you know that the crash address wasn't in IFF, perhaps you know what it was in. Knowing that might give me a clue as to what to try.

It was in a VC++ runtime library routine (wcsicmp) that is called
several hundred times from all over TCC.

Rex Conn
JP Software
 

Similar threads

Back
Top