Good day !
I made a program that uses wxPython. It runs fine on Windows but crashes on Linux.
The error is 'Xlib: unexpected async reply'.
My program uses a thread to update the GUI components.
Is this a wxPython bug ?
yours truly,
Ivar
" Time is the fire in which we burn ... "
Nope--it's a bug in your program 
One must not touch the GUI from auxiliary threads.
I think that this is in the FAQ.... If you want to do something to the
GUI from an auxiliary thread, you can do it indirectly via wxCallAfter.
···
On Mon, Jun 02, 2003 at 01:36:15PM +0800, Ivar N. Marohombsar wrote:
I made a program that uses wxPython. It runs fine on Windows but
crashes on Linux. The error is 'Xlib: unexpected async reply'.
My program uses a thread to update the GUI components.
Is this a wxPython bug ?
--
I wish that I could capitalise punctuation.
To place emphasis on the stop at the end of a sentence.
What does "wxCallAfter" do exactly? I can't find it in the
wxWindows/wxPython docs.
Bryan
···
On Mon, 2003-06-02 at 06:51, Joshua Judson Rosen wrote:
On Mon, Jun 02, 2003 at 01:36:15PM +0800, Ivar N. Marohombsar wrote:
>
> I made a program that uses wxPython. It runs fine on Windows but
> crashes on Linux. The error is 'Xlib: unexpected async reply'.
>
> My program uses a thread to update the GUI components.
>
> Is this a wxPython bug ?
Nope--it's a bug in your program 
One must not touch the GUI from auxiliary threads.
I think that this is in the FAQ.... If you want to do something to the
GUI from an auxiliary thread, you can do it indirectly via wxCallAfter.
thanks for the info...but why does it works on Windows ?
···
----- Original Message -----
From: "Joshua Judson Rosen" <rozzin@geekspace.com>
To: <wxPython-users@lists.wxwindows.org>
Sent: Monday, June 02, 2003 1:51 PM
Subject: Re: [wxPython-users] wxPython on Linux and Windows
It's basically an asynchronous version of `apply'--
`wxCallAfter(func, argtuple)' queues a function-application to be
executed by the event-loop in the main/GUI thread.
If you check the archives of the mail-list, you'll find plenty of
discussion about it 
···
On Mon, Jun 02, 2003 at 10:02:14AM +0100, bryan cole wrote:
What does "wxCallAfter" do exactly? I can't find it in the
wxWindows/wxPython docs.
--
"If it isn't source, it isn't software." --NASA
Ivar N. Marohombsar wrote:
thanks for the info...but why does it works on Windows ?
Because it happens to work on Windows due to different threading models. (I suppose that the Windows native GUI is thread-friendlier than GTK is.) The important point here is that calling GUI code directly from secondary threads cannot be guaranteed to work -- it *might* work sometimes on certain platforms, but will not work from every platform. Since there's no way to ensure that it'll work under an arbitrary platform, it's a very good idea to avoid doing this, on general principle.
Jeff Shannon
Technician/Programmer
Credit International