View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0016114VTK(No Category)public2016-05-07 09:142016-06-22 15:37
ReporterDrew Parsons 
Assigned ToHaocheng Liu 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionopen 
PlatformOSOS Version
Product Version6.2.0 
Target VersionFixed in Version 
Summary0016114: Crashes when importing VRML file (containing PROTO)
DescriptionVTK is crashing on the attached VRML file.

This bug report reopens bug 0012776, which has expired. The bug is still present in VTK 6.2.0. The current python backtrace is:
$ gdb python
GNU gdb (Debian 7.10-1+b1) 7.10
...
Reading symbols from python...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/python
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Python 2.7.11+ (default, Apr 17 2016, 14:00:29)
[GCC 5.3.1 20160409] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
[New Thread 0x7fffadefa700 (LWP 27119)]
...
>>> reader = vtk.vtkVRMLImporter()
>>> reader.SetFileName('mayavi-crash.wrl')
>>> reader.Update()

Program received signal SIGSEGV, Segmentation fault.
0x00007fff9bab3f3b in vtkVRMLImporter::exitField() () from /usr/lib/x86_64-linux-gnu/libvtkIOImport-6.2.so.6.2
(gdb) bt
#0 0x00007fff9bab3f3b in vtkVRMLImporter::exitField() () from /usr/lib/x86_64-linux-gnu/libvtkIOImport-6.2.so.6.2
#1 0x00007fff9baaf864 in ?? () from /usr/lib/x86_64-linux-gnu/libvtkIOImport-6.2.so.6.2
#2 0x00007fff9bab0ee2 in vtkVRMLImporter::ImportBegin() () from /usr/lib/x86_64-linux-gnu/libvtkIOImport-6.2.so.6.2
#3 0x00007fff9baabcbd in vtkImporter::Read() () from /usr/lib/x86_64-linux-gnu/libvtkIOImport-6.2.so.6.2
#4 0x00007fff9bcd2435 in ?? () from /usr/lib/x86_64-linux-gnu/libvtkIOImportPython27D-6.2.so.6.2
#5 0x00000000004c4aca in PyEval_EvalFrameEx ()
#6 0x00000000004c2bd5 in PyEval_EvalCodeEx ()
#7 0x00000000004c2979 in PyEval_EvalCode ()
#8 0x00000000004f221f in ?? ()
0000009 0x000000000044c6f0 in PyRun_InteractiveOneFlags ()
#10 0x000000000044c530 in PyRun_InteractiveLoopFlags ()
0000011 0x000000000042ea01 in ?? ()
#12 0x000000000049de78 in Py_Main ()
#13 0x00007ffff6f1a610 in __libc_start_main (main=0x49d7a0 <main>, argc=1, argv=0x7fffffffe0b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe0a8) at libc-start.c:291
#14 0x000000000049d6c9 in _start ()



An older backtrace with VTK debugging symbols is:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff701ec32 in vtkPoints::GetPoint (this=0x7ffff7f63a98, id=0) at /home/mathieu/Kitware/VTK/Common/vtkPoints.h:117
117 double *GetPoint(vtkIdType id) { return this->Data->GetTuple(id);};
(gdb) bt
#0 0x00007ffff701ec32 in vtkPoints::GetPoint (this=0x7ffff7f63a98, id=0) at /home/mathieu/Kitware/VTK/Common/vtkPoints.h:117
#1 0x00007ffff719237d in vtkVRMLImporter::exitField (this=0x639240) at /home/mathieu/Kitware/VTK/Hybrid/vtkVRMLImporter.cxx:6056
#2 0x00007ffff718ba94 in yyparse (self=0x639240) at /home/mathieu/Kitware/VTK/Hybrid/vtkVRMLImporter.cxx:1358
#3 0x00007ffff718e8e3 in vtkVRMLImporter::ImportBegin (this=0x639240) at /home/mathieu/Kitware/VTK/Hybrid/vtkVRMLImporter.cxx:5413
#4 0x00007ffff67e2625 in vtkImporter::Read (this=0x639240) at /home/mathieu/Kitware/VTK/Rendering/vtkImporter.cxx:79
#5 0x0000000000400b6c in vtkImporter::Update (this=0x639240) at /home/mathieu/Kitware/VTK/Rendering/vtkImporter.h:76
#6 0x0000000000400af7 in main (argc=2, argv=0x7fffffffe678) at /tmp/v/bla.cxx:8

Python code is:

>>> import vtk
>>> reader = vtk.vtkVRMLImporter()
>>> reader.SetFileName('mayavi-crash.wrl')
>>> reader.Update()



TagsNo tags attached.
ProjectTBD
Typecrash
Attached Files? file icon mayavi-crash.wrl [^] (282 bytes) 2016-05-07 09:14

 Relationships

  Notes
(0036098)
Haocheng Liu (developer)
2016-06-22 15:37

The crash is caused by the grammar imperfection of the VRML parser in VTK. For the attached .wrl file, the type of the beadColour(which should be a vec3f) however is not assigned properly in the parser so that the value cannot be assigned to diffuseColor, which causes the crash. In order to fix this bug we need the access to the original Yacc grammar file to rewrite the VRML parser, due to the fact that the parser is written in 1996,sadly it's no longer available.

PS: To solve the problem, one hack solution is just to replace "IS beadColour" with "0 0 1".

 Issue History
Date Modified Username Field Change
2016-05-07 09:14 Drew Parsons New Issue
2016-05-07 09:14 Drew Parsons File Added: mayavi-crash.wrl
2016-06-20 11:37 Utkarsh Ayachit Assigned To => Haocheng Liu
2016-06-21 10:50 Haocheng Liu Status backlog => active development
2016-06-22 15:37 Haocheng Liu Note Added: 0036098
2016-06-22 15:37 Haocheng Liu Reproducibility have not tried => always
2016-06-22 15:37 Haocheng Liu Status active development => closed


Copyright © 2000 - 2018 MantisBT Team