Here's the original bug report.


Roger E Critchlow Jr ([EMAIL PROTECTED]) wrote:

> Hi -
> 
>   I'm building a SWIG wrapped opengl extension for Tcl/Tk, using Mesa
> as my opengl surrogate on Linux.
> 
>   When I implemented exception handling, I mistakenly called
> glGetError() after every call into Mesa.  But glGetError() isn't
> allowed between glBegin() and glEnd().
> 
>   The result is appended, the code is building a face model out of
> triangles so there were lots of invalid calls to glGetError() with the
> vertices, normals, and texture coordinates.
> 
>   I suppose I should look at the source and see if you intentionally
> dumped core, but my reading is that glGetError() should continue
> returning zero until glEnd() and then return GL_INVALID_OPERATION.
> Seems sort of bizarre to deliberately obfuscate the source of the
> error this way, but I suppose they knew what they wanted when they
> wrote the spec.


And later wrote:
> 
> Here's a stack trace of the crash.  Let me know if you need anything
> else.  This is with 3.1b2 configured for linux-386-elf with -g added
> to the CFLAGS.
> 
> -- rec --
> 
> [rec@elf115 demos]$ LD_LIBRARY_PATH=/packages/Mesa-3.1/lib:$LD_LIBRARY_PATH
> gdb /usr/local/bin/wish8.1
> GNU gdb 4.17
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i386-redhat-linux"...
> (gdb) pwd
> Working directory /home/elf1/windows/frustum-1.0/demos.
> (gdb) run skin-browse.tcl
> Starting program: /usr/local/bin/wish8.1 skin-browse.tcl
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> Mesa user error: GL_INVALID_OPERATION in glGetError
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x40382a4b in gl_depth_test_span_less (ctx=0x80f2038, n=51, x=353, y=404,
> z=0xbfffc8b0,
>     mask=0xbfff5c40 '\001' <repeats 51 times>) at depth.c:365
> 365              if (z[i] < zptr[i]) {
> (gdb) where
> #0  0x40382a4b in gl_depth_test_span_less (ctx=0x80f2038, n=51, x=353,
> y=404, z=0xbfffc8b0,
>     mask=0xbfff5c40 '\001' <repeats 51 times>) at depth.c:365
> #1  0x403eae2f in gl_write_texture_span (ctx=0x80f2038, n=51, x=353, y=404,
> z=0xbfffc8b0, s=0xbfff96b0, t=0xbfff7db0,
>     u=0xbfff64b0, lambda=0x0, rgbaIn=0xbfffafb0, spec=0x0,
> primitive=GL_POLYGON) at span.c:784
> #2  0x4040f9b5 in general_textured_triangle (ctx=0x80f2038, v0=1, v1=2,
> v2=3, pv=3) at tritemp.h:941
> #3  0x40357dc5 in render_vb_triangles_raw (VB=0x8104470, start=1, count=4,
> parity=0) at render_tmp.h:116
> #4  0x40356ce6 in gl_render_vb (VB=0x8104470) at vbrender.c:587
> #5  0x40352478 in do_render (VB=0x8104470) at pipeline.c:579
> #6  0x40351fe1 in gl_run_pipeline (VB=0x8104470, type=1) at pipeline.c:1236
> #7  0x40359b00 in gl_execute_cassette (ctx=0x80f2038, IM=0x810cb40, pipe=1)
> at vbxform.c:829
> #8  0x4035a042 in gl_flush_vb (ctx=0x80f2038, where=0x4045b9a4
> "glGetError") at vbxform.c:73
> #9  0x40380f64 in gl_GetError (ctx=0x80f2038) at context.c:1676
> #10 0x40363e41 in glGetError () at api1.c:1257
> #11 0x402eebb2 in myGlError (interp=0x804a038) at opengl_wrap.c:589
> #12 0x402f176c in _wrap_glVertex3d (clientData=0x0, interp=0x804a038,
> argc=4, argv=0xbfffd734) at opengl_wrap.c:2557
> #13 0x400d8905 in TclInvokeStringCommand ()
> #14 0x400f1f50 in TclExecuteByteCode ()
> #15 0x400d92ac in Tcl_EvalObjEx ()
> #16 0x4011317c in TclObjInterpProc ()
> #17 0x400f1f50 in TclExecuteByteCode ()
> #18 0x400d92ac in Tcl_EvalObjEx ()
> #19 0x40112bf6 in Tcl_UplevelObjCmd ()
> #20 0x400f1f50 in TclExecuteByteCode ()
> #21 0x400d92ac in Tcl_EvalObjEx ()
> #22 0x4011317c in TclObjInterpProc ()
> #23 0x400f1f50 in TclExecuteByteCode ()
> #24 0x400d92ac in Tcl_EvalObjEx ()
> #25 0x4011317c in TclObjInterpProc ()
> #26 0x400f1f50 in TclExecuteByteCode ()
> #27 0x400d92ac in Tcl_EvalObjEx ()
> #28 0x4011317c in TclObjInterpProc ()
> #29 0x400f1f50 in TclExecuteByteCode ()
> #30 0x400d92ac in Tcl_EvalObjEx ()
> #31 0x40054904 in TkInvokeButton (butPtr=0x80bd528) at
> ./../generic/tkButton.c:1457
> #32 0x40053dc0 in ButtonWidgetObjCmd (clientData=0x80bd528,
> interp=0x804a038, objc=2, objv=0x804acbc)
>     at ./../generic/tkButton.c:835
> #33 0x400f1f50 in TclExecuteByteCode ()
> #34 0x400d92ac in Tcl_EvalObjEx ()
> #35 0x40112bf6 in Tcl_UplevelObjCmd ()
> #36 0x400f1f50 in TclExecuteByteCode ()
> #37 0x400d92ac in Tcl_EvalObjEx ()
> #38 0x4011317c in TclObjInterpProc ()
> #39 0x4010c14a in EvalObjv ()
> #40 0x4010c842 in Tcl_EvalEx ()
> #41 0x4010ca2a in Tcl_Eval ()
> #42 0x400da810 in Tcl_GlobalEval ()
> #43 0x4001f35f in Tk_BindEvent (bindingTable=0x806ad70, eventPtr=0x80ec7d0,
> tkwin=0x80e1e78, numObjects=0,
>     objectPtr=0xbffffa5c) at ./../generic/tkBind.c:1782
> #44 0x4002435f in TkBindEventProc (winPtr=0x80e1e78, eventPtr=0x80ec7d0) at
> ./../generic/tkCmds.c:245
> #45 0x4002a4ae in Tk_HandleEvent (eventPtr=0x80ec7d0) at
> ./../generic/tkEvent.c:709
> #46 0x4002a8e1 in WindowEventProc (evPtr=0x80ec7c8, flags=-3) at
> ./../generic/tkEvent.c:1044
> #47 0x4010a177 in Tcl_ServiceEvent ()
> #48 0x4010a389 in Tcl_DoOneEvent ()
> #49 0x4002a974 in Tk_MainLoop () at ./../generic/tkEvent.c:1102
> #50 0x40035520 in Tk_MainEx (argc=2, argv=0xbffffca8, appInitProc=0x8048838
> <Tcl_AppInit>, interp=0x804a038)
>     at ./../generic/tkMain.c:277
> #51 0x804882b in main (argc=2, argv=0xbffffca4) at ./tkAppInit.c:54


_______________________________________________
Mesa-dev maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev

Reply via email to