[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows
From: |
Ronald Lamprecht |
Subject: |
Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows |
Date: |
Sun, 16 Jul 2006 22:26:12 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.7 (Windows/20050923) |
Hi,
Tacvek wrote:
I am very confident that the bug is not located in Enigma. But I still
have no idea whether it is Lua or Mingw gcc that causes the trouble.
A mingw gcc 3.4.5 - DW2 test would be interesting.
That is what I did compile the one that gives the unusual termination
dialog box with.However I cross compiled, which for some reason seems to
make it al but imposible to debug.
Lets see what we do know for sure:
* It looks like Enigma is throwing the XLevelRuntime, but for some
reason Enigma's exception handlers are not getting a chance to catch the
exception.
* Apparently something is causing the program to segfault while
* With slsj we are getting a segfault. Apparently, SDL's parachute is
doing something, as the program terminates rather than truely crashing,
but truely crashes when run in wizard mode.
* It looks like SDL is not wring a parachute deployment notice to
stderr.txt, but I'm pretty sure I've seen such a notice in stderr.txt
in other cases.
* With -DW2 exceptions there is a unusual dialog box. This appears to be
raised by MSVC++'s runtime library. (More likely it is actually the C
runtime library). This unusual dialog box occurs in wizard mode as well
as normal mode.
What a mess.
I looked at Lua how it processes luaL_error. luaconf.h offers 3 methods
for LUAI_THROW/LUAI_TRY: C++ exceptions, _longjmp/_setjmp and
longjmp/setjmp. Linux and Mac use _longjmp/_setjmp, Windows uses
longjmp/setjmp independent of the MingW exception method (SJLJ, DW2).
The MingW setjmp.h looks strange: setjmp is mapped to _setjmp, _longjmp
does not exist. The comment to the used buffer is funny:
/*
* The buffer used by setjmp to store the information used by longjmp
* to perform it's evil goto-like work. The size of this buffer was
* determined through experimentation; it's contents are a mystery.
* NOTE: This was determined on an i386 (actually a Pentium). The
* contents could be different on an Alpha or something else.
*/
#define _JBLEN 16
One experiment would be to compile Lua as C++ - this would guarantee the
same exception mechanism being used in Enigma and Lua. (Some Enigma
sources would need minor adaptation. No idea about tolua++' exception
dependency). The effects on SJLJ and DW2 would be interesting.
On the other hand a Visual Studio Express compilation should use
Microsoft SEH. Another chance to bypass tan expection handling problem.
BTW the DW2 unusual dialog box raised by MSVC++'s runtime library may be
caused by an exception passing dll boundaries:
http://thread.gmane.org/gmane.comp.gnu.mingw.user/9193/focus=9232
The following versions seems to be the first that should be able to pass
dll boundaries:
http://thread.gmane.org/gmane.comp.gnu.mingw.user/18860/focus=18860
I'll be vacationing the next two weeks so I'll likely not be much help
in fixing this problem.
- Ronald
- Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows, Tacvek, 2006/07/01
- Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows, Ronald Lamprecht, 2006/07/01
- Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows, Tacvek, 2006/07/01
- Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows,
Ronald Lamprecht <=
- Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows, Tacvek, 2006/07/16
- Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows, Ronald Lamprecht, 2006/07/22
- Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows, Tacvek, 2006/07/22
- Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows, Ronald Lamprecht, 2006/07/23
- Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows, Tacvek, 2006/07/23
- [Enigma-devel] Hints in the Manual, Andreas Lochmann, 2006/07/23
- Re: [Enigma-devel] Hints in the Manual, Daniel Heck, 2006/07/28
- Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows, Tacvek, 2006/07/24
- Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows, Tacvek, 2006/07/26
- Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows, Tacvek, 2006/07/26