Please help: vtk & Solaris

Christian Igel igel at
Thu Dec 2 12:50:29 EST 1999


I wanted to evaluate vtk2.4 for Unix. But when I tried to run the example c++ 
programs, they exited with segmentation faults (directly).

Here comes information about the system and the test file (called q):

>uname -a
SunOS foo 5.7 Generic_106541-08 sun4u sparc

>ldd q: =>    /usr/lib/ =>  /usr/lib/ =>    /usr/lib/ =>    /usr/lib/ =>   /usr/lib/ =>   /usr/lib/ =>   /opt/gnu/lib/ =>     /usr/lib/ =>     /usr/lib/ =>        /usr/lib/ =>   /usr/lib/ =>    /usr/lib/ =>    /usr/lib/

>g++ -v
Reading specs from /opt/gnu/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs
gcc version 2.95.2 19991024 (release)

>cat Makefile
CPPFLAGS = -I../common
LDFLAGS  = -L../lib -R../lib
LDLIBS = -lVTKGraphics -lVTKImaging -lVTKCommon -lm -lXm -lXext -lXt -lSM -lICE 
CC = g++
q:	q.o

#include "vtk.h"

main ()
  vtkRenderWindow *renWin;
  vtkRenderer *ren1;
  vtkRenderWindowInteractor *iren;
  vtkSphereSource *sphere;
  vtkPolyDataMapper *map;
  vtkActor *aSphere;

  // create a window, renderer and interactor
  renWin = vtkRenderWindow::New();
  ren1 = vtkRenderer::New();
  iren = vtkRenderWindowInteractor::New();

  // create sphere geometry
  sphere = vtkSphereSource::New();

  // map to graphics library
  map = vtkPolyDataMapper::New();

  // actor coordinates geometry, properties, transformation
  aSphere = vtkActor::New();
    aSphere->GetProperty()->SetColor(0,0,1); // sphere color blue

  ren1->SetBackground(1,1,1); // Background color white

  // Render an image; since no lights/cameras specified, created automatically

  //  Begin mouse interaction

> gdb ./q
GNU gdb 4.18
Copyright 1998 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 "sparc-sun-solaris2.7"...
(gdb) run
Starting program: /home/tmp/igel/vtk2.4/test/./q 

Program received signal SIGSEGV, Segmentation fault.
vtkRenderWindow::AddRenderer (this=0x0, ren=0x19e688)
    at vtkRenderWindow.cxx:723
723       this->MakeCurrent();
Current language:  auto; currently c++
(gdb) list
719     // Add a renderer to the list of renderers.
720     void vtkRenderWindow::AddRenderer(vtkRenderer *ren)
721     {
722       // we are its parent
723       this->MakeCurrent();
724       ren->SetRenderWindow(this);
725       this->Renderers->AddItem(ren);
726     }


Could you please help me to get the software running?

Best regards,

Christian Igel	      Institut fuer Neuroinformatik, Ruhr-Universitaet Bochum

This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.

More information about the vtkusers mailing list