Re: Crash in wrapper_base.cpp
Drew McLean <[email protected]> Mon, 11 Jul 2011 13:07:26 -0700
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <CAGo0s8Mha=Jhw3N7AdrwZkAqHEApfkGske4u7bAOZv01HwjuFQ@mail.gmail.com> |
>
> Not sure about why you didn't get a Lua stack overflow - where you
> popping the extra off? Perhaps luabind does.
>
Nope, I'm not popping the extra self off of the stack, luabind (or somebody
else) must be doing it somewhere.
Are you still getting the "wrong" objects disappearing in your game - I
> forgot about that bit.
>
Yep, I'm still having that behaviour. I still can't figure out why.
That is strange - I'm pretty sure the call function calls m_self.get(L)
> internally - so somehow having two on the stack makes things work? What
> is the value of whatever got pushed onto the Lua stack? nil sometimes?
>
I think the self value is alright. What seems to be happening is some sort
of side effect that causes the self value to be referenced somewhere and
prevents garbage collection until the VM shuts down. Initially, I thought I
fixed the problem with that extra push but after letting the game run for 10
mins and then quitting it took a while to shut down... it was collecting
everything at that time and there were tons of objects.
> That is weird - there is a C++ constructor bound. And why is it
> constructing objects anyway!?
>
I think the lua constructor should be optional be it seems to cause
different behaviour if absent. I recall seeing something like this as a bug
in another mail thread but I forget where. You are creating 1000 instances
of the lua Item class in you script which extends the C++ class. I actually
renamed the Lua class from Item to LuaItem to clear up that ambiguity.
So I'm not sure where to go from here except to start debugging the Lua and
Luabind code itself. Is there any way of escalating the issue with
Rasterbar? Seems like a really tricky one and I'm low on time to delve into
this sort of thing unless I really have to.
Drew
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user