[vtk-developers] backtrace of segfault in Charts-TestMultipleScalarsToColors on bubbles OSMesa build
Kevin H. Hobbs
hobbsk at ohiou.edu
Mon Nov 1 10:50:17 EDT 2010
On 10/27/2010 02:04 PM, Marcus D. Hanwell wrote:
>
> Thanks Kevin. I don't know of anywhere else where this is failing, but
> thinking about it I don't think we should be calling
> ExtensionSupported until we have an OpenGL context. If you look in the
> TestGLSL.cxx test (in the same directory) I am very careful to test
> for OpenGL features after we get a valid context.
>
Just for grins I added :
renwin->SetSize(800, 640);
renwin->Render(); // This line
vtkOpenGLRenderWindow* openGLRenWin =
vtkOpenGLRenderWindow::SafeDownCast(renwin);
and the test passed.
I made a test program :
#include <stdlib.h>
#include "GL/osmesa.h"
#include "GL/glu.h"
static int Width = 400;
static int Height = 400;
int main( int argc, char * argv[] )
{
//OSMesaContext ctx = OSMesaCreateContext( OSMESA_RGBA, NULL );
void *buffer;
const char *gl_renderer;
buffer = malloc( Width * Height * 4 * sizeof(GLubyte) );
//OSMesaMakeCurrent( ctx, buffer, GL_UNSIGNED_BYTE, Width, Height );
gl_renderer=(const char *)glGetString(GL_VERSION_1_2);
return 0;
}
compiled with :
gcc \
-Xlinker "-rpath=/home/kevin/mesa_osmesa/lib" \
-Lmesa_osmesa/lib/ \
-lOSMesa -lGLU mesatest.c
it segfaults at :
glGetString () at glapi_x86-64.S:9876
just like the VTK test.
With both the OSMesaCreateContext and OSMesaMakeCurrent lines
uncommented it completes successfully.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20101101/cfa93ea2/attachment.sig>
More information about the vtk-developers
mailing list