MantisBT - VTK
View Issue Details
0010900VTK(No Category)public2010-06-28 05:482010-08-04 15:02
Pietro Cerutti 
François Bertel 
normalcrashalways
closedwon't fix 
 
 
0010900: offscreen context seg-faults with Mesa 7.8.2
vtk-5.6.0 + mesa-7.8.2

Trying to create an off-screen context causes a segv.

==== sphere.cpp ====

#include <vtkSphereSource.h>
#include <vtkPolyDataMapper.h>
#include <vtkActor.h>
#include <vtkProperty.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkWindowToImageFilter.h>
#include <vtkPNGWriter.h>

int main(void)
{

        vtkSphereSource *sphere = vtkSphereSource::New();
        sphere->SetCenter(1.333, 0, 0);
        sphere->SetRadius(0.5);

        vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();
        mapper->SetInput(sphere->GetOutput());

        vtkActor *actor= vtkActor::New();
        actor->SetMapper(mapper);
        actor->GetProperty()->SetColor(0, 1, 0);
        
        vtkRenderer *ren = vtkRenderer::New();
        ren->AddActor(actor);

        vtkRenderWindow *renWin = vtkRenderWindow::New();
        renWin->AddRenderer(ren);
        renWin->SetOffScreenRendering(1);
        renWin->Render();

        vtkWindowToImageFilter *win2img = vtkWindowToImageFilter::New();
        win2img->SetInput(renWin);

        vtkPNGWriter *writer = vtkPNGWriter::New();
        writer->SetInput(win2img->GetOutput());
        writer->SetFileName("sphere.png");
        writer->Write();
}

==== backtrace ====

> gdb ./sphere
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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-marcel-freebsd"...
(gdb) run
Starting program: /usr/home/cerutti/vtk_offscreen/build/sphere
[New LWP 100087]
[New Thread 2aa01140 (LWP 100087)]
Assertion failed: (bufferName == BUFFER_DEPTH || bufferName == BUFFER_STENCIL || fb->Attachment[bufferName].Renderbuffer == NULL), function _mesa_add_renderbuffer, file main/renderbuffer.c, line 1924.

Program received signal SIGABRT, Aborted.
[Switching to Thread 2aa01140 (LWP 100087)]
0x2a8dade7 in kill () from /lib/libc.so.7
(gdb) bt
#0 0x2a8dade7 in kill () from /lib/libc.so.7
#1 0x2a7e5337 in raise () from /lib/libthr.so.3
#2 0x2a8d991a in abort () from /lib/libc.so.7
#3 0x2a8bfdd6 in __assert () from /lib/libc.so.7
#4 0x2945bc3e in _mesa_add_renderbuffer () from /usr/local/lib//libOSMesa32.so.7
#5 0x29411c84 in OSMesaMakeCurrent () from /usr/local/lib//libOSMesa32.so.7
#6 0x2885066a in vtkXOpenGLRenderWindow::MakeCurrent () from /usr/local/lib/vtk-5.6/libvtkRendering.so.5.6
#7 0x28851d63 in vtkXOpenGLRenderWindow::CreateOffScreenWindow () from /usr/local/lib/vtk-5.6/libvtkRendering.so.5.6
#8 0x28851e93 in vtkXOpenGLRenderWindow::Initialize () from /usr/local/lib/vtk-5.6/libvtkRendering.so.5.6
0000009 0x2884d925 in vtkXOpenGLRenderWindow::Start () from /usr/local/lib/vtk-5.6/libvtkRendering.so.5.6
#10 0x2874e8d2 in vtkRenderWindow::DoStereoRender () from /usr/local/lib/vtk-5.6/libvtkRendering.so.5.6
0000011 0x2874e796 in vtkRenderWindow::DoFDRender () from /usr/local/lib/vtk-5.6/libvtkRendering.so.5.6
#12 0x2874ee1d in vtkRenderWindow::DoAARender () from /usr/local/lib/vtk-5.6/libvtkRendering.so.5.6
#13 0x2874da71 in vtkRenderWindow::Render () from /usr/local/lib/vtk-5.6/libvtkRendering.so.5.6
#14 0x2884dfe4 in vtkXOpenGLRenderWindow::Render () from /usr/local/lib/vtk-5.6/libvtkRendering.so.5.6
#15 0x080490b8 in main () at /home/cerutti/vtk_offscreen/sphere.cpp:30
(gdb)
No tags attached.
has duplicate 0011163closed David Partyka ParaView ParaView crashes always SSH'ing into a mesa build 
Issue History
2010-06-28 05:48Pietro CeruttiNew Issue
2010-07-22 07:51Pietro CeruttiNote Added: 0021459
2010-07-22 07:55Pietro CeruttiNote Edited: 0021459
2010-08-04 15:02François BertelStatusbacklog => tabled
2010-08-04 15:02François BertelAssigned To => François Bertel
2010-08-04 15:02François BertelNote Added: 0021650
2010-08-04 15:02François BertelStatustabled => closed
2010-08-04 15:02François BertelResolutionopen => won't fix
2010-08-31 09:34Utkarsh AyachitRelationship addedhas duplicate 0011163
2011-06-16 13:11Zack GalbreathCategory => (No Category)

Notes
(0021459)
Pietro Cerutti   
2010-07-22 07:51   
(edited on: 2010-07-22 07:55)
This is a libosmesa bug, already patched in upstream repository.

Check https://bugs.freedesktop.org/show_bug.cgi?id=10966 [^] for details, and http://cgit.freedesktop.org/mesa/mesa/commit/?id=91c37599f621a0ec498c0f0add14f16470ca852b [^] for the commit.

Please close this bug.

(0021650)
François Bertel   
2010-08-04 15:02   
Mesa bug.