   [lua] luabind and luaexpat error
  Hi,Im trying to use lua to parse a xml file for themes. I am using luaexpat for reading the xml and luabind for binding the c++ functions. The erro happens when I set values in the struct, after I set two values luaexpat stops calling any callbacks, no errors are thown.. any ideas??the lua script print("-- Loading Theme --")require "lxp"local theme = Theme()local curWidget = nillocal function texture(name, args)   local widget = theme : NewWidget(args["name"], nil)    for i=1,#args doif args ~= "name" then    widget[args] = tonumber(args[args])end    endendlocal function widget(name, args)    curWidget = theme : NewWindow(args["name"], nil)endlocal function child(name, args)    local child = theme : PushWidget( curWidget, args["type"] )    for i=1,#args do    print(args)    endendcallbacks = {    StartElement = function (parser, name, attribs)if name == "texture" thenprint("here")texture(name, attribs)elseif name == "widget" thenwidget(name, attribs)elseif name == "child" thenchild(name, attribs)end    end}local parser = lxp.new(callbacks)local file = io.open("themes/default.xml", "r")for line in file:lines() do    print(line)    parser:parse(line)endfile:close()print("-- Finished loading theme --")the parts of the xml file that are read +1 linenote: doesnt matter what they are, always failes on two<theme>    <textures file="default.png" format="RGBA"><texture name="rule.top" x="55" y="7" width="186" height="20" /><texture name="button.close" x="10" y="10" width="10" height="10" />and the binding codevoid Theme::RegisterFunctions() {luabind::module(GetLuaState())[luabind::class_<Theme > ("Theme").def(luabind::constructor<>()).def("Init", &Theme::Init).def("LoadTheme", &Theme::LoadTheme).def("PushWidget", &Theme::PushWidget).def("NewWidget", &Theme::NewWidgetData).def("NewWindow", &Theme::NewWindowData).property("Image", &Theme::GetImage, &Theme::SetImage)];luabind::module(GetLuaState())[luabind::class_<WindowData > ("WindowData").def(luabind::constructor<>()).def_readwrite("Widgets", &WindowData::Widgets)];luabind::module(GetLuaState())[luabind::class_<WidgetData > ("WidgetData").def(luabind::constructor<>()).def_readonly("name", &WidgetData::name).def_readwrite("x", &WidgetData::x).def_readwrite("y", &WidgetData::y).def_readwrite("width", &WidgetData::width).def_readwrite("height", &WidgetData::height)];luabind::module(GetLuaState())[luabind::class_<ChildData > ("ChildData").def(luabind::constructor<>()).def_readwrite("Data", &ChildData::Data).def_readwrite("Callback", &ChildData::Callback).def_readwrite("x", &ChildData::x).def_readwrite("y", &ChildData::y).def_readwrite("z", &ChildData::z)];}Edit: the new widget data functionWidgetData* Theme::NewWidgetData(std::string name, WidgetData* data) {if (data != NULL)Widgets[name] = data;elseWidgets[name] = new WidgetData;Widgets[name]->name = name;return Widgets[name];}and here is the outputim expecting here after every texture element not just two, which means its not reaching the callback...-- Loading Theme --<theme>    <textures file="default.png" format="RGBA">   <texture name="rule.top" x="55" y="7" width="186" height="20" />here   <texture name="button.close" x="10" y="10" width="10" height="10" />here   <texture name="rule.side" x="58" y="41" width="12" height="166"/>   <texture name="rule.bottom" x="76" y="34" width="161" height="7"/>   <texture name="editbox.input" x="82"  y="194" width="155" height="20"/>   <alias name="exitbutton" ref="button.close"/>    </textures>    <widgets>   <widget name="console">  <child type="rule.top" x="0" y="0"/>  <child type="button.close" x="10" y="2"/>   </widget>    </widgets></theme>-- Finished loading theme --thanksEDIT2: Finally found out that the error is caused by a stack corruption, no idea how to fix this tho.. so help still needed[Edited by - cherryyosh on May 16, 2009 10:43:21 PM]