[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua on CE/ARM: no detailed errors?
- From: Petr Štetiar <ynezz@...>
- Date: Sat, 21 Feb 2009 14:24:34 +0100
Bester Husselmann <bester@fantail.net.nz> [2008-11-04 12:07:14]:
> Hello there,
Hi,
> I am building a C++ application for Windows CE (ARM-based processor) and
> am running into a peculiar problem. When Lua is mistreated, e.g.:
I use Lua on various Windows CE/Mobile/Pocket PC devices for more like 3 years
now and I've never had any problems with Lua itself. It's OS issues always.
> lua_newtable(L);
> lua_pushnumber(L, 1);
> lua_pushstring(L, NULL); // Shouldn't work, should it?
> lua_settable(L, -3);
>
> it does not give an exception, doesn't give an error via the lua_atpanic
> function, and doesn't output anything to the console.
Try to change atpanic() to use MessageBox() instead of that fprintf(), or try
regular file instead of that stderr.
> application exits (again, without any error) and the output window in
> Visual Studio shows a Data Abort exception, which is apparently an
> ARM-specific processor-level exception. These also happen when I try to
> call a function that doesn't exist to concatenate its result to a
> string, e.g.
>
> log("The string is: " .. some_nonexistant_function("bob"))
Maybe if you provide minimal test case with complete source code, somebody
might be able to help you more.
> Can anyone give me a pointer (pun not intended, I swear) towards what to
> do to get some detailed error reporting?
Compile Lua stand-alone interpreter(lua.c) for Windows CE and try to run your
log() test case there. If it's working as you've expected, then you can
cherry-pick Lua error reporting code in docall() function to your C++ application.
-- ynezz