Runtime errors are errors in the program detected during its
execution. In this case an error message is given and a dump of the
call stack of objects is generated on the file foo.dump
if the program
is named foo
.
Consider the following fragments (note that the name of the fragments are complete UNIX file paths)
ORIGIN '~beta/basiclib/betaenv' --LIB: attributes-- lib1: (# do INNER #); lib2: lib1 (# T: (# x: @integer #); R: ^T do (* &T[]->R[] *) 111->R.x; (* R[] is NONE *) INNER #); lib3: lib2(# do 'hello'->putLine #)
ORIGIN '~beta/basiclib/betaenv'; INCLUDE 'mylib' --PROGRAM: descriptor-- (# foo1: (# do foo2 #); foo2: (# do foo.foo3 #); foo: @(# foo3: (# do lib3 #)#) do foo1 #)
Execution of this program on a SPARC Solaris (sun4s
)
machine will result in the
following file:
runtimeerr.dump
Beta execution aborted: Reference is none. Call chain: (sun4s) item lib3#<lib2#>lib1# in /usr/smith/mylib item lib3#lib2#<lib1#> in /usr/smith/mylib item <foo3#> in /usr/smith/runtimeerr item <foo2#> in /usr/smith/runtimeerr item <foo1#> in /usr/smith/runtimeerr comp <PROGRAM-~> in /usr/smith/runtimeerr basic component in ~beta/basiclib/betaenv Low level information: Call chain: (sun4s) item lib3#<lib2#>lib1# in /usr/smith/mylib { PC 0x278e8 <M2MYLIB+0xc>, object 0x10010b78, proto 0x56c98 "lib3#" <T4MYLIB> } -- BETAENV-~ in ~beta/basiclib/betaenv { Surrounding object 0x10010038, proto 0x53a98 "BETAENV-~" <T1BETAENV> } ... Rest of low level dump left out ...
The information in runtimeerr.dump
has the following meaning:
Call Chain
. The names shown for objects are the names
of the corresponding patterns. Anonymous patterns are shown as
*
.
Components are marked with
comp
at the beginning of the line,
whereas ordinary objects are marked with
item
.
The outmost component, which executes the betaenv
object
is marked as basic component
.
lib3
. The description
lib3#<lib2#>lib1
shows the
superpattern chain of lib3
. The braces
(<
,>
) indicates that the
error occurred in the do-part of lib2
.
PROGRAM
SLOT is marked with
both -
and ~ since a descriptor SLOT gives rise to a singular named
descriptor.
lib3
was called from foo3
, which was called
from foo2
, which was called from foo1
,
etc. The bottom most objects
are defined in betaenv
.
lib3
is defined in the file /usr/smith/mylib
[ EXTERNAL ACTIVATION PART ]
as the top of the call chain.
[ EXTERNAL ACTIVATION PART ]
{
, }
) is
shown, in both hexadecimal and symbolic form, what the current program
counter of the object was, at what address the object was placed, and
what it's prototype (type information) is. This information
is probably of no concern for the ordinary programmer, but it can be
valuable information for the people at Mjølner Informatics, if an
error report is submitted to
Mjølner Informatics with the dump file attached.
foo3
is foo
. The rest of the
objects in the example have enclosers, which are SLOTs.
This information can sometimes be of interest for the ordinary programmer, since it helps identify the objects.
BETART
environment variable
to include SimpleDump
. See
The BETART Environment Variable for details.
The low level trace takes some time for the BETA runtime system to
produce.
The time is proportional to the size of the executable. This is the
reason that a substantial time may pass from the time the crashing
program has printed out BETA Execution Aborted
until
it actually exits. Please do not interrupt the process during this
time, since the dump will then be incomplete.
BETA runtime error stack dump | © Mjølner Informatics |