Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TCLSH COMES OUT FROM THE MIDDLE OF THE EXECUTION INTERMITTENTLY

43 views
Skip to first unread message

sambi...@gmail.com

unread,
Jul 21, 2021, 11:52:49 PM7/21/21
to
Hi All Experts,

Can anyone of help me with the below mentioned issue I am facing while running a tcl script.

When I start to execute the script using "tclsh filename.tcl", it starts running fine but after some time of execution, the shell prompt comes out before completion of the script i.e before reaching the last line.

And the most important thing is this is happening intermittently, I.E in 1st execution the shell does not run the script completely, but when I rerun the same script it executes till the last line reaches.So I am not able figure out the exact issue.

Please help me resolving this issue.

Lawrence Woodman

unread,
Jul 22, 2021, 2:10:27 AM7/22/21
to
On Wed, 21 Jul 2021 20:52:47 -0700 (PDT), sambi...@gmail.com wrote:

> When I start to execute the script using "tclsh filename.tcl", it starts running fine but after some time of execution, the shell prompt comes out before completion of the script i.e before reaching the last line.

> [SNIP]

> Please help me resolving this issue.

Can you reduce the script until you can find the smallest script that
will produce this problem, even if only intermittently? This will help
you locate the problem and if it still isn't clear then post it hear to
see if anyone can figure out what is happening.

Best wishes


Lorry


---
Getting the Address of BASIC Variables on the VIC-20
https://techtinkering.com/articles/getting-the-address-of-basic-variables-on-the-vic-20/

sambi...@gmail.com

unread,
Jul 23, 2021, 2:16:50 AM7/23/21
to
Hi Lorry,

Many thanks for your reply.
The problem here is, there is no fixed place there the script execution is stopped INTERMITTENTLY.
For Example:-
Iteration 1:-
Script gets executed till line number 100 (e.g) and stops there, comes out from the shell prompt.

Iteration 2:-
Script gets executed till line number 200 (e.g) and stops there, comes out from the shell prompt.

Iteration 3:-
Script gets executed completely till the end and I get a pass log.

Note:- I do not do any changes in the script, while moving from Iteration 1 to 2 and 2 to 3 so on.

Regards
Sambid

EL

unread,
Jul 23, 2021, 3:22:05 AM7/23/21
to
On 23.07.2021 08:16, sambi...@gmail.com wrote:
> Note:- I do not do any changes in the script, while moving from Iteration 1 to 2 and 2 to 3 so on.

Maybe the inputs change between iterations or runs? Which return code do
you get? (echo $?). Is there a C extension in the script that crashes?
Can you put some [puts] statements before critical/suspicious lines to
trace inputs/state before the "stop" happens?

Is there a [catch] or [try/trap] handler which doesn't handle the error
properly, i.e. doesn't output anything and just [exit]'s?


--
EL

sambi...@gmail.com

unread,
Jul 23, 2021, 4:43:33 AM7/23/21
to
Hi All,

I think, I found the issue. I made a silly mistake :- Had kept exit in multiple places in instead of break.

And I appreciate you, giving your valuable time to help me giving suggestion to fix my issue.
Many thanks.

Sambid
0 new messages