[Top][All Lists]

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

Re: [Enigma-devel] crashes on linux gcc exception handling

From: Ronald Lamprecht
Subject: Re: [Enigma-devel] crashes on linux gcc exception handling
Date: Sun, 24 Sep 2006 19:28:19 +0200
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)


Daniel Heck wrote:
2. switch Lua to C++ for Linux and other OS, too

As approach 1. means a lot of work and would force a rewrite of all
tolua based code I would prefer the second solution.

Is anyone aware of other solutions? Does anyone object solution 2?

I think this would be a reasonable solution for the moment, although I'm
not sure that this is safe from Lua's perspective.  For example, I'm not
sure that this couldn't lead to memory leaks in the Lua interpreter, or
leave the Lua interpreter in some inconstistent state.

As we release the Lua interpreter as part of the level abortion we should not run into trouble. You can test the fix by configuring the current revision with option "--enable-cxxlua".

It doesn't solve another problem: Lua scripts still don't have a chance
to handle errors raised in the Enigma engine.  A better (long-term)
solution might therefore be to map C++ exceptions to "lua_error" or
luaL_error calls.   I don't think that this is an urgent issue at the
moment, and I'm not sure that tolua would support this, but it's
certainly something to think about.

Does any Lua support exist for catching Lua-error calls from within Lua code?

- Ronald

reply via email to

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