vtkCellArray::SetData (vtkIdType cellSize, vtkDataArray *connectivity) bug leads to crashes/ OOMs / segfaults
Crash with OOM due to the fact that the offset array generated from this helper uses the same 32bit structure of connectivity. We have 32bit connectivity array with (point) indices well below INT32_MAX, but more than INT32_MAX cells! Hence the array size is huge and offsets exceed the INT32 limit and fail miserably. Converting the connectivity to 64bit solves the problem but wastes a lot of memory.
Why do you enforce same type for connectivity and offset? Offset could go automatically to 64bit, helper function knows if 32bit are exceeded from size of connectivity.
Best, Ch