Please help: vtk & Solaris

Christian Igel igel at neuroinformatik.ruhr-uni-bochum.de
Thu Dec 2 12:50:29 EST 1999


Hi,

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:
        libXm.so.4 =>    /usr/lib/libXm.so.4
        libXext.so.0 =>  /usr/lib/libXext.so.0
        libXt.so.4 =>    /usr/lib/libXt.so.4
        libSM.so.6 =>    /usr/lib/libSM.so.6
        libICE.so.6 =>   /usr/lib/libICE.so.6
        libX11.so.4 =>   /usr/lib/libX11.so.4
        libstdc++.so.2.10.0 =>   /opt/gnu/lib/libstdc++.so.2.10.0
        libm.so.1 =>     /usr/lib/libm.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2

---------------------------------------------
>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 
-lX11
CC = g++
q:	q.o

---------------------------------------------
>cat q.cc
#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();
  renWin->AddRenderer(ren1);
  iren = vtkRenderWindowInteractor::New();
  iren->SetRenderWindow(renWin);

  // create sphere geometry
  sphere = vtkSphereSource::New();
    sphere->SetRadius(1.0);
    sphere->SetThetaResolution(18);
    sphere->SetPhiResolution(18);

  // map to graphics library
  map = vtkPolyDataMapper::New();
    map->SetInput(sphere->GetOutput());

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

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

  // Render an image; since no lights/cameras specified, created automatically
  renWin->Render();

  //  Begin mouse interaction
  iren->Start();
}

---------------------------------------------
> 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
718
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     }
727

---------------------------------------------

Could you please help me to get the software running?

Best regards,
Christian

-----------------------------------------------------------------------------
Christian Igel	      Institut fuer Neuroinformatik, Ruhr-Universitaet Bochum
       http://www.neuroinformatik.ruhr-uni-bochum.de/ini/PEOPLE/igel/top.html




-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list