Re: [wxVTK] BadWindow (invalid Window parameter) - Race Condition?
Brought to you by:
malat
From: Mathieu M. <mat...@gm...> - 2006-06-09 18:48:33
|
Very nice for looking into that issue. I remember this 'magic' --sync option in the past help me find out a couple of bug in the wxGTK code. Could you please open an issue in the bug tracker at: http://sourceforge.net/tracker/?group_id=114757 And if possible enclose the cvs dif: $ cvs -q -u3 -p diff Thanks Mathieu On 6/8/06, Alexander Nip <ale...@gm...> wrote: > Dear All, > > I would like to report what appears to be a race condition and a work > around, just in case I am not alone. I apologize if this has been > covered previously. > > I compiled the CVS version wxVTK on Fedora 4 and linked it dynamically > to the latest versions of VTK and wxGTK. When I executed any of the > sample programs, I would get the following X error and the program would > exit normally: > > The program 'Sample' received an X Window System error. > This probably reflects a bug in the program. > The error was 'BadWindow (invalid Window parameter)'. > (Details: serial 7 error_code 3 request_code 2 minor_code 0) > (Note to programmers: normally, X errors are reported asynchronously; > that is, you will receive the error a while after causing it. > To debug your program, run it with the --sync command line > option to change this behavior. You can then get a meaningful > backtrace from your debugger if you break on the gdk_x_error() > function.) > > However, everything worked just fine as soon as I used the "--sync" > option. So I couldn't really get a useful backtrace from gdb. I did a > little bit of debugging and found that the OnPaint method was fired > prematurely (Skipping the first call and everything would work fine with > or without the --sync switch). I did a bit of web searching and > eventually solved the problem by sticking the following line right > before the Render() call in the OnPaint() method: > > this->SetCurrent(); > > Does this lead to other side effects? At least all Sample programs are > now working normally for me. > > > Alex > > > > _______________________________________________ > Wxvtk-users mailing list > Wxv...@li... > https://lists.sourceforge.net/lists/listinfo/wxvtk-users > -- Mathieu |