[Qt-interest] SIGSEGV at QGLShaderProgram::addShaderFromSourceCode

Josiah Bryan jbryan at productiveconcepts.com
Wed Oct 27 16:24:37 CEST 2010


Samuel Rødal wrote:
> On 10/18/2010 10:28 PM, ext Josiah Bryan wrote:
>> I've got an odd case where my program SIGSEGVs at
>> QGLShaderProgram::addShaderFromSourceCode(), even though
>> QGLShaderProgram::hasOpenGLShaderPrograms() returns true.
>>
>> The addShader... call is the line my code calls, but the SIGSEGV hits
>> deeper in Qt. Stack trace in gdb points to qglsahderprogram.cpp:610 at
>> the top of the stack when SIGSEGV hits, and that line is just a
>> Q_D(QGLShaderProgram) statement...so I'm stuck as to why I'm getting the
>> SIGSEGV.
> Does glxinfo list GL_ARB_fragment_shader and GL_ARB_vertex_shader? Those 
> are needed for GLSL shader support.

I have no idea - I didn't check. I assumed that 
QGLShaderProgram::hasOpenGLShaderPrograms() did the necessary checks to 
make sure that shaders could be used - and that function does indeed 
return a true value. Obviously, if it had returned 'false', then I could 
rightly expect a crash if I ignored it and went ahead and used shaders - 
but its returning 'true' - and still crashing. Puzzling indeed...

-- 

-=-=-=-=-=-=-=-=-=-=-=-=-
Josiah Bryan
Productive Concepts, Inc.
jbryan at pciint.com
(765) 964-6009, ext. 224




More information about the Qt-interest-old mailing list