ProgressHandler - spyPlotReader is broken
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Progress handler code in the spyplot (CTH) reader is broken. In files vtkSpyPlotReader.cxx and vtkSpyPlotBlockIterator.cxx, the calls to UpdateProgress do not coordinate with each other. This means that progress goes from 0.0 to 0.2, then from 0.04 to 0.4, then from 0.6 to 1.0. This is obviously incorrect.
Another related bug, in the same code, is that for multiple servers, the code counts wrong. In the following code: this->Parent->UpdateProgress(0.2 * (file_index+1.0)/numFiles);
numFiles is the number of files handled by this process, and file_index is the file number that all processes are handling. For instance, if the second pvserver is handling 4 files, numFiles will == 4, and file_index will go 5,6,7 and then 8. This gives a progress that is over 1.0 (and is illegal).
Suggested correction (just fixing the file_index issue) would be:
vtkSpyPlotBlockIterator.cxx, line 227, should be: this->Parent->UpdateProgress(0.2 * (file_index+1.0)/numFiles); to this->Parent->UpdateProgress(0.2 * (file_index-this->FileStart+1.0)/ numFiles);
Be sure to check the rest of the two SpyPlot reader files for the same bug.