• Error-Handling in YottaDB

    From Jens@21:1/5 to All on Mon Oct 9 03:05:13 2023
    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?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From K.S. Bhaskar@21:1/5 to Jens on Mon Oct 9 07:40:46 2023
    On Monday, October 9, 2023 at 6:05:14 AM UTC-4, Jens wrote:
    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?

    Use $ETRAP and clear $ECODE before returning.

    $ yottadb -run %XCMD 'zp ^TEST3 d ^TEST3'
    TEST3 ;
    S $ET="D HDL"
    ;
    W 1/0
    Q
    HDL ;
    W "Error handled here.",!
    S $ECODE=""
    Q
    Error handled here.
    $

    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 understanding
    of why you are getting a recursive error trap.

    Regards
    – Bhaskar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jens@21:1/5 to K.S. Bhaskar on Wed Oct 11 08:47:15 2023
    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
    understanding of why you are getting a recursive error trap.

    Regards
    – Bhaskar

    Hi 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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From K.S. Bhaskar@21:1/5 to Jens on Thu Oct 19 10:19:52 2023
    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
    understanding of why you are getting a recursive error trap.

    Regards
    – Bhaskar
    Hi 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

    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.

    $ 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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jens@21:1/5 to K.S. Bhaskar on Sat Oct 21 05:40:37 2023
    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
    understanding of why you are getting a recursive error trap.

    Regards
    – Bhaskar
    Hi 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
    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.

    $ 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


    Maybe 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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From K.S. Bhaskar@21:1/5 to Jens on Sat Oct 21 18:40:48 2023
    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
    understanding of why you are getting a recursive error trap.

    Regards
    – Bhaskar
    Hi 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
    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.

    $ 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
    Maybe 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.

    There is no stack buildup. After the Q in HDL, control returns to the W 1/0.

    Regards
    – Bhaskar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jens@21:1/5 to K.S. Bhaskar on Sun Oct 22 02:16:31 2023
    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
    understanding of why you are getting a recursive error trap.

    Regards
    – Bhaskar
    Hi 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
    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.

    $ 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
    Maybe 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.
    There is no stack buildup. After the Q in HDL, control returns to the W 1/0.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam Habiel@21:1/5 to Jens on Mon Oct 23 08:14:09 2023
    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 an
    understanding of why you are getting a recursive error trap.

    Regards
    – Bhaskar
    Hi 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
    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.

    $ 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
    Maybe 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.
    There is no stack buildup. After the Q in HDL, control returns to the W 1/0.

    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

    Jens,

    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/-/
    issues/1037

    --Sam

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam Habiel@21:1/5 to Sam Habiel on Mon Oct 23 14:09:05 2023
    On Monday, October 23, 2023 at 11:14:10 AM UTC-4, Sam Habiel wrote:
    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 an
    understanding of why you are getting a recursive error trap.

    Regards
    – Bhaskar
    Hi 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
    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.

    $ 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
    Maybe 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.
    There is no stack buildup. After the Q in HDL, control returns to the W 1/0.

    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
    Jens,

    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/-/
    issues/1037

    --Sam

    Jens,

    Your issue has been fixed in the master branch. It was indeed a bug as you suspected.

    --Sam

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jens@21:1/5 to Sam Habiel on Wed Oct 25 03:13:55 2023
    Sam Habiel schrieb am Montag, 23. Oktober 2023 um 23:09:07 UTC+2:
    On Monday, October 23, 2023 at 11:14:10 AM UTC-4, Sam Habiel wrote:
    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
    an understanding of why you are getting a recursive error trap.

    Regards
    – Bhaskar
    Hi 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
    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.

    $ 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
    Maybe 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.
    There is no stack buildup. After the Q in HDL, control returns to the W 1/0.

    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
    Jens,

    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/-
    /issues/1037

    --Sam
    Jens,

    Your issue has been fixed in the master branch. It was indeed a bug as you suspected.

    --Sam

    Hi Sam,
    Thank you very much for fixing this!

    Jens

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)