Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1208236352 (LWP 25396)] 0x00fa4afb in run_texnorm_stage (ctx=0x8ce54e0, stage=0x8e81b58) at savagerender.c:251 251 GLboolean normalizeS = (texObj->WrapS == GL_REPEAT); (gdb) print texObj $1 = (struct gl_texture_object *) 0x0 (gdb) print reallyEnabled $2 = 0 (gdb) print i $3 = 1
is this you asking for ? anything that I can do ? And this patch works! yes Thanks, On Sat, 2005-11-19 at 07:41 -0700, Brian Paul wrote: > Can you print the value of nearby local vars, such as 'texObj', > 'reallyEnabled' and 'i'? > > I bet a patch along the lines of what I've attached might fix the problem. > > -Brian > > Sergio Monteiro Basto wrote: > > Hi, > > with Mesa CVS no luck > > just a better debug > > Program received signal SIGSEGV, Segmentation fault. > > [Switching to Thread -1208609088 (LWP 21869)] > > 0x00ae0b1b in run_texnorm_stage (ctx=0x8a404e0, stage=0x8bdcb58) at > > savagerender.c:251 > > 251 GLboolean normalizeS = (texObj->WrapS == GL_REPEAT); > > (gdb) bt > > #0 0x00ae0b1b in run_texnorm_stage (ctx=0x8a404e0, stage=0x8bdcb58) at > > savagerender.c:251 > > #1 0x00b7dabd in _tnl_run_pipeline (ctx=0x8a404e0) at tnl/t_pipeline.c:162 > > #2 0x00adbe5a in savageRunPipeline (ctx=0x8a404e0) at savagetris.c:806 > > #3 0x00b8475d in _tnl_playback_vertex_list (ctx=0x8a404e0, data=0x8da0cac) > > at tnl/t_save_playback.c:209 > > #4 0x00b00036 in execute_list (ctx=0x8a404e0, list=1) at main/dlist.c:5678 > > #5 0x00b03a9a in _mesa_CallList (list=1) at main/dlist.c:6746 > > #6 0x00b72d8b in neutral_CallList (i=1) at main/vtxfmt_tmp.h:304 > > #7 0x08052d41 in DisplayFunc () at billard3d.c:3015 > > #8 0x080821d7 in handle_display_event () at sys_stuff.c:90 > > #9 0x00121a91 in processWindowWorkList (window=0x8a3a648) at > > glut_event.c:1297 > > #10 0x00122a9b in glutMainLoop () at glut_event.c:1344 > > #11 0x0805819f in main (argc=1, argv=0xbfe83c24) at billard3d.c:5194 > > > > > > On Sun, 2005-11-13 at 21:48 +0000, Sergio Monteiro Basto wrote: > > > >>Hi, > >>Today, I test chromium, tuxracer and foobillard and none of then runs > >>try to dig with gdb and all stop on run_texnorm_stage() > >> > >>here is the debug with backtrace: > >> > >>Program received signal SIGFPE, Arithmetic exception. > >>[Switching to Thread -1208801600 (LWP 12723)] > >>0x00ec8a80 in _mesa_test_os_sse_exception_support () from > >>/usr/X11R6/lib/modules/dri/savage_dri.so > >>(gdb) cont > >>Continuing. > >> > >>Program received signal SIGSEGV, Segmentation fault. > >>0x00ed575b in run_texnorm_stage () from > >>/usr/X11R6/lib/modules/dri/savage_dri.so > >>Program received signal SIGFPE, Arithmetic exception. > >>[Switching to Thread -1208904000 (LWP 3049)] > >>0x00c29a80 in _mesa_test_os_sse_exception_support () from > >>/usr/X11R6/lib/modules/dri/savage_dri.so > >>(gdb) cont > >>Continuing. > >> > >>Program received signal SIGSEGV, Segmentation fault. > >>0x00c3675b in run_texnorm_stage () from > >>/usr/X11R6/lib/modules/dri/savage_dri.so > >>(gdb) bt > >>#0 0x00c3675b in run_texnorm_stage () from > >>/usr/X11R6/lib/modules/dri/savage_dri.so > >>#1 0x00be2a84 in _tnl_run_pipeline () from > >>/usr/X11R6/lib/modules/dri/savage_dri.so > >>#2 0x00c462e9 in savageRunPipeline () from > >>/usr/X11R6/lib/modules/dri/savage_dri.so > >>#3 0x00be7ce6 in _tnl_playback_vertex_list () from > >>/usr/X11R6/lib/modules/dri/savage_dri.so > >>#4 0x00b1f862 in execute_list () from > >>/usr/X11R6/lib/modules/dri/savage_dri.so > >>#5 0x00b1fc5c in _mesa_CallList () from > >>/usr/X11R6/lib/modules/dri/savage_dri.so > >>#6 0x08052d41 in DisplayFunc () at billard3d.c:3015 > >>#7 0x080821d7 in handle_display_event () at sys_stuff.c:90 > >>#8 0x00121a91 in processWindowWorkList (window=0x9f82650) at > >>glut_event.c:1297 > >>#9 0x00122a9b in glutMainLoop () at glut_event.c:1344 > >>#10 0x0805819f in main (argc=1, argv=0xbf93bec4) at billard3d.c:5194 > >> > > plain text document attachment (savage.patch) > Index: savagerender.c > =================================================================== > RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/savage/savagerender.c,v > retrieving revision 1.5.2.1 > diff -u -r1.5.2.1 savagerender.c > --- savagerender.c 31 Oct 2005 21:53:17 -0000 1.5.2.1 > +++ savagerender.c 19 Nov 2005 14:40:22 -0000 > @@ -248,55 +248,57 @@ > for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) { > GLuint reallyEnabled = ctx->Texture.Unit[i]._ReallyEnabled; > struct gl_texture_object *texObj = ctx->Texture.Unit[i]._Current; > - GLboolean normalizeS = (texObj->WrapS == GL_REPEAT); > - GLboolean normalizeT = (reallyEnabled & TEXTURE_2D_BIT) && > - (texObj->WrapT == GL_REPEAT); > - GLfloat *in = (GLfloat *)VB->TexCoordPtr[i]->data; > - GLint instride = VB->TexCoordPtr[i]->stride; > - GLfloat (*out)[4] = store->texcoord[i].data; > - GLint j; > - > - if (!ctx->Texture.Unit[i]._ReallyEnabled || > - VB->TexCoordPtr[i]->size == 4) > - /* Never try to normalize homogenous tex coords! */ > - continue; > - > - if (normalizeS && normalizeT) { > - /* take first texcoords as rough estimate of mean value */ > - GLfloat correctionS = -floor(in[0]+0.5); > - GLfloat correctionT = -floor(in[1]+0.5); > - for (j = 0; j < VB->Count; ++j) { > - out[j][0] = in[0] + correctionS; > - out[j][1] = in[1] + correctionT; > - in = (GLfloat *)((GLubyte *)in + instride); > - } > - } else if (normalizeS) { > - /* take first texcoords as rough estimate of mean value */ > - GLfloat correctionS = -floor(in[0]+0.5); > - if (reallyEnabled & TEXTURE_2D_BIT) { > - for (j = 0; j < VB->Count; ++j) { > - out[j][0] = in[0] + correctionS; > - out[j][1] = in[1]; > - in = (GLfloat *)((GLubyte *)in + instride); > - } > - } else { > - for (j = 0; j < VB->Count; ++j) { > - out[j][0] = in[0] + correctionS; > - in = (GLfloat *)((GLubyte *)in + instride); > - } > - } > - } else if (normalizeT) { > - /* take first texcoords as rough estimate of mean value */ > - GLfloat correctionT = -floor(in[1]+0.5); > - for (j = 0; j < VB->Count; ++j) { > - out[j][0] = in[0]; > - out[j][1] = in[1] + correctionT; > - in = (GLfloat *)((GLubyte *)in + instride); > - } > - } > + if (reallyEnabled && texObj) { > + GLboolean normalizeS = (texObj->WrapS == GL_REPEAT); > + GLboolean normalizeT = (reallyEnabled & TEXTURE_2D_BIT) && > + (texObj->WrapT == GL_REPEAT); > + GLfloat *in = (GLfloat *)VB->TexCoordPtr[i]->data; > + GLint instride = VB->TexCoordPtr[i]->stride; > + GLfloat (*out)[4] = store->texcoord[i].data; > + GLint j; > + > + if (!ctx->Texture.Unit[i]._ReallyEnabled || > + VB->TexCoordPtr[i]->size == 4) > + /* Never try to normalize homogenous tex coords! */ > + continue; > + > + if (normalizeS && normalizeT) { > + /* take first texcoords as rough estimate of mean value */ > + GLfloat correctionS = -floor(in[0]+0.5); > + GLfloat correctionT = -floor(in[1]+0.5); > + for (j = 0; j < VB->Count; ++j) { > + out[j][0] = in[0] + correctionS; > + out[j][1] = in[1] + correctionT; > + in = (GLfloat *)((GLubyte *)in + instride); > + } > + } else if (normalizeS) { > + /* take first texcoords as rough estimate of mean value */ > + GLfloat correctionS = -floor(in[0]+0.5); > + if (reallyEnabled & TEXTURE_2D_BIT) { > + for (j = 0; j < VB->Count; ++j) { > + out[j][0] = in[0] + correctionS; > + out[j][1] = in[1]; > + in = (GLfloat *)((GLubyte *)in + instride); > + } > + } else { > + for (j = 0; j < VB->Count; ++j) { > + out[j][0] = in[0] + correctionS; > + in = (GLfloat *)((GLubyte *)in + instride); > + } > + } > + } else if (normalizeT) { > + /* take first texcoords as rough estimate of mean value */ > + GLfloat correctionT = -floor(in[1]+0.5); > + for (j = 0; j < VB->Count; ++j) { > + out[j][0] = in[0]; > + out[j][1] = in[1] + correctionT; > + in = (GLfloat *)((GLubyte *)in + instride); > + } > + } > > - if (normalizeS || normalizeT) > - VB->AttribPtr[VERT_ATTRIB_TEX0+i] = VB->TexCoordPtr[i] = > &store->texcoord[i]; > + if (normalizeS || normalizeT) > + VB->AttribPtr[VERT_ATTRIB_TEX0+i] = VB->TexCoordPtr[i] = > &store->texcoord[i]; > + } > } > > return GL_TRUE; -- Sérgio M.B.
smime.p7s
Description: S/MIME cryptographic signature