[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Error handling in IUP
- From: Antonio Scuri <scuri@...>
- Date: Fri, 18 Aug 2006 08:08:32 -0300
This was a bug in IUP. I already fixed it in CVS.
If you want I can send you a pre-compiled binary for your platform/compiler.
At 21:54 17/8/2006, Peter Loveday wrote:
I'm having a weird problem with error handling in iup 2.5, running
with Lua 5.11. This is a custom build, so its possible I've
introduced a problem.
When an error occurs in an iup action handler, say a button:action()
callback, it goes into a recursive loop until it exhausts the lua
stack and traps with LUA_ERRERR ("error in error handling").
As best as I can see, the callback itself is being used as the error
handling function, as it is at the first index on the stack.
I am curious as to what sets up the error handler? In the C code,
the action callback first calls iuplua_call_start(), which finds the
named callback function, then uses iuplua_call() to call the callbak
function. This directly calls lua_pcall(), passing 1 for the error
handler. I cannot see anywhere the error function would be put at
this index, but perhaps I'm missing something. There is another
function defined, docall(), which sets up an error handler, but this
doesn't seem to be involved in this case.
As I said, its entirely possible I've introduced this issue, but any
pointers as to where the error function is supposed to be put on the
stack in this case would be appreciated.
Love, Light and Peace,
- Peter Loveday