How to debug AV on garbage collection in luabind::object_rep destruction?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

How to debug AV on garbage collection in luabind::object_rep destruction?

Alexander Gladysh
Hi, all!

Luabind b7, Lua 5.0.2, VC8.

I've found that my application crushes in depths of Luabind with
Access Violation on some circumstances when Lua garbage collection is
invoked either manually or automatically. Is there any hints to help
me to find which of my Luabind-bound objects does that bad thing? Call
stack follows.

Starting from lua_reference::~lua_reference() state (0x03bdc5a0) seems
to be corrupt (almost all members are set to 0xfeeefeee).

Note that I'm using some number of nested coroutines in my
application, this may be (or may be not) related to the source of the

Thanks in advance,


Debug build.

First-chance exception at 0x00828518 in GameSex-d.exe: 0xC0000005:
Access violation reading location 0xfeeeff26.

  Application.exe!lua_rawgeti(lua_State * L=0x03bdc5a0, int
idx=-10000, int n=1)  Line 508 + 0x7 bytes C
  Application.exe!luabind::detail::unref(lua_State * L=0x03bdc5a0, int
ref=109)  Line 169 + 0xf bytes C++
  Application.exe!luabind::detail::lua_reference::reset()  Line 101 +
0x23 bytes C++
Line 60 + 0x2b bytes C++
> Application.exe!luabind::detail::object_rep::~object_rep()  Line 54
+ 0xf bytes C++
  Application.exe!luabind::detail::object_rep::`scalar deleting
destructor'()  + 0x2b bytes C++
* L=0x020ad1e8)  Line 108 C++
  Application.exe!luaD_precall(lua_State * L=0x020ad1e8, lua_TObject *
func=0x020f3eb8)  Line 260 + 0x14 bytes C
  Application.exe!luaD_call(lua_State * L=0x020ad1e8, lua_TObject *
func=0x020f3eb8, int nResults=0)  Line 311 + 0xd bytes C
  Application.exe!do1gcTM(lua_State * L=0x020ad1e8, Udata *
udata=0x0559a950)  Line 413 + 0x15 bytes C
  Application.exe!luaC_callGCTM(lua_State * L=0x020ad1e8)  Line 431 +
0xd bytes C
  Application.exe!luaC_collectgarbage(lua_State * L=0x020ad1e8)  Line
488 + 0x9 bytes C
  Application.exe!lua_setgcthreshold(lua_State * L=0x020ad1e8, int
newthreshold=0)  Line 788 + 0x1d bytes C
  Application.exe!luaB_collectgarbage(lua_State * L=0x020ad1e8)  Line
197 + 0x25 bytes C
  Application.exe!luaD_precall(lua_State * L=0x020ad1e8, lua_TObject *
func=0x020f3e98)  Line 260 + 0x14 bytes C
  Application.exe!luaV_execute(lua_State * L=0x020ad1e8)  Line 627 + 0xd bytes C
  Application.exe!resume(lua_State * L=0x020ad1e8, void *
ud=0x0012f5d8)  Line 344 + 0x9 bytes C
  Application.exe!luaD_rawrunprotected(lua_State * L=0x020ad1e8, void
(lua_State *, void *)* f=0x0082db10, void * ud=0x0012f5d8)  Line 88 +
0xd bytes C
  Application.exe!lua_resume(lua_State * L=0x020ad1e8, int nargs=1)
Line 371 + 0x12 bytes C
  Application.exe!luabind::detail::resume_impl(lua_State *
L=0x020ad1e8, int nargs=1, int __formal=0)  Line 48 + 0xd bytes C++

All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
<a href="$8729&dat1642">$8729&dat1642
luabind-user mailing list
[hidden email]