[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bus error



My very simple program (from Kernighan's paper) crashes. The
problem is in the line 
	t := tk->toplevel(ctxt.screen, "");
Any ideas why? emu is running on a Sparc Ultra 1, Solaris 2.5.1 .
The mux application appears to work.

Thanks.
Shankar


Here is the program:


implement hello2;
 
include "sys.m";
        sys: Sys;
 
include "draw.m";
        draw: Draw;
 
include "tk.m";
        tk: Tk;
 
hello2: module
{
        init: fn(ctxt: ref Draw->Context, argv: list of string);
};
 
init(ctxt: ref Draw->Context, argv: list of string)
{
        sys = load Sys Sys->PATH;
        sys->print("foo");
        draw = load Draw Draw->PATH;
        tk = load Tk Tk->PATH;
 
        t := tk->toplevel(ctxt.screen, "");
 
#       tk->cmd(t, "button .b -text {hello, world}");
#       tk->cmd(t, "pack .b");
#       tk->cmd(t, "update");
 
#       sys->sleep(1000);
}


I get:

sleepless$ hello2
foo
[hello2] 6574 OSFault "Bus error"
[hello2] PC 11 INST movp        0(32(fp)), 32(44(fp))
[hello2] Broken: "Bus error"
16 "hello2":Bus error
sleepless$