[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: gEDA interview with DJ at DevCon



On Thu, 2010-10-28 at 13:58 -0400, Bob Paddock wrote:
> > KiCad is KiCad of course. Sadly, 3D view crashes when launched here,
> > some kind of X11 / GLX / GL problem. I was trying to debug it and fix it
> > for them (in the spirit of cooperation), but it looks like it might be
> > some nasty WxWidgets internal bug - and I'm not familiar with Wx at all.

> The standard reply to bug reports bug reports is "Recreate the problem
> in the Minimal Sample" and send us a patch and a back trace.
> I went through this cycle yesterday so you can see an example here:
> 
> http://article.gmane.org/gmane.comp.lib.wxwindows.general/71265

Thanks.. its actually kind of a neat idea, although potentially quite
frustrating. Presumably they will accept triage / insight from a bug
even if it isn't demonstrated in a minimal sample though?

With KiCad, I'm not sure what the minimal setup to generate the OpenGL
related error is. Basically the 3D viewer window causes the app to exit
with this error:

The program 'pcbnew' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
  (Details: serial 45001 error_code 9 request_code 137 minor_code 8)


(gdb) bt
#0  gdk_x_error (display=0x849d280, error=0xbfffc84c) at /build/buildd/gtk+2.0-2.22.0/gdk/x11/gdkmain-x11.c:439
#1  0x0022eba9 in _XError (dpy=0x849d280, rep=0x8836aa8) at ../../src/XlibInt.c:1573
#2  0x0022b69a in handle_error (dpy=0x849d280, err=0x849d280, in_XReply=1) at ../../src/xcb_io.c:166
#3  0x0022bddf in _XReply (dpy=0x849d280, rep=0xbfffc9c0, extra=0, discard=0) at ../../src/xcb_io.c:623
#4  0x001dbeac in DRI2SwapBuffers (dpy=0x849d280, drawable=69208555, target_msc=0, divisor=0, remainder=0, count=0xbfffca68) at dri2.c:545
#5  0x001db3a4 in dri2SwapBuffers (pdraw=0x8b313d0, target_msc=0, divisor=0, remainder=0) at dri2_glx.c:553
#6  0x001b4337 in glXSwapBuffers (dpy=0x849d280, drawable=69208555) at glxcmds.c:730
#7  0x00316a2b in wxGLCanvas::SwapBuffers() () from /usr/lib/libwx_gtk2u_gl-2.8.so.0
#8  0x082a5f3e in Pcb3D_GLCanvas::Redraw(bool) ()
#9  0x0829f8e4 in Pcb3D_GLCanvas::OnPaint(wxPaintEvent&) ()
#10 0x00890c2f in wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const () from /usr/lib/libwx_baseu-2.8.so.0


So.. something is upsetting DRI2 / OpenGL.

However.. I fear that active discussion and debugging of KiCad bugs is a
little OT for the geda-user list. I'd love to know what the problem was
though, so I could play with the KiCad 3D viewer and get a feel for what
is good / bad about it, and help inspire my own 3D efforts.


> The two most common problems in wx are people trying to manipulate the
> GUI from other threads.  This can not be done,
> you most post events to the GUI thread.  This is not wx specific
> actually, just a general lack of understanding of how the underling
> system of Windows is not thread safe in many cases.

There is a lot of evil magic in DRI2 / OpenGL getting windows /
pixbufs / etc.. It would be nice if it was just a threading issue, but I
fear more likely is some kind of missing initialisation / proper setup
of visuals. (Certainly some missing error checking at some stage!)

Still, I might take a stab at finding a minimal Wx app which
successfully uses OpenGL and see what looks different with KiCad. Might
also be worth checking out their latest source and making sure they've
not fixed it already!


Best wishes,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user