From: John L. <jla...@gm...> - 2006-06-08 09:30:52
|
Thanks for the sample. I had inadvertently broken coroutines when I made the require code work. I've added the sample as coroutine.wx.lua and the next snapshot should work for you. I'd update the snapshot right now, but sourceforge seems to be having some problems with their ssh server, "ssh_exchange_identification: Connection closed by remote host"??? Thanks, John Labenski ps. You can use the wxLuaFreeze program to run wxLua programs from the command line if you don't want to bother with the c++ side. The wxLua app can also do it. $wxlua[freeze] mywxluaprogram.lua On 6/4/06, Leandro Motta Barros <lmb...@gm...> wrote: > On 6/4/06, Leandro Motta Barros <lmb...@gm...> wrote: > > 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 > > 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 > Wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |