Thread: Re: [UFO-devel] Bug#385945: boson: crashes on singleplayer game start
Status: Beta
Brought to you by:
schmidtjf
From: Andreas B. <b_...@gm...> - 2006-09-16 00:04:50
|
On Friday 15 September 2006 21:38, Eddy Petri=C5=9For wrote: [...] > boson: ERROR: [void BosonCanvasRenderer::initGL()] boson requires > GL_EXT_framebuffer_object This is NOT the problem, btw. This error merely exists because this extensi= on=20 might be used by boson without checking whether it actually is available. This may or may not lead to a crash - but in this particular case it is=20 actually harmless. CC'ing boson-devel anyway, cause I think it should be fixed, as apparently = not=20 all drivers implement this extension. > boson: indirect_vertex_array.c:1359: __indirect_glTexCoordPointer: > Assertion `a !=3D ((void *)0)' failed. [...] This is the actual source of the problem. I have done some additional research and have been able to reproduce the bu= g=20 on one of my own machines. It happens with mesa based drivers only. It appears to me that this is a bug in mesa, in particular I believe it is http://www.mail-archive.com/mesa3d-dev%40lists.sourceforge.net/msg00772.html The fact that this problem goes away with libgl1-mesa-dri 6.5.0.cvs.2006052= 4-1=20 seems to confirm that, as current mesa versions don't include the fix yet,= =20 cvs does. However I have no idea how to write around this problem so that it works fo= r=20 broken mesa versions, too. The only way I can see atm is not to use vertex= =20 arrays, but this solution _really_ sucks and would require quite some chang= es=20 to libufo. CC'ing libufo-devel for this problem, maybe some good idea comes up.=20 Additional information for libufo developers: It stems from usage of vertex arrays in libufo, however I have not yet mana= ged=20 to narrow it down to the exact combination of circumstances (meaning I=20 haven't had time to write a few test cases yet). =46rom what I have found by now, I think it happens only when using=20 ufo::UVertexArray with triangles (i.e. not with lines). IIRC it was=20 PE_IndicatorRadioButton in UBasicStyle::paintPrimitive() that triggered the= =20 bug for me.=20 CU Andi |
From: Johannes S. <sch...@us...> - 2006-09-16 08:57:43
|
Le Samedi 16 Septembre 2006 02:06, Andreas Beckermann a =C3=A9crit=C2=A0: [...] > I have done some additional research and have been able to reproduce the > bug on one of my own machines. It happens with mesa based drivers only. It > appears to me that this is a bug in mesa, in particular I believe it is > http://www.mail-archive.com/mesa3d-dev%40lists.sourceforge.net/msg00772.h= tm >l The fact that this problem goes away with libgl1-mesa-dri > 6.5.0.cvs.20060524-1 seems to confirm that, as current mesa versions don't > include the fix yet, cvs does. Hmm, I'm using here libgl1-mesa-dri 6.4.1-0ubuntu8 and can't reproduce the= =20 problem. If you can create a minimal example, please send it to the libufo mailing=20 list. > However I have no idea how to write around this problem so that it works > for broken mesa versions, too. The only way I can see atm is not to use > vertex arrays, but this solution _really_ sucks and would require quite > some changes to libufo. IIRC, the only place where we are using vertex arrays in libufo is in=20 GL_Graphics::drawVertexArray. You could replace the vertex array with plain glBegin, glVertex, glEnd call= s. But using immediate mode is a performance penalty ... (though it shouldn't be too slow, as there are usually only a few vertices= =20 drawn. Compared to a RTS, it's really "low-poly" rendering) The VertexArray object returns interleaved arrays. Looping over all vertice= s=20 with glVertex and glColor should work (but getting OpenGL vertex arrays to= =20 work would certainly be better). Send me an email if you need help with that ... > CC'ing libufo-devel for this problem, maybe some good idea comes up. > Additional information for libufo developers: > It stems from usage of vertex arrays in libufo, however I have not yet > managed to narrow it down to the exact combination of circumstances > (meaning I haven't had time to write a few test cases yet). > From what I have found by now, I think it happens only when using > ufo::UVertexArray with triangles (i.e. not with lines). IIRC it was > PE_IndicatorRadioButton in UBasicStyle::paintPrimitive() that triggered t= he > bug for me. It's strange that this occurs only with triangles ... Best, Johannes |
From: Andreas B. <b_...@gm...> - 2006-09-17 13:15:42
Attachments:
glxinfo.txt
history.txt
|
(Removing the CC's cause this is imho relevant to libufo-devel only) On Saturday 16 September 2006 10:58, Johannes Schmidt wrote: > Le Samedi 16 Septembre 2006 02:06, Andreas Beckermann a écrit : > [...] > > > I have done some additional research and have been able to reproduce the > > bug on one of my own machines. It happens with mesa based drivers only. > > It appears to me that this is a bug in mesa, in particular I believe it > > is > > http://www.mail-archive.com/mesa3d-dev%40lists.sourceforge.net/msg00772.h > >tm l The fact that this problem goes away with libgl1-mesa-dri > > 6.5.0.cvs.20060524-1 seems to confirm that, as current mesa versions > > don't include the fix yet, cvs does. > > Hmm, I'm using here libgl1-mesa-dri 6.4.1-0ubuntu8 and can't reproduce the > problem. > If you can create a minimal example, please send it to the libufo mailing > list. Sure: current libufo cvs, ufo-0.5/test/buttons.cpp Attached is a log, including a backtrace and my glxinfo output. If this crash does not happen on your system - maybe ubunto has patched it's mesa to include the fix? > > However I have no idea how to write around this problem so that it works > > for broken mesa versions, too. The only way I can see atm is not to use > > vertex arrays, but this solution _really_ sucks and would require quite > > some changes to libufo. > > IIRC, the only place where we are using vertex arrays in libufo is in > GL_Graphics::drawVertexArray. > You could replace the vertex array with plain glBegin, glVertex, glEnd > calls. But using immediate mode is a performance penalty ... I doubt that the difference is measurable considering the size of the arrays (usually < 10 vertices) used by libufo > It's strange that this occurs only with triangles ... It's a strange bug > Best, > Johannes CU Andi |
From: Johannes S. <sch...@us...> - 2006-09-17 14:31:15
|
Le Dimanche 17 Septembre 2006 15:16, Andreas Beckermann a =C3=A9crit=C2=A0: > > Hmm, I'm using here libgl1-mesa-dri 6.4.1-0ubuntu8 and can't reproduce > > the problem. > > If you can create a minimal example, please send it to the libufo maili= ng > > list. > > Sure: > current libufo cvs, ufo-0.5/test/buttons.cpp > > Attached is a log, including a backtrace and my glxinfo output. > If this crash does not happen on your system - maybe ubunto has patched > it's mesa to include the fix? Ahh, sorry, didn't see that only indirect Mesa rendering is affected. It's the same bug in Ubuntu. I have added a work-around to CVS which removes the glPopClientAttrib call = and=20 restores the necessary client attributes manually. See=20 src/gl/ugl_graphics.cpp and include/ufo/gl/ugl_prototypes.hpp (for=20 glEnable,DisableClientState). This fixes the bug for my system. Regards, Johannes |
From: Andreas B. <b_...@gm...> - 2006-09-17 15:09:15
|
On Sunday 17 September 2006 16:31, Johannes Schmidt wrote: > Le Dimanche 17 Septembre 2006 15:16, Andreas Beckermann a écrit : > > > Hmm, I'm using here libgl1-mesa-dri 6.4.1-0ubuntu8 and can't reproduce > > > the problem. > > > If you can create a minimal example, please send it to the libufo > > > mailing list. > > > > Sure: > > current libufo cvs, ufo-0.5/test/buttons.cpp > > > > Attached is a log, including a backtrace and my glxinfo output. > > If this crash does not happen on your system - maybe ubunto has patched > > it's mesa to include the fix? > > Ahh, sorry, didn't see that only indirect Mesa rendering is affected. > It's the same bug in Ubuntu. > > I have added a work-around to CVS which removes the glPopClientAttrib call > and restores the necessary client attributes manually. See > src/gl/ugl_graphics.cpp and include/ufo/gl/ugl_prototypes.hpp (for > glEnable,DisableClientState). > This fixes the bug for my system. Yep, works great here, too, thanks a lot :-) > Regards, > Johannes CU Andi |