[luabind] Crash with overloaded functions.
Brought to you by:
arvidn,
daniel_wallin
From: Jens E. <jeg...@la...> - 2003-11-20 10:36:30
|
Hi I am using a CVS version which is about two days old but I am experiencing some crashing. Firstly I constantly experience crashes whenever LuaBind is searching for an overloaded function (in a class) which does not exist. Could anyone please tell me if this is a known bug in the current CVS version. Secondly I have experienced another bug which I suspect may be related. I have three class of the kind: // An abstract class class A { ... void doSomething() = 0; } // a class B which is derived from A: class B : public A { void doSomething() { ... } } // a class C which is derived from B: class C : public B { ... void doMore() { ... } } All three clases have been integrated in LuaBind: luabind::class_<A>(lua, "A"); luabind::class_<B, A>(lua, "B") .def(luabind::constructor<>()) .def("doSomething", &B::doSomething); luabind::class_<C, B>(lua, "C") .def(luabind::constructor<>()) .def("doMore", &C::doMore); Unfortunately LuaBind crashes during binding. The call-stack from VC is: 00000001() boost::function2<int,struct lua_State *,void *,int>::assign_to_own(class boost::function2<int,struct lua_State *,void *,int> const &) + 79 bytes boost::function2<int,struct lua_State *,void *,int>::function2<int,struct lua_State *,void *,int>(class boost::function2<int,struct lua_State *,void *,int> const &) + 44 bytes luabind::detail::overload_rep::overload_rep(struct luabind::detail::overload_rep const &) + 56 bytes luabind::detail::class_rep::add_base_class(const luabind::detail::class_rep::base_info & {...}) line 794 + 12 bytes luabind::class_base::commit(struct lua_State *) + 1014 bytes luabind::class_<class C,struct luabind::bases<class B,class A,struct luabind::detail::null_type,struct luabind::detail::null_type>,struct luabind::detail::unspecified,struct luabind::detail::unspecified>::~class_<class C,struct luabind::bases<class B,class A,struct luabind::detail::null_type,struct luabind::d + ... I seems that j At line 794 in class_rep.cpp is invalid. Could tell me if I am binding correctly and if this is a known bug in LuaBind? - Jens |