MantisBT - VTK
View Issue Details
0013860VTK(No Category)public2013-02-04 06:262014-10-02 11:03
Massimiliano Martinelli 
Chuck Atkins 
normalminorhave not tried
closedunable to reproduce 
5.10.1 
6.2.0 
Kitware
crash
0013860: the vtkXMLUnstructuredGridWriter crashes on MacOSX 10.6.8
When I run the code in attachment on a MacOSX 10.6.8 the program crashes with the following message:

vtk_writer.exe(6943) malloc: *** error for object 0x7fff70e33500: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap

The function that is causing the problem seems to be vtkXMLUnstructuredGridWriter::Write().

The vtk library is compiled from the MacPorts tree.

The same code works fine on linux.
hackaton
related to 0013295closed Dave DeMarle vtkXMLUnstructuredGridReader cannot read vtu-files in ascii mode when a double data array contains INFINITE or MAX values 
related to 0013294closed Cory Quammen string arrays may cause vtkXMLUnstructuredGridWriter to produce corrupt vtu-files, which are unreadable or cause crash 
related to 0013382closed T.J. Corona vtkXMLUnstructuredGridWriter: corrupted output for polyhedral cells in appended mode 
cpp vtk_writer.cpp (616) 2013-02-04 06:26
https://www.vtk.org/Bug/file/9393/vtk_writer.cpp
Issue History
2013-02-04 06:26Massimiliano MartinelliNew Issue
2013-02-04 06:26Massimiliano MartinelliFile Added: vtk_writer.cpp
2013-02-04 10:46Sean McBrideNote Added: 0030298
2013-06-25 14:22Dave DeMarleRelationship addedrelated to 0013295
2013-06-25 14:22Dave DeMarleRelationship addedparent of 0013294
2013-06-25 14:22Dave DeMarleRelationship deletedparent of 0013294
2013-06-25 14:22Dave DeMarleRelationship addedrelated to 0013294
2013-06-25 14:23Dave DeMarleRelationship addedrelated to 0013382
2014-10-01 17:15Sean McBrideAssigned To => Sean McBride
2014-10-01 17:15Sean McBrideTag Attached: hackaton
2014-10-02 09:41Chuck AtkinsAssigned ToSean McBride => Chuck Atkins
2014-10-02 09:45Chuck AtkinsStatusbacklog => active development
2014-10-02 11:03Chuck AtkinsNote Added: 0033457
2014-10-02 11:03Chuck AtkinsStatusactive development => closed
2014-10-02 11:03Chuck AtkinsResolutionopen => unable to reproduce
2014-10-02 11:03Chuck AtkinsFixed in Version => 6.2.0

Notes
(0030298)
Sean McBride   
2013-02-04 10:46   
Can you run in gdb and put a breakpoint on malloc_error_break and tell us what the backtrace is?

I would be somewhat surprised if this was a Mac-only issue... Perhaps it works on linux because free() does not do the same checks as on Mac... Could you perhaps try with valgrind on linux?
(0033457)
Chuck Atkins   
2014-10-02 11:03   
Tested on current master on OSX 10.9.2 + XCode 6.0.1 and on Fedora 20 + GCC 4.8.3. Also ran under valgrind and Intel Inspector. Bug is no longer reproducible