On 6/4/06, Leandro Motta Barros <[EMAIL PROTECTED]> wrote:
> Hello again!
>
> On 5/29/06, John Labenski <[EMAIL PROTECTED]> wrote:
> > [...]
> > Try unremming the wxPrintf statement in wxLuaState_newthread_handler
> > in modules/wxlua/src/wxlstate.cpp and see if that gets run when the
> > coroutine is created. We had to make changes for running wxLua as a
> > lua module for require, maybe it's broken now.
>
> I did it, and 'wxLuaState_newthread_handler()' *is* being called.
>
> > [...]
>
> > ps. could you send a little coroutine code to show the problem, we
> > could add it as a sample in wxLua to help verify that they still work.
> > I seem to have lost my little sample.
>
> Here it is: http://www.stackedboxes.org/~lmb/Balaio/wxLuaIdleCoroutine.zip
>
> Now, running this example I found some information that may help
> finding what's going wrong. Here are some notes about this:
>
> 1. This example works with the wxLua version I was using before
> starting to have problems (CVS 2006-04-14). (Just need to change
> 'Connect' to 'ConnectEvent', and make it look for the 'wxluasetup.h'
> in the (im)proper place).
>
> 2. All other tests made with wxLua Snapshot 2006-06-03.
>
> 3. Running the example as is, I get the following output in the console:
>
> wxLuaState_newthread_handler L 135088648 L1 135631296, L_wxlsdata
> 135086608 L1_wxlsdata 135567808
> lua: Error while running chunk
> app.lua:41: attempt to call method 'Connect' (a userdata value)
> stack traceback:
>         app.lua:41: in function 'new'
>         app.lua:91: in function <app.lua:80>
>
> (notice that 'wxLuaState_newthread_handler()' is called)
>
> 4. So, the error happens in the "main thread", not inside the
> coroutine. This means that the problem is not where I thought it
> was... (before this, in my application, I was getting the same error,
> but it was happening (coincidentally?) from inside the coroutine
> code).
>
> 5. I tried to comment out the code that creates the coroutine (and the
> asserts I added to check if a coroutine is passed to the
> 'ProgressWindow') and run the program again, just to see where the
> error would happen. The call to 'Connect' succeeded

Sorry... "send" looks so much like "save" :-)  I still have a final comment...

6. So, I guess that when the coroutine is created, something is done
that confuses further calls to wxLua. I haven't checked the wxLua
implementation, but from these tests, I think my conclusion makes some
sense.

That's it for now. Feel free to ask for further tests. As I said, I'll
be busy for some more time, but I can do something whenever I find
some space in my schedule ;-)

Thanks for all,

LMB


_______________________________________________
Wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to