Unhandled Exception

Phil Cooper-King <[email protected]> Sat, 29 Oct 2011 22:44:45 +0100
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <CAPrH6UMgq4ndy5ykR-V9RqDa7bi8SD11egzHBPzWYJZmey=J5w@mail.gmail.com>
Hey,

I have a problem trying to get luabind work. I've built the .dll and
did a small test app and it worked fine. I'm now trying to add it to a
bigger project, but I keep getting an error

Unhandled exception at 0x63bc31de (luabind.dll) in Shifters.exe:
0xC0000005: Access violation writing location 0x00d31eae.

And the program breaks inside the "LUABIND_API void add_overload(..)"
function on the line "if (object overloads = context[name])"

I think it might be something todo with how I'm registering my c++
class. as the call before add_overload in the call stack is
constructor_registration.

	luabind::module(L)
	[
		luabind::class_<IWindow>("IWindow"),
		luabind::class_<Shift::AppWindow, IWindow>("Shift::AppWindow")
			.def(luabind::constructor<unsigned int, unsigned int, bool>())
	];


I think I've built everything right, although if I hadn't I'd expect
linker errors rather than the exception.

Any Ideas?

Thanks,
Phil

General Stuff
Visual Studio 2010, project and luabind built Multi-Threaded (not DLL)

------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World&#153; now supports Android&#153; Apps 
for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev