enigma-devel
[Top][All Lists]
Advanced

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

Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows


From: Tacvek
Subject: Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows
Date: Thu, 29 Jun 2006 18:43:36 -0400


----- Original Message ----- From: "Tacvek" <address@hidden> To: "Ronald Lamprecht" <address@hidden>; "Daniel Heck" <address@hidden>
Cc: <address@hidden>
Sent: Thursday, June 29, 2006 6:15 PM
Subject: Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows



----- Original Message ----- From: "Ronald Lamprecht" <address@hidden>
To: "Tacvek" <address@hidden>; "Daniel Heck" <address@hidden>
Cc: <address@hidden>
Sent: Thursday, June 29, 2006 5:06 PM
Subject: Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows


Hi,

Ronald Lamprecht wrote:
Meanwhile I succeeded in running Enigma on Windows under the control of
gdb (still just with the commandline interface).


I had a look in gdb on the "enigma.GetKind(nil)" case - it just causes a segmentation fault at the same line 166 in lobject.c.

In both cases immediatly before a luaM_realloc_ occured on L. That may be the common internal reason.

Now I checked the the "enigma.SetItem(7,9, nil)" that reports errors correctly:

Gdb steps exactly in the same manner until line 166 in lobject.c but one further step results in a "continue" - the app displays the errormessage at once and gdb looses control over the app! After pressing ESC you can move the mouse and highlight the previews in the levelmenu. But when you start a level gdb stops the app at the moment luacode is entered again. What the hell is lua doing?

I don't know, but it looked to me like it might have been doing the same thing in the crashing case.
It looks like GDB does is not stepping through some og the code.

Take a look at your backtrace:

(gdb) backtrace
#0  0x778b7e75 in ?? ()
#1  0x0070ca9c in _Unwind_SjLj_RaiseException ()
#2  0x00702b75 in __cxa_throw ()
#3 0x0049a717 in world::PerformAction(world::Object*, bool) (o=0x5f10e10, onoff=true) at world.cc:1406

The line mentioned in #3 is a throw statement. Number #2 is not doing much. It puts the peices of the exception into a strucure, and incements a uncaught Exception counter. It then passes the structure to "_Unwind_SjLj_RaiseException", which based on the comments is not supposed to return. There seems to be no source code for _Unwind_SjLj_RaiseException, but cygwin has the same problem.

But that bug can be aliviated by cathing the exception raised in #3. It is definately a bug in Enigma that it is not catching that exception.

No. We are catching the exception.
Backtrace:
#13 0x00429e52 in enigma_game::StartGame(enigma_levels::LevelPack*, unsigned) (
   lp=0x395e2b0, ilevel=8) at game.cc:90

StartGame catches the exception. The bug is in mingw32's SjLj exception handling. Apparently it segfaults or terminates rather than invoking the exception handler.
It only does this under certain circumstances.

Upstream bug. Final answer.

We can try using "DW2". It might be a problem is a dll tries to pass us an exception, but I don't think any of the dll's we are using do that.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]