View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013676VTK(No Category)public2012-11-25 07:072013-10-22 10:22
ReporterDavid Doria 
Assigned ToDan Lipsa 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version6.0.0 
Target Version6.0.1Fixed in Version 
Summary0013676: vtkLightActor crashes if the light is not positional
DescriptionIn the following demo, if

light->SetPositional(true);

is not called, the program crashes. With the above line, it does not crash and displays the light correctly.

#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkLightActor.h>
#include <vtkLight.h>
#include <vtkSmartPointer.h>
#include <vtkRenderWindowInteractor.h>

int main()
{
  vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();

  // Display where the light is
  vtkSmartPointer<vtkLight> light = vtkSmartPointer<vtkLight>::New();
// light->SetPositional(true); // without this line, the program crashes
  vtkSmartPointer<vtkLightActor> lightActor = vtkSmartPointer<vtkLightActor>::New();
  lightActor->SetLight(light);
  renderer->AddViewProp(lightActor);

  vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
  renderWindow->AddRenderer(renderer);

  vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
      vtkSmartPointer<vtkRenderWindowInteractor>::New();
  renderWindowInteractor->SetRenderWindow(renderWindow);

  renderWindow->Render();
  renderWindowInteractor->Start();

}
Steps To Reproducebuild vtk 6.1 with standard options
use this cmakelists

cmake_minimum_required(VERSION 2.8.7)
project(vtkApplication)
find_package(VTK 6.1 REQUIRED NO_MODULE)
include(${VTK_USE_FILE})
add_executable(bug bug.cxx)
target_link_libraries(bug ${VTK_LIBRARIES})

compile and run, will segfault, change to positional, compile and run, works fine
TagsNo tags attached.
ProjectTBD
Typecrash
Attached Files

 Relationships

  Notes
There are no notes attached to this issue.

 Issue History
Date Modified Username Field Change
2012-11-25 07:07 David Doria New Issue
2013-06-24 21:55 Dave DeMarle Reproducibility have not tried => always
2013-06-24 21:55 Dave DeMarle Status backlog => todo
2013-06-24 21:55 Dave DeMarle Product Version => 6.0.0
2013-06-24 21:55 Dave DeMarle Target Version => 6.0.1
2013-06-24 21:55 Dave DeMarle Steps to Reproduce Updated
2013-07-22 20:07 Dave DeMarle Status todo => backlog
2013-10-15 13:02 Dave DeMarle Assigned To => Dan Lipsa
2013-10-15 13:02 Dave DeMarle Status backlog => tabled
2013-10-18 13:28 Dave DeMarle Status tabled => backlog
2013-10-18 13:47 Dan Lipsa Status backlog => closed
2013-10-22 10:12 Dan Lipsa Status closed => backlog
2013-10-22 10:12 Dan Lipsa Resolution open => reopened
2013-10-22 10:22 Dan Lipsa Status backlog => closed
2013-10-22 10:22 Dan Lipsa Resolution reopened => fixed


Copyright © 2000 - 2018 MantisBT Team