Hi John,

> lua_yield is a coroutine function, are you running coroutines? If so, then 
> Lua will be swapping lua_States in and out and pausing them whenever it wants 
> to, making the stack seem very strange.

I do (in general), but it's in a completely different part (for
debugging) and is not involved there; so, it's indeed puzzling.

> You're not trying to install event handlers in a coroutine are you? As we 
> discussed, that's always a bad idea.

No; this affects the applications that I debug, but not ZBS itself.
I'm careful not to even open new windows while in coroutines and all
events like this are delayed in the application until it's safe to do
(and is only done in the main thread).

> Did you ever create a wxProgressDialog? The Lua garbage collector may simply 
> be running and finally getting around to deleting it.

No; and that's another puzzling part. I don't use wxProgressDialog at
all. Not sure why it would be deleted...

> Can you rebuild in debug mode? The stack should have line numbers which will 
> clear things up.

That's a good suggestion; I prepared a debug build, but haven't heard
back from the user yet. BTW, the dll is 186M in debug more ;).

> Everything is "normal" up to LuaPCall, but then I presume you're running a 
> coroutine that's calling the lua_yield, and wxLua does use lua_getinfo for a 
> few things so that may be normal, but the lua_close is very wrong unless 
> you're closing a coroutine, perhaps the coroutine had a wxProgressDialog and 
> that's why it's getting deleted at this point? I can't imagine who's calling 
> AddPendingEvent though, are you?

I agree; everything looks "normal" up to that LuaPCall, but very
strange after that. I do have one AddPendingEvent call (and it's in
one of the branches for AddChar event, so it *can* be related), but
definitely not from wxProgressDialog destructor.

Thank you for confirming my suspicions. I'll see if I can get any
additional information from the debug build...

Paul.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to