Jump to content
  • Advertisement
Sign in to follow this  
Nanoha

Invalid address specified to RtlValidateHeap with luabind/CEGUI/Ogre

This topic is 2662 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a problem with heap corruption (or so it says) when I close one of my lua states (on exitting my game). This isn't a huge problem as it only occurs when I quit but its hiding my exceptions which is making other things harder.

I have 2 states, one works perfectly and closes correctly (with everything I have exposed to it), main game thing) but I'm trying to get my ui scripted using Ogre/CEGUI. It is this state thats causing me problems. If I don't expose any of my own classes to the state then everything works fine. It seems to be a problem with luabind. CEGUI is using tolua++ to expose itself. Everything works ok appart from when I close the state (indirectly). This is the shortest snippet that will cause the problem:



CEGUI::LuaScriptModule &scriptModule = CEGUI::LuaScriptModule::create();
lua_State *lua = scriptModule.getLuaState();
system->setScriptingModule(&scriptModule);
luabind::open(lua);
luabind::module(lua)
[
luabind::class_<Test>("Test")
];
CEGUI::LuaScriptModule::destroy(scriptModule);



My output window says:
HEAP[Overkilld.exe]: Invalid address specified to RtlValidateHeap( 028D0000, 00C22E78 )
Windows has triggered a breakpoint in Overkilld.exe.
This may be due to a corruption of the heap, which indicates a bug in Overkilld.exe or any of the DLLs it has loaded.

I've tried passing in my own lua_State (rather than have the script module create its own but it causes the same problem). Its not much to go on I know but is there anything I can try?

Thanks[size="1"]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!