pyvista / pyvista

3D plotting and mesh analysis through a streamlined interface for the Visualization Toolkit (VTK)
https://docs.pyvista.org
MIT License
2.49k stars 460 forks source link

Contour segmentation fault #5931

Open FrankFrank9 opened 3 months ago

FrankFrank9 commented 3 months ago

Describe the bug, what's wrong, and what you expected.

Hello,

I noticed a strange behaviour: if I run the script below (to make the contour) multiple times sometimes it segfaults other works correctly (on average it works 1 time out of 5). It seems to be related to my file only which is quite big (30 million of points for reference)

Any idea?

Steps to reproduce the bug.

soln = pv.get_reader("./file.hdf").read()
qcontour = soln.contour(
    isosurfaces=np.array([100]),
    scalars="QCriterion",
)

qcontour.plot()

System Information

OS : Darwin
            CPU(s) : 8
           Machine : arm64
      Architecture : 64bit
       Environment : Python
        GPU Vendor : Apple
      GPU Renderer : Apple M1 Pro
       GPU Version : 4.1 Metal - 88
  MathText Support : True

  Python 3.11.8 (main, Feb 26 2024, 15:36:12) [Clang 14.0.6 ]

           pyvista : 0.43.5
               vtk : 9.3.20230807rc0
             numpy : 1.26.4
        matplotlib : 3.8.4
            scooby : 0.9.2
             pooch : 1.8.1
            pillow : 10.3.0
--------------------------------------------------------------------------------

Screenshots

No response

tkoyama010 commented 3 months ago

Thanks for reporting. To determine the cause, we need the read file where the error occurs and the error message.