Odd Lua Issue in 0.6.2
Posted: Mon Dec 08, 2008 14:25
Running the following code,
I get correct output for the print command (the name of the window), but a crash on the next line,
What makes this odd is that this is on Windows, with 0.6.2, while (1) this code worked fine with 0.6.1 on Windows, and (2) this code works fine on Linux with 0.6.2.
I'm not even sure what the problem could be, as the print command proves that lastfocus is a valid window, and if activate were an invalid function name then the error message would be different, in particular, it would be informative, giving the line number in Lua of the error, unlike here - I had to find the crashing line by placing lots of debug messages and seeing where it stopped.
Any ideas on how to get to the bottom of this?
Code: Select all
print( lastfocus:getName() )
letfocus:activate()
I get correct output for the print command (the name of the window), but a crash on the next line,
Code: Select all
CEGUI::ScriptException in file
...CEGUILuaFunctor.cpp(195): Unable to call Lua event handler:
attempt to call a nil value
What makes this odd is that this is on Windows, with 0.6.2, while (1) this code worked fine with 0.6.1 on Windows, and (2) this code works fine on Linux with 0.6.2.
I'm not even sure what the problem could be, as the print command proves that lastfocus is a valid window, and if activate were an invalid function name then the error message would be different, in particular, it would be informative, giving the line number in Lua of the error, unlike here - I had to find the crashing line by placing lots of debug messages and seeing where it stopped.
Any ideas on how to get to the bottom of this?