lua-users home
lua-l archive

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

Actually, Viewport has no constructor. Even if it did, the code below
doesn't use it - the part that does is commented out. However, the program
still segmentation faults right after the first console_write() and before
the second. All console_write() does is output it's (string) argument to
cerr, so I can't see how it should be generating a segfault.

Thanks, Philip Bock

----- Original Message -----
From: "Edgar Toernig" <>
To: "Multiple recipients of list" <>
Sent: Wednesday, November 21, 2001 2:17 PM
Subject: Re: Userdata and methods

> Philip Bock wrote:
> >
> > console_write("This is the beginning...\n")
> > -- viewport_translaterd(self.viewport, self.pitch, self.yaw, self.roll,
> > self.velocity * ticks_per_frame)
> > console_wirte("This is the end.\n")
> >
> > it still segfaults after the first console_write(), without the cerr
> > >from viewport_translaterd()! Now how do you figure that...
> Lua does nothing more than writing some strings so it seems your C++ code
> is broken.  Maybe the constructor/destructor of your Viewport class is
> broken... (overwrites memory or something like that)
> Ciao, ET.