View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013225ParaView(No Category)public2012-06-07 11:472013-01-10 20:16
Assigned ToSebastien Jourdain 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version3.14.1 
Target VersionFixed in Version 
Summary0013225: Crash Bug/Bad Memory Read in pqQueryDialog (vtkDataObjectTypes::GetClassNameFromTypeId also partly to blame)
DescriptionWhen pqQueryDialog::populateSelectionType() is used before the pipeline has been updated a bad memory read occurs in VTK's vtkDataObjectTypes::GetClassNameFromTypeId
because typeId is -1

Steps to reproduce: Create a Wavelet source. Do not click Apply. Select Menu>Find Data. In our Win7 debug build and official 3.14.1 release this causes a crash due to bad memory access.
The cause of the crash is that vtkPVDataInformation is not fully initialized (DataSetType is still -1).
which leads to a later bad access:

vtkPVDataInformation::DataSetTypeIsA(const char* type)
   if (strcmp(type, this->GetDataSetTypeAsString()) == 0)

which calls GetDataSetTypeAsString with -1
vtkDataObjectTypes::GetClassNameFromTypeId(int type)

There are two bugs here.
First, that vtkDataObjectTypes::GetClassNameFromTypeId's bounds check is incomplete:
 if (type < numClasses)

should be
 if (type >=0 && type < numClasses)
to be more robust and prevent a bad memory access in the subsequent line-
  if (type < numClasses)
    return vtkDataObjectTypesStrings[type];
    return "UnknownClass";

Secondly, on the Paraview side, the dialog should have been more robust when the source info is not yet available.

TagsNo tags attached.
Topic Name13225_make_vtkPVDataInformation_more_robust
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to 0013150closedUtkarsh Ayachit Simplify "Find Data" dialog 

-  Notes
Sebastien Jourdain (manager)
2012-11-28 09:21

Merged to master
Alan Scott (manager)
2013-01-10 20:16

Tested Windows, local server, master.

- Issue History
Date Modified Username Field Change
2012-06-07 11:47 Lawrence New Issue
2012-06-20 10:58 Utkarsh Ayachit Relationship added related to 0013150
2012-11-27 15:02 Sebastien Jourdain Topic Name => 13225_make_vtkPVDataInformation_more_robust
2012-11-27 15:02 Sebastien Jourdain Status backlog => gatekeeper review
2012-11-27 15:02 Sebastien Jourdain Resolution open => fixed
2012-11-27 15:02 Sebastien Jourdain Assigned To => Sebastien Jourdain
2012-11-28 09:21 Sebastien Jourdain Status gatekeeper review => customer review
2012-11-28 09:21 Sebastien Jourdain Note Added: 0029805
2013-01-10 20:16 Alan Scott Note Added: 0030066
2013-01-10 20:16 Alan Scott Status customer review => closed

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker