@EXECSTR ... TCSTART ... something's wrong!

May 20, 2008
11,400
99
Syracuse, NY, USA
Here's TCC27's TCSTART and a pretty simple BTM.

Code:
v:\> type d:\tc27\TCSTART.BTM
IF "%_PIPE %_TRANSIENT" != "0 0" QUIT

v:\> type test.btm
echo foo

If I do this (below) repeatedly, TCC27 will crash, usually on the second try.

Code:
v:\> echo %@execstr[test.btm]
foo

v:\> echo %@execstr[test.btm]

CRASH!

If I start TCC27 with no TCSTART (/is) I can execute echo %@execstr[test.btm] any number of times without a crash.
 
May 20, 2008
11,400
99
Syracuse, NY, USA
The same thing happens with an empty TCSTART.

Code:
v:\> echo %@execstr[test.btm]
foo

v:\> echo %@execstr[test.btm]
foo

v:\> echo %@execstr[test.btm]
foo

v:\> echo %@execstr[test.btm]
foo

v:\> type d:\tc27\TCSTART.BTM


v:\> d:\tc27\TCSTART.BTM

v:\> echo %@execstr[test.btm]
foo

CRASH!
 
May 20, 2008
11,400
99
Syracuse, NY, USA
It has nothing to do with TCSTART. Run any BTM. And then echo %@execstr[some.btm] a few times (any BTM). TCC27 will crash.

TCC v24, v25. v26 do not behave this way
 
Aug 9, 2009
229
1
some times it works some times not. some v27 functions & commands that run and cause errors

(tcstart.bat)
PROCESSMONITOR sketchup_webhelper.exe STARTED FOREVER tasklist /zu sketchup_webhelper.exe

It says its killled the process but actually hasn't
 
May 20, 2008
11,400
99
Syracuse, NY, USA
When it happens, Reliability Monitor has this to say (it comes straight out of the Application event log).

Code:
Faulting application name: tcc.exe, version: 27.1.23.0, time stamp: 0x60879202
Faulting module name: ntdll.dll, version: 10.0.19041.964, time stamp: 0xbd2c3c23
Exception code: 0xc0000374
Fault offset: 0x00000000000ff199
Faulting process id: 0x868
Faulting application start time: 0x01d75b3dfdf70606
Faulting application path: d:\tc27\tcc.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report Id: d0bcafe5-ded2-4f3c-b99e-8a2b6ca4eaed
Faulting package full name: 
Faulting package-relative application ID:
 
May 20, 2008
11,400
99
Syracuse, NY, USA
Fixed in build 24. (New RTL / STL combo bug.)

But I can't imagine any reason to actually *need* to execute a batch file in @EXECSTR ...
I was experimanting with implementing multi-line UDFs. I never got back to that ... sidetracked trying to figure out the crash. The error code was about heap corruption. I thought maybe compiler or library error.
 
Aug 23, 2010
637
9
But I can't imagine any reason to actually *need* to execute a batch file in @EXECSTR ...
I did that repeatedly before switching to POSIX scripts.
Write a short code that build the string you need (f.e. fetch IP address from checkip.dyndns.org), and return it in @EXECSTR.
 
Similar threads
Thread starter Title Forum Replies Date
M Server 2019 Bug with @execstr? Support 14
vefatica @EXECSTR clobbers @ECHO ON Support 2
T @execstr unicode support Support 6
x13 %@EXECSTR[-X,...] generates CLS before execution? Support 10
Joe Caverly Documentation Add see also _EXECSTR to @EXECSTR Support 0
T @execstr[] on Win10 Support 5
Stefano Piccardi [14.02.36] leavefor in @execstr issue Support 12
M @ExecStr vs. Call Support 4
M A problem with nested Gosub's/ExecStr's Support 14
Charles S. Roaten Problems with TCSTART.BTM Support 1
D TCSTART issue after reinstallation Support 14
D check for network tcstart.btm and load if newer Support 3
Craig Fitzgerald Problems using tcstart.btm Support 3
dcantor How to? Batch file to be executed by TCSTART Support 4
thorntonpg TCC_RT_21\tcc.exe runs tcstart Support 4
JohnQSmith ALIAS /R in TCSTART.BTM Support 9
A 18.00.21 tries to cancel TCSTART.BTM Support 3
vefatica Why isn't TCSTART.BTM run? Support 8
p.f.moore How to? User specific TCSTART (etc) files Support 15
MickeyF Why does my tcstart.btm sometimes terminate tcc.exe? Support 4
M Mysteriously to me TCStart.btm is not being executed... Support 2
S Fixed Stand-alone TCC 14.02.43 hangs before TCSTART Support 3
Peter Murschall Is IDE forbidden in TCSTART.BTM ? Support 4
vefatica TCSTART and TCEXIT not executed Support 7
fpefpe tcstart and plugin Support 4
Ville Command line variable in tcstart.btm? Support 7
G PROMT command in TCSTART.BTM Support 3
Phileosophos Enabling PathExt disables tcstart.btm processing Support 9
vefatica Something got very slow (very recently) Support 1
L How to? Shebang, nice idea but am I missing something? Support 4
P Can't do something to a file and then delete it? Support 6
vefatica Something is hosed in build 74 Support 10
M Hotkey-mechanism, for doing something with the current command-line Support 4
M Yet another strange something re something called "@TCONVERT" Support 8
vefatica Something wrong with @PID Support 10
M Is this a restriction I wasn't aware of or something new (that maybe shouldn't be there)? Support 16
vefatica Append something entered to a file? Support 12
M Something that does not seem possible... Support 2

Similar threads