From: Leandro M. B. <lmb...@gm...> - 2006-06-06 02:19:27
|
Hello again! On 5/29/06, John Labenski <jla...@gm...> 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 |