Invalid point/cell ID at end of VTKCellArray causes segfaults; triage "fix"
I am using Paraview 5.6 to visualize a large structured dataset, but it has been unusable due to a relentless segfault. This has never occurred in PV 5.5.2.
The following "fix" intercepts the crash, whines to the console about it, and overwrites the offending nonsense point ID with zero (which is garbage, and does introduce the visual glitch you might expect, but at least it doesn't take the entire program down).
Wherever it happens, it always occurs at the end of a traversal of a vtkCellArray at which one of the cell pointers/IDs is absurd (the input 3DSMesh here has 32M points, and the contour that causes the crash has 600K in change, typical junk values are around 1 billion).
Based on what I am able to observe it seems to be an uninitialized value:
- When both of the patched routines above (before the 1st one was changed to overwrite it) hit the bug, they had the same invalid ID. When gdb intercepted a segfault in a third location, the same invalid ID index was present there too.
- I've altered the "fix" to overwrite it with a valid (albeit garbage) ID and the console complaint occurs only once: the bad triangle causes a visual glitch
- The glitch persists when I change data frames
- It even persists when I delete the original contour and add a new one, or change the values being contoured.
I don't even know where to begin to look to find out where the junk value is being introduced and actually fix the bug.
Steps to reproduce:
The following test dataset causes this problem 100% of the time for me. Please be kind, it is 10GB: shell.uoregon.edu/~ekeever1/test_data.tar
- mpirun -np 2 pvserver & paraview
- paraview -> connect localhost
- localhost pipeline -> open -> xmtest2_meta.xdmf
- uncheck all but 'mass' to speed things up a bit
- apply
- create contour
- delete default value, create range for contour, choose log scale
- apply
- (patch whines to console)
- contour appears on screen