[vtkusers] trivial SEGV with nightly build on Bull

Luke J West ljw at noc.soton.ac.uk
Fri Dec 8 10:03:51 EST 2006


/*
 This (pretty) trivial file compiles fine under the nightly build
 and even pops up a window, but the moment I try and
 interact with it, it SEGV's (yikes!).

 It works fine under older versions. Does anyone have any suggestions?
 I'm running on a Bull novascale with RedHat. Please shout if I need to
 supply more info.

 Thanks,

 Luke
 */

#include "vtkSphereSource.h"
#include "vtkPolyDataMapper.h"
#include "vtkActor.h"
#include "vtkRenderer.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"

int main()
{
  vtkSphereSource* src = vtkSphereSource::New();

  vtkPolyDataMapper *mpr = vtkPolyDataMapper::New();
   mpr->SetInputConnection(src->GetOutputPort());

  vtkActor* sph= vtkActor::New();
   sph->SetMapper(mpr);

  vtkRenderer* ren = vtkRenderer::New();
   ren->AddActor(sph);

  vtkRenderWindow* win = vtkRenderWindow::New();
   win->AddRenderer(ren);

  vtkRenderWindowInteractor *rwi = vtkRenderWindowInteractor::New();
   rwi->SetRenderWindow(win);

  rwi->Initialize();
  rwi->Start();

  src->Delete();
  mpr->Delete();
  sph->Delete();

  ren->Delete();
  win->Delete();
  rwi->Delete();

  return 0;
}


-----------------------------------------------------------------------
National Oceanography Centre, Southampton :: http://www.noc.soton.ac.uk






More information about the vtkusers mailing list