|
From: Daniel A. <mr....@gm...> - 2009-07-28 22:59:13
|
I'm having lockups when I try to pull an http page using wxURL. It gets stuck at GetInputStream but then appears to work fine after right clicking on the systray icon... I believe it may be the threads issues that are described on this page: http://wiki.wxwidgets.org/WxURL quote: "Under Windows, wxURL and wxThread may have problems to work well together. Be sure to construct the wxURL and call wxURL::GetInputStream inside the main thread." function get_games() local url = wx.wxURL("http://fly.thruhere.net/status/games.json") local stream = url:GetInputStream() -- freezes here -- frees up if you right click on the systray icon local size = stream:GetSize() local data = stream:Read(size) return data end |
|
From: John L. <jla...@gm...> - 2009-07-29 03:59:32
|
On Tue, Jul 28, 2009 at 6:59 PM, Daniel Aquino<mr....@gm...> wrote: > I'm having lockups when I try to pull an http page using wxURL. > > It gets stuck at GetInputStream but then appears to work fine after > right clicking on the systray icon... I assume you are under MS Windows? XP? > I believe it may be the threads issues that are described on this page: > > http://wiki.wxwidgets.org/WxURL > > quote: "Under Windows, wxURL and wxThread may have problems to work > well together. Be sure to construct the wxURL and call > wxURL::GetInputStream inside the main thread." wxLua always runs everything in the main thread unless you have created another thread. I don't get any delays running your code in MS Windows XP using wxlua.exe, wxluafreeze.exe, and wxluaedit.exe. They all get a size of 4 and the stream is: "{ } " Regards, John |
|
From: Daniel A. <mr....@gm...> - 2009-07-30 00:00:58
|
which version are you running ? I could only find binaries for 2.8.7 but wxlua is up to 2.8.10... It still happens even when I comment out all other code... On Tue, Jul 28, 2009 at 11:59 PM, John Labenski<jla...@gm...> wrote: > On Tue, Jul 28, 2009 at 6:59 PM, Daniel Aquino<mr....@gm...> wrote: >> I'm having lockups when I try to pull an http page using wxURL. >> >> It gets stuck at GetInputStream but then appears to work fine after >> right clicking on the systray icon... > > I assume you are under MS Windows? XP? > >> I believe it may be the threads issues that are described on this page: >> >> http://wiki.wxwidgets.org/WxURL >> >> quote: "Under Windows, wxURL and wxThread may have problems to work >> well together. Be sure to construct the wxURL and call >> wxURL::GetInputStream inside the main thread." > > wxLua always runs everything in the main thread unless you have > created another thread. > > I don't get any delays running your code in MS Windows XP using > wxlua.exe, wxluafreeze.exe, and wxluaedit.exe. They all get a size of > 4 and the stream is: > > "{ > } > " > > Regards, > John > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
|
From: John L. <jla...@gm...> - 2009-07-30 00:29:54
|
On Wed, Jul 29, 2009 at 8:00 PM, Daniel Aquino<mr....@gm...> wrote: > which version are you running ? I use 2.8.10. > I could only find binaries for 2.8.7 but wxlua is up to 2.8.10... You can download them here, note that 2.8.10 is in the middle since it sorts by name and not by when it was uploaded, apparently. http://sourceforge.net/projects/wxlua/files/ > It still happens even when I comment out all other code... Weird, but definitely try the 2.8.10 since I remember some posts to the wxWidgets development list about changes to the socket code a while back and so your problem may be fixed. Regards, John |
|
From: Daniel A. <mr....@gm...> - 2009-08-01 01:56:08
|
Works now thanks! On Wed, Jul 29, 2009 at 8:29 PM, John Labenski<jla...@gm...> wrote: > On Wed, Jul 29, 2009 at 8:00 PM, Daniel Aquino<mr....@gm...> wrote: >> which version are you running ? > > I use 2.8.10. > >> I could only find binaries for 2.8.7 but wxlua is up to 2.8.10... > > You can download them here, note that 2.8.10 is in the middle since it > sorts by name and not by when it was uploaded, apparently. > > http://sourceforge.net/projects/wxlua/files/ > >> It still happens even when I comment out all other code... > > Weird, but definitely try the 2.8.10 since I remember some posts to > the wxWidgets development list about changes to the socket code a > while back and so your problem may be fixed. > > Regards, > John > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |