Crash when trying to clip a vtu file

Paraview 5.7.0 crashes when applying Clip filter to results from VTU file. Can’t share the file because of NDA. Log file says that error is ‘An invalid output shape was found in the ClipCases’. There are following CellTypes available in the dataset:

  • VTK_EMPTY_CELL (608 cells)
  • VTK_HEXAHEDRON (2700 cells)
  • VTK_TETRA (5395 cells)

I guess the issue caused by the empty cells. Is there a way to filter them out? Or may be there’s other way to handle this?

Any help appreciated.

I wasn’t able to replicate your crash (using this simple test file with an empty cell empty_cell.vtu), so the problem might be with something else. Perhaps your data has malformed cells.

But to answer your question, an easy way to remove the empty cells is to run the Count Cell Vertices filter and then use the Threshold filter to remove any cells with Vertex Count fewer than 1. (Empty cells should have 0 vertices.)

If that does not work, you might consider using the Generate Ids filter to create a field with cell ids. Then use the Threshold filter to perform a binary search to find a single cell that crashes ParaView. That could give you an idea of what is going on or at least allow you to create a simple non-NDA file that you can share.

Kenneth, thank you for the help.

I’ve tried using Threshold filter, filtering only tetras or hexahedrons, but Paraview still crashes this time without any error (MAX log level).

Do you have any other guidelines to investigate this issue?

That’s pretty weird. You could try the Clean to Grid filter to see if that helps.

If it doesn’t, you could try selecting a single cell in your data and extracting it. Then clip that one cell. If that still doesn’t work, maybe you could share a dataset with that one cell.

If it does work, you can try the binary search I suggested earlier.

Clean to Grid didn’t work.

Here is the sample file with one cell clip_testing_single_cell.vtu (5.4 KB)

The problem is that your data is malformed. The cell is registered as a (linear) hexahedron (type 12), but the data suggest that it should be a quadratic hexahedron (type 25). The former has 8 points whereas the latter has 20 points. It looks like most operations are just ignoring the extra points, but clip is doing something bad. If I fix your file to change the cell type to be a quadratic hexahedron, clip works just fine: clip_testing_single_cell_fixed.vtu (6.7 KB)

ParaView shouldn’t crash, and I think @wascott is writing up a bug. But also you should fix your data or other bad stuff is likely to happen.

1 Like

https://gitlab.kitware.com/paraview/paraview/-/issues/20327

Kenneth, thank you very much for making the issue clear.
I will check the way our data is written.