This program quickly overflows the stack due to the unconditional recursive calls between .foo and .bar:

class A
    def main
        .foo(List<of int>())
    def foo(t as List<of int>)
        .bar(Set<of int>())
    def bar(s as Set<of int>)
        .foo(List<of int>())

On DotNet, a StackOverflowException will be produced, but with no stackframes. On NovellMono, the program will simply crash with some systems reporting a SIGSEGV and others displaying no additional output of any type. The behavior of the virtual machines is out of control of the Cobra project, however, the Cobra compiler can add additional code generation to track stackframes and then complain if they reach an upper limit. This is invoked with the DetailedStackTrace option like so:

$ cobra -dst stackoverflow.cobra
Cobra detected stack overflow:
  Last 20 frames:
    480. def at line 5
    481. def at line 7
    482. def at line 5
    483. def at line 7
    484. def at line 5
    485. def at line 7
    486. def at line 5
    487. def at line 7
    488. def at line 5
    489. def at line 7
    490. def at line 5
    491. def at line 7
    492. def at line 5
    493. def at line 7
    494. def at line 5
    495. def at line 7
    496. def at line 5
    497. def at line 7
    498. def at line 5
    499. def at line 7
    500. def at line 4
Fail fast: Stack Overflow
Exiting with -1

There is a performance overhead, so this option is generally only used for troubleshooting.

See also: DetailedStackTrace