[vtkusers] Crash when reading LSDyna d3plot file

Simon ESNEAULT simon.esneault at gmail.com
Fri Nov 13 09:57:05 EST 2015


Hello All,

I'm getting a crash when trying to load a d3plot file coming from LSDyna
R8, using the vtkLSDynaReader class.

Attached is a very simple code that reproduces the problem (at least here
on Windows 7, VTK 6.3). It is written to be used with these dataset :
https://www.dropbox.com/s/2gzah0d8d2dpvlt/d3plot.zip?dl=0

It may come from our dataset it self, because when I change the line :
l_reader->SetFileName( "./our.d3plot" );
by the line
l_reader->SetFileName( "./hemi_draw.d3plot" );
The hemi_draw dataset loads just fine (it is coming from the VTKLargeData
git repository)

Or maybe the problem comes from my code, because ParaView is able to load
the dataset ...
Any clue ? Any d3plot expert around ?

Thanks

Simon



-- 
------------------------------------------------------------------
Simon Esneault
Rennes, France
------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151113/fea5859a/attachment.html>
-------------- next part --------------
cmake_minimum_required( VERSION 2.8.5 FATAL_ERROR )

project( LSDynaReader )

find_package( VTK REQUIRED )
include( ${VTK_USE_FILE} )

add_executable( LSDynaReader MACOSX_BUNDLE LSDynaReader.cxx )
target_link_libraries( LSDynaReader ${VTK_LIBRARIES} )

-------------- next part --------------
#include "vtkActor.h"
#include "vtkCompositeDataGeometryFilter.h"
#include "vtkLSDynaReader.h"
#include "vtkNew.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderer.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"

int main( int argc, char *argv[] ){

	vtkNew<vtkLSDynaReader> l_reader;
	l_reader->SetFileName( "./our.d3plot" );
	//l_reader->SetFileName( "./hemi_draw.d3plot" );
	l_reader->Update();

	vtkNew<vtkCompositeDataGeometryFilter> l_composite_filter;
	l_composite_filter->SetInputConnection( l_reader->GetOutputPort() );

	vtkNew<vtkPolyDataMapper> l_mapper;
	l_mapper->SetInputConnection( l_composite_filter->GetOutputPort() );

	vtkNew<vtkActor> l_actor;
	l_actor->SetMapper( l_mapper.GetPointer() );

	vtkNew<vtkRenderWindow> l_render_window;
	vtkNew<vtkRenderer> l_renderer;
	vtkNew<vtkRenderWindowInteractor> l_iren;

	l_render_window->AddRenderer( l_renderer.GetPointer() );
	l_iren->SetRenderWindow( l_render_window.GetPointer() );

	l_renderer->AddActor( l_actor.GetPointer() );

	l_iren->Start();
}


More information about the vtkusers mailing list