TEST3 ;
S $ZT="D HDL"
;
W 1/0
Q
HDL ;
W "Error handled here.",!
Q
Why does a STACKCRIT-Error appear hear after the output of some "Error handled here" texts?
If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for anunderstanding of why you are getting a recursive error trap.
Regards
– Bhaskar
K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:understanding of why you are getting a recursive error trap.
If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an
RegardsHi Bhaskar,
– Bhaskar
thank you for your instant reply.
I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.
TEST3 ;
S y=0
S $ZT="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
h$
On Wednesday, October 11, 2023 at 11:47:17 AM UTC-4, Jens wrote:understanding of why you are getting a recursive error trap.
K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:
If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an
RegardsHi Bhaskar,
– Bhaskar
thank you for your instant reply.
I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.
TEST3 ;I'm not sure where the recursion is. The QUIT in HDL returns to the beginning of the line with W 1/0, which retriggers the error.
S y=0
S $ZT="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
$ yottadb -run TEST3
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
HDL+3^TEST3
TEST3+3^TEST3 ($ZTRAP)
%YDB-I-BREAK, Break instruction encountered
At M source location HDL+3^TEST3
h$
As discussed in https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap
“If there is no explicit or implicit GOTO or ZGOTO in the action, once a $ZTRAP action completes, execution resumes at the beginning of the line where the error occurred, while once a $ETRAP action completes, there is an implicit QUIT.”
Notice that $ETRAP behavior is different and the implicit QUIT causes program execution to terminate:
$ yottadb -run %XCMD 'zprint ^TEST3A'
TEST3A ;
S y=0
S $ET="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
$ yottadb -run TEST3A
Error handled here.
$
Regards
– Bhaskar
K.S. Bhaskar schrieb am Donnerstag, 19. Oktober 2023 um 19:19:53 UTC+2:understanding of why you are getting a recursive error trap.
On Wednesday, October 11, 2023 at 11:47:17 AM UTC-4, Jens wrote:
K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:
If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an
RegardsHi Bhaskar,
– Bhaskar
thank you for your instant reply.
I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.
TEST3 ;I'm not sure where the recursion is. The QUIT in HDL returns to the beginning of the line with W 1/0, which retriggers the error.
S y=0
S $ZT="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
$ yottadb -run TEST3
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
HDL+3^TEST3
TEST3+3^TEST3 ($ZTRAP)
%YDB-I-BREAK, Break instruction encountered
At M source location HDL+3^TEST3
h$
As discussed in https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap
“If there is no explicit or implicit GOTO or ZGOTO in the action, once a $ZTRAP action completes, execution resumes at the beginning of the line where the error occurred, while once a $ETRAP action completes, there is an implicit QUIT.”
Notice that $ETRAP behavior is different and the implicit QUIT causes program execution to terminate:
$ yottadb -run %XCMD 'zprint ^TEST3A'
TEST3A ;
S y=0
S $ET="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
$ yottadb -run TEST3A
Error handled here.
$
RegardsMaybe I wrote misunderstandable. I wanted to say that I wonder why there's a stack-overflow if the routine is run without the BREAK but ZSHOW "S" doesn't show the stack build up. This seems to be a bug in YottaDB.
– Bhaskar
On Saturday, October 21, 2023 at 8:40:39 AM UTC-4, Jens wrote:understanding of why you are getting a recursive error trap.
K.S. Bhaskar schrieb am Donnerstag, 19. Oktober 2023 um 19:19:53 UTC+2:
On Wednesday, October 11, 2023 at 11:47:17 AM UTC-4, Jens wrote:
K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:
If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an
RegardsHi Bhaskar,
– Bhaskar
thank you for your instant reply.
I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.
TEST3 ;I'm not sure where the recursion is. The QUIT in HDL returns to the beginning of the line with W 1/0, which retriggers the error.
S y=0
S $ZT="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
$ yottadb -run TEST3
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
HDL+3^TEST3
TEST3+3^TEST3 ($ZTRAP)
%YDB-I-BREAK, Break instruction encountered
At M source location HDL+3^TEST3
h$
As discussed in https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap
“If there is no explicit or implicit GOTO or ZGOTO in the action, once a $ZTRAP action completes, execution resumes at the beginning of the line where the error occurred, while once a $ETRAP action completes, there is an implicit QUIT.”
Notice that $ETRAP behavior is different and the implicit QUIT causes program execution to terminate:
$ yottadb -run %XCMD 'zprint ^TEST3A'
TEST3A ;
S y=0
S $ET="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
$ yottadb -run TEST3A
Error handled here.
$
There is no stack buildup. After the Q in HDL, control returns to the W 1/0.RegardsMaybe I wrote misunderstandable. I wanted to say that I wonder why there's a stack-overflow if the routine is run without the BREAK but ZSHOW "S" doesn't show the stack build up. This seems to be a bug in YottaDB.
– Bhaskar
K.S. Bhaskar schrieb am Sonntag, 22. Oktober 2023 um 03:40:50 UTC+2:understanding of why you are getting a recursive error trap.
On Saturday, October 21, 2023 at 8:40:39 AM UTC-4, Jens wrote:
K.S. Bhaskar schrieb am Donnerstag, 19. Oktober 2023 um 19:19:53 UTC+2:
On Wednesday, October 11, 2023 at 11:47:17 AM UTC-4, Jens wrote:
K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:
If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an
RegardsHi Bhaskar,
– Bhaskar
thank you for your instant reply.
I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.
TEST3 ;I'm not sure where the recursion is. The QUIT in HDL returns to the beginning of the line with W 1/0, which retriggers the error.
S y=0
S $ZT="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
$ yottadb -run TEST3
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
HDL+3^TEST3
TEST3+3^TEST3 ($ZTRAP)
%YDB-I-BREAK, Break instruction encountered
At M source location HDL+3^TEST3
h$
As discussed in https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap
“If there is no explicit or implicit GOTO or ZGOTO in the action, once a $ZTRAP action completes, execution resumes at the beginning of the line where the error occurred, while once a $ETRAP action completes, there is an implicit QUIT.”
Notice that $ETRAP behavior is different and the implicit QUIT causes program execution to terminate:
$ yottadb -run %XCMD 'zprint ^TEST3A'
TEST3A ;
S y=0
S $ET="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
$ yottadb -run TEST3A
Error handled here.
$
There is no stack buildup. After the Q in HDL, control returns to the W 1/0.RegardsMaybe I wrote misunderstandable. I wanted to say that I wonder why there's a stack-overflow if the routine is run without the BREAK but ZSHOW "S" doesn't show the stack build up. This seems to be a bug in YottaDB.
– Bhaskar
This is what I thought, what the routine would do, but the output of the routine I posted first ends with:
...
Error handled here.
Error handled here.
Error handled here.
Error handled here.
%YDB-E-STACKCRIT, Stack space critical
On Sunday, October 22, 2023 at 5:16:33 AM UTC-4, Jens wrote:understanding of why you are getting a recursive error trap.
K.S. Bhaskar schrieb am Sonntag, 22. Oktober 2023 um 03:40:50 UTC+2:
On Saturday, October 21, 2023 at 8:40:39 AM UTC-4, Jens wrote:
K.S. Bhaskar schrieb am Donnerstag, 19. Oktober 2023 um 19:19:53 UTC+2:
On Wednesday, October 11, 2023 at 11:47:17 AM UTC-4, Jens wrote:
K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:
If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for an
issues/1037RegardsHi Bhaskar,
– Bhaskar
thank you for your instant reply.
I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.
TEST3 ;I'm not sure where the recursion is. The QUIT in HDL returns to the beginning of the line with W 1/0, which retriggers the error.
S y=0
S $ZT="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
$ yottadb -run TEST3
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
HDL+3^TEST3
TEST3+3^TEST3 ($ZTRAP)
%YDB-I-BREAK, Break instruction encountered
At M source location HDL+3^TEST3
h$
As discussed in https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap
“If there is no explicit or implicit GOTO or ZGOTO in the action, once a $ZTRAP action completes, execution resumes at the beginning of the line where the error occurred, while once a $ETRAP action completes, there is an implicit QUIT.”
Notice that $ETRAP behavior is different and the implicit QUIT causes program execution to terminate:
$ yottadb -run %XCMD 'zprint ^TEST3A'
TEST3A ;
S y=0
S $ET="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
$ yottadb -run TEST3A
Error handled here.
$
There is no stack buildup. After the Q in HDL, control returns to the W 1/0.RegardsMaybe I wrote misunderstandable. I wanted to say that I wonder why there's a stack-overflow if the routine is run without the BREAK but ZSHOW "S" doesn't show the stack build up. This seems to be a bug in YottaDB.
– Bhaskar
This is what I thought, what the routine would do, but the output of the routine I posted first ends with:
...Jens,
Error handled here.
Error handled here.
Error handled here.
Error handled here.
%YDB-E-STACKCRIT, Stack space critical
I took a quick look:
I think you are right that there may be an issue with YottaDB. We looked quickly at the code and it is adding something to the internal stack without taking it off every time $ZTRAP is invoked. I created this issue: https://gitlab.com/YottaDB/DB/YDB/-/
--Sam
On Monday, October 23, 2023 at 11:14:10 AM UTC-4, Sam Habiel wrote:an understanding of why you are getting a recursive error trap.
On Sunday, October 22, 2023 at 5:16:33 AM UTC-4, Jens wrote:
K.S. Bhaskar schrieb am Sonntag, 22. Oktober 2023 um 03:40:50 UTC+2:
On Saturday, October 21, 2023 at 8:40:39 AM UTC-4, Jens wrote:
K.S. Bhaskar schrieb am Donnerstag, 19. Oktober 2023 um 19:19:53 UTC+2:
On Wednesday, October 11, 2023 at 11:47:17 AM UTC-4, Jens wrote:
K.S. Bhaskar schrieb am Montag, 9. Oktober 2023 um 16:40:48 UTC+2:
If you must use $ZTRAP, remember that since it starts with Z, the behavior may be different from that you are used to on other M systems. See https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap for
/issues/1037RegardsHi Bhaskar,
– Bhaskar
thank you for your instant reply.
I try to improve my debugger-extension for Visual-Studio-Code, so I don't know, if the user relies on $ET or $ZT.
But I wonder why ZSHOW "S" doesn't show more stack levels after some recursions.
TEST3 ;I'm not sure where the recursion is. The QUIT in HDL returns to the beginning of the line with W 1/0, which retriggers the error.
S y=0
S $ZT="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
$ yottadb -run TEST3
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
Error handled here.
HDL+3^TEST3
TEST3+3^TEST3 ($ZTRAP)
%YDB-I-BREAK, Break instruction encountered
At M source location HDL+3^TEST3
h$
As discussed in https://docs.yottadb.com/ProgrammersGuide/errproc.html#differences-between-etrap-and-ztrap
“If there is no explicit or implicit GOTO or ZGOTO in the action, once a $ZTRAP action completes, execution resumes at the beginning of the line where the error occurred, while once a $ETRAP action completes, there is an implicit QUIT.”
Notice that $ETRAP behavior is different and the implicit QUIT causes program execution to terminate:
$ yottadb -run %XCMD 'zprint ^TEST3A'
TEST3A ;
S y=0
S $ET="D HDL"
W 1/0
Q
HDL ;
S y=y+1
W "Error handled here.",!
I y=10 ZSHOW "S" B
Q
$ yottadb -run TEST3A
Error handled here.
$
There is no stack buildup. After the Q in HDL, control returns to the W 1/0.RegardsMaybe I wrote misunderstandable. I wanted to say that I wonder why there's a stack-overflow if the routine is run without the BREAK but ZSHOW "S" doesn't show the stack build up. This seems to be a bug in YottaDB.
– Bhaskar
This is what I thought, what the routine would do, but the output of the routine I posted first ends with:
...Jens,
Error handled here.
Error handled here.
Error handled here.
Error handled here.
%YDB-E-STACKCRIT, Stack space critical
I took a quick look:
I think you are right that there may be an issue with YottaDB. We looked quickly at the code and it is adding something to the internal stack without taking it off every time $ZTRAP is invoked. I created this issue: https://gitlab.com/YottaDB/DB/YDB/-
--SamJens,
Your issue has been fixed in the master branch. It was indeed a bug as you suspected.
--Sam
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 399 |
Nodes: | 16 (2 / 14) |
Uptime: | 40:00:49 |
Calls: | 8,336 |
Calls today: | 13 |
Files: | 13,155 |
Messages: | 5,891,352 |
Posted today: | 1 |