TCSH problem (was ...)

May 20, 2008
11,391
99
Syracuse, NY, USA
I reported a problem with TCSH:

But if I issue "d:/tcmd9/tcc.exe" (TCC starts in the console), when I
exit TCC, TCSH "encounters a problem" (message box appears) and TCMD gives the message

free(0x7fbdad88) bad block. (memtop = 0x7fc10800 membot = 0x7fbb0000)

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
I have tracked this down to the "UpdateTitle" directive.

The problem occurs with "UpdateTitle = No" and does not occur with "UpdateTitle = Yes".

Recall that the problem occurs when TCSH executes its precmd alias (title "$cwd") after the started 4NT process exits.

A wild guess is that something happens to the state of kernel32.dll (closing a handle that shouldn't be closed?).

I appreciate your point, Rex, that 4NT shouldn't even be able to influence what happens after it exits. I suppose TCSH's author might say something similar. Nevertheless there's a rather peculiar dependency on 4NT and the UpdateTitle directive in particular at play here.
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
vefatica wrote:

> I reported a problem with TCSH:
>
> But if I issue "d:/tcmd9/tcc.exe" (TCC starts in the console), when I
> exit TCC, TCSH "encounters a problem" (message box appears) and TCMD
> gives the message
>
> free(0x7fbdad88) bad block. (memtop = 0x7fc10800 membot = 0x7fbb0000)
>
> This application has requested the Runtime to terminate it in an
> unusual way.
> Please contact the application's support team for more information.
>
> I have tracked this down to the "UpdateTitle" directive.
>
> The problem occurs with "UpdateTitle = No" and does not occur with
> "UpdateTitle = Yes".

If "UpdateTitle=No", then TCC doesn't do *anything*. If it's set to
"Yes", then TCC updates the title (with SetConsoleTitle) and possibly
the icon (with SetConsoleIcon) at startup and after executing external apps.


> Recall that the problem occurs when TCSH executes its precmd alias
> (title "$cwd") after the started 4NT process exits.
>
> A wild guess is that something happens to the state of kernel32.dll
> (closing a handle that shouldn't be closed?).

That's a pretty wild guess, as it would require that both Intel (in the
hardware) and Microsoft (in Windows) made major blunders and are
allowing code to cross process boundaries and mangle other processes.
The state of kernel32.dll is unique to each process that links to it; it
is not shared across processes.


> I appreciate your point, Rex, that 4NT shouldn't even be able to
> influence what happens after it exits. I suppose TCSH's author might say
> something similar. Nevertheless there's a rather peculiar dependency on
> 4NT and the UpdateTitle directive in particular at play here.

But TCSH's author wouldn't have any justification in saying that! :-)

The real problem here seems to be that TCSH (by their own admission)
doesn't work correctly with apps compiled with MSVC. (Which would seem
to be a problem with something intended to be used with Windows!)

Rex Conn
JP Software
 
May 20, 2008
11,391
99
Syracuse, NY, USA
On Sun, 26 Oct 2008 22:24:45 -0500, "JP Software Forums" <neil@jpsoft.com>,rconn
<> wrote:


>vefatica wrote:
>
>
>---Quote---
>> I reported a problem with TCSH:
>>
>> But if I issue "d:/tcmd9/tcc.exe" (TCC starts in the console), when I
>> exit TCC, TCSH "encounters a problem" (message box appears) and TCMD
>> gives the message
>>
>> free(0x7fbdad88) bad block. (memtop = 0x7fc10800 membot = 0x7fbb0000)
>>
>> This application has requested the Runtime to terminate it in an
>> unusual way.
>> Please contact the application's support team for more information.
>>
>> I have tracked this down to the "UpdateTitle" directive.
>>
>> The problem occurs with "UpdateTitle = No" and does not occur with
>> "UpdateTitle = Yes".
>---End Quote---
>If "UpdateTitle=No", then TCC doesn't do *anything*. If it's set to
>"Yes", then TCC updates the title (with SetConsoleTitle) and possibly
>the icon (with SetConsoleIcon) at startup and after executing external apps.

That's exactly what I figured. I'm surprised it isn't the other way around
(error with UpdateTitle=Yes). Nevertheless, either test is utterly
reproducible. It makes me very curious.


>---Quote---
>> Recall that the problem occurs when TCSH executes its precmd alias
>> (title "$cwd") after the started 4NT process exits.
>>
>> A wild guess is that something happens to the state of kernel32.dll
>> (closing a handle that shouldn't be closed?).
>---End Quote---
>That's a pretty wild guess, as it would require that both Intel (in the
>hardware) and Microsoft (in Windows) made major blunders and are
>allowing code to cross process boundaries and mangle other processes.
>The state of kernel32.dll is unique to each process that links to it; it
>is not shared across processes.

Yeah, that was wild. But **something** is having an effect across process
boundaries.


>---Quote---
>> I appreciate your point, Rex, that 4NT shouldn't even be able to
>> influence what happens after it exits. I suppose TCSH's author might say
>> something similar. Nevertheless there's a rather peculiar dependency on
>> 4NT and the UpdateTitle directive in particular at play here.
>---End Quote---
>But TCSH's author wouldn't have any justification in saying that! :-)
>
>The real problem here seems to be that TCSH (by their own admission)
>doesn't work correctly with apps compiled with MSVC. (Which would seem
>to be a problem with something intended to be used with Windows!)

I've not seen such an admission. Where is it? Are we talking about the same
TCSH originally ported by Amol Deshpande (I don't know who's doing it now) ...

version tcsh 6.15.00 (Astron) 2007-03-03 (i386-Microsoft-WindowsNT) options 8b,
dl,kan,hb,color,dspm,nt-rev-8.08
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
vefatica wrote:

> Quote:
> >---Quote---
> >> I appreciate your point, Rex, that 4NT shouldn't even be able to
> >> influence what happens after it exits. I suppose TCSH's author might
> say
> >> something similar. Nevertheless there's a rather peculiar dependency on
> >> 4NT and the UpdateTitle directive in particular at play here.
> >---End Quote---
> >But TCSH's author wouldn't have any justification in saying that! :-)
> >
> >The real problem here seems to be that TCSH (by their own admission)
> >doesn't work correctly with apps compiled with MSVC. (Which would seem
> >to be a problem with something intended to be used with Windows!)
>
> I've not seen such an admission. Where is it? Are we talking about the same
> TCSH originally ported by Amol Deshpande (I don't know who's doing it
> now) ...

In a previous message, you said there was a bug report in the TCSH list
regarding MSVC apps, including a hotfix (which didn't work). So
presumably you already know where it is!

Rex Conn
JP Software
 
May 20, 2008
11,391
99
Syracuse, NY, USA
On Mon, 27 Oct 2008 07:12:23 -0500, "JP Software Forums" <neil@jpsoft.com>,rconn
<> wrote:


>In a previous message, you said there was a bug report in the TCSH list
>regarding MSVC apps, including a hotfix (which didn't work). So
>presumably you already know where it is!

I found http://support.microsoft.com/kb/884538 on my own; it has nothing
specifically to do with TCSH.
 
May 20, 2008
11,391
99
Syracuse, NY, USA
In a previous message, you said there was a bug report in the TCSH list
regarding MSVC apps, including a hotfix (which didn't work). So
presumably you already know where it is!

I responded to the above by email at 9:51 ... received my post by email at 10:02. Now it's 10:16 and it still does not appear on the web forum.

I said:

I found http://support.microsoft.com/kb/884538 on my own; it has nothing
specifically to do with TCSH.
 
May 20, 2008
11,391
99
Syracuse, NY, USA
Reproduce the problem much more simply.

Start 4NT/TCC (with UpdateTitle-No).

Issue: [path\]tcsh.exe (with alias precmd 'title "$cwd"')

Crash!

Console says:

title: No match.
free(0x7fbc5188) bad block. (memtop = 0x7fbc6800 membot = 0x7fbb0000)

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Also MessageBox says "tcsh has encountered ...".
 
May 20, 2008
11,391
99
Syracuse, NY, USA
Even easier that that! I posted the following update to my report in the TCSH forum:

It's much easier to cause the crash. And this method does not depend on 4NT's "UpdateTitle" directive or on TCSH's "precmd" alias.

In a running 4NT, simply start TCSH. It crashed immediately, as described earlier. In the console:

title: No match.
free(0x7fbbaa88) bad block. (memtop = 0x7fbc6800 membot = 0x7fbb0000)

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

And also a message box: "tcsh.exe has encountered a problem and needs to close"

Rex, I'm not saying 4NT does anything wrong but I cannot find another scenario in which TCMD fails to start.
 
May 20, 2008
11,391
99
Syracuse, NY, USA
Sorry! Reproducing the crash as described below **does** require "UpdateTitle-No".

Even easier that that! I posted the following update to my report in the TCSH forum:

It's much easier to cause the crash. And this method does not depend on 4NT's "UpdateTitle" directive or on TCSH's "precmd" alias.

In a running 4NT, simply start TCSH. It crashed immediately, as described earlier. In the console:

title: No match.
free(0x7fbbaa88) bad block. (memtop = 0x7fbc6800 membot = 0x7fbb0000)

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

And also a message box: "tcsh.exe has encountered a problem and needs to close"

Rex, I'm not saying 4NT does anything wrong but I cannot find another scenario in which TCMD fails to start.
 
Similar threads
Thread starter Title Forum Replies Date
vefatica TCSH crashes only when in a TCC console Support 2
Dick Johnson Weird Color Problem Support 8
fishman@panix.com Problem with 27.15 Support 2
M Problem with VSDevCmd.bat in VS 16.7.3 Support 0
R Problem with @INT[ value] in V26 Support 9
M Selecting test "off by one" problem in Take command Support 4
Alpengreis UTF-8 problem in TCC related to Python Support 7
K_Meinhard Small problem in german IDE 26 Support 3
B Problem with color in nested shells Support 1
Joe Caverly Problem creating and switching to a DESKTOP Support 9
vefatica Another popup problem Support 10
Alpengreis ffind dialog (/W) problem Support 4
Alpengreis [TCMD v25.00.24] Small space problem with the DE translation in Prefs-GUI Support 1
Alpengreis [TCMD v25.00.24] Problem with copy and paste and the # char via mouse in TCC Support 6
A Problem with functions @int @decimal and identifying Powershell as a shell. Support 12
B IF command problem in tcexit.btm Support 9
fishman@panix.com Problem at Startup of TCC Support 3
P Problem with SFTP copies Support 7
P Problem with FTP copies Support 10
Jay Sage Problem with Context Menu Copy+Paste+Run Key Assignment Support 7
R Problem with %_do_loop in nested do loops Support 2
fishman@panix.com New Problem with later Windows 10 Support 10
Peter Murschall A little problem with LEAVE and COMMENT Support 5
M Handling of %~I problem Support 4
WinLanEm FOR problem Support 18
K Problem With SCRPUT /u Support 3
vefatica What's TCMD's problem with ^e[0m? Support 13
Peter Murschall IDE: RTL with non-English resources-problem is back in Build 28 Support 4
rps Regex problem: \xnn not recognized as a hex character Support 0
rps PRIORITY LOW problem Support 1
old coot Regex problem: \xnn not recognized as a hex character Support 12
vefatica Another problem with build 22. Support 3
Alpengreis [23.x] Download-Problem Support 2
S Problem with " Support 3
C Problem navigating forums Support 11
x13 Problem listing repository files using DIR http(s)://... Support 8
Joe Caverly Problem with TEE in v22 Support 2
Alpengreis Problem with thousands delimiter and colors Support 17
M Take Command 18, migrating to another machine, license problem. Support 1
B TCC 21.01.50 Problem with ALIAS /r and SET /r Support 2
rps How to? @search problem Support 2
WinLanEm @SELECT problem Support 6
T Fixed Problem with use of Batch parameters in the IDE Support 1
Oz Solomon Problem with "list" Support 14
S V21.24 theme problem Support 2
Alpengreis Problem if command prompt is not legacy Support 4
Alpengreis TCMD.INI: The "super hidden" problem ... Support 6
G Odd problem - screen brightness Support 4
rps V20 In-process pipes problem Support 8
Alpengreis Again theme problem [v20.0.21]? Support 11

Similar threads