Skip to content

Fix crash on Bezier cells with rational weights

Florian Maurin requested to merge florian360/vtk:RationalWeights into master

The rational weights for Bezier cells were not correctly set in the functions getFace and getCurve. So they were wrong, but it didn't show up before because they are not used for the cell representation.

The problem was in this line this->GetRationalWeights()->GetValue(result->PointIds->GetId(i)) . We want to get the cell id, but result->PointIds->GetId returns the global id. This id is often out of range, and it results some random crashes when the mesh is large. This happen mainly for mac users, since mac is more sensitive than Linux to memory leaks.

I have also add a test, but since the crash is random, not sure CI tests would have catch it.

Merge request reports