MantisBT - ParaView
View Issue Details
0009645ParaViewBugpublic2009-10-02 08:542010-03-09 21:40
Sven Buijssen 
David Partyka 
normalcrashalways
closedfixed 
Development 
3.8 
0009645: XMLWriter segfaults when trying to set CompressorTypoe to ZLIB
Start pvpython (paraview version 3.7.0, Date: 2009-10-01, 32-bit Linux) and execute the following code:
 from paraview.simple import *;
 Cylinder1 = Cylinder();
 CleantoGrid1 = CleantoGrid()
 writer = servermanager.writers.XMLUnstructuredGridWriter(FileName="foo.vtu",
                         DataMode=2, Input=CleantoGrid1, CompressorType=1);

and you'll get a segfault. It does not occur when setting CompressorType=0. (BTW: I could not find a regression test that checks this.)

gdb reveals a null pointer dereference:

Program received signal SIGSEGV, Segmentation fault.
0xaf29c93a in vtkXMLWriter::SetCompressorType (this=0x8f988f0, compressorType=1)
    at /data/ParaView3_Git/VTK/IO/vtkXMLWriter.cxx:298
298 this->Compressor->Delete();
(gdb) list
293
294 if (compressorType == ZLIB)
295 {
296 if (!this->Compressor || !this->Compressor->IsTypeOf("vtkZLibDataCompressor"))
297 {
298 this->Compressor->Delete();
299 this->Compressor = vtkZLibDataCompressor::New();
300 this->Modified();
301 }
302 return;
(gdb) print this->Compressor
$1 = (class vtkDataCompressor *) 0x0

A suggested patch is attached.
No tags attached.
patch vtkXMLWriter.cxx.patch (607) 2009-10-02 08:54
https://www.vtk.org/Bug/file/7514/vtkXMLWriter.cxx.patch
Issue History
2009-10-02 08:54Sven BuijssenNew Issue
2009-10-02 08:54Sven BuijssenFile Added: vtkXMLWriter.cxx.patch
2010-03-02 12:08David PartykaStatusbacklog => tabled
2010-03-02 12:08David PartykaAssigned To => David Partyka
2010-03-02 12:26David PartykaNote Added: 0019684
2010-03-02 12:27David PartykaNote Added: 0019685
2010-03-02 12:27David PartykaStatustabled => @80@
2010-03-02 12:27David PartykaFixed in Version => 3.8
2010-03-02 12:27David PartykaResolutionopen => fixed
2010-03-09 21:40Alan ScottNote Added: 0019785
2010-03-09 21:40Alan ScottStatus@80@ => closed

Notes
(0019684)
David Partyka   
2010-03-02 12:26   
Committed patch and it passes the continuous dashboards.
(0019685)
David Partyka   
2010-03-02 12:27   
Commited fix and it passes the continuous dashboards.
(0019785)
Alan Scott   
2010-03-09 21:40   
Not tested. Please reopen this bug if the problem still exists.