pyvista: Plotter segfaults in for loop
Describe the bug, what’s wrong, and what you expected.
I am iterating over meshes to show them but it throws a segfault after the second visualization. Expected behaviour: use .plot() in for loop with new window every time.
potentially an extension of #558?
Steps to reproduce the bug.
import pyvista
for i in range(3):
pyvista.Sphere().plot()
close the window with q
or the cross. Second plotting segfaults.
System Information
--------------------------------------------------------------------------------
Date: Tue Jan 24 16:01:54 2023 CET
OS : Linux
CPU(s) : 36
Machine : x86_64
Architecture : 64bit
Environment : Python
GPU Vendor : Mesa/X.org
GPU Renderer : llvmpipe (LLVM 13.0.0, 256 bits)
GPU Version : 4.5 (Core Profile) Mesa 21.3.4
Python 3.7.15 (default, Nov 24 2022, 21:12:53) [GCC 11.2.0]
pyvista : 0.37.0
vtk : 9.2.2
numpy : 1.20.2
imageio : 2.22.4
scooby : 0.7.0
pooch : v1.6.0
matplotlib : 3.5.3
scipy : 1.6.2
tqdm : 4.64.1
meshio : 4.4.6
--------------------------------------------------------------------------------
Screenshots
No response
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 3
- Comments: 21 (14 by maintainers)
Hi, I have the same issue,
After the second plot of pyvista sometimes I have :
Segmentation fault (core dumped)
Info:
@bjlittle, thanks for also reporting on this! I’ll see what I can do to continue to look into this
9.2.3-4 are the same as 9.2.5 (there was a minor bug in 9.2.4 that we patched in 9.2.5). Actually, 9.2.3-4 are being yanked from PyPI
@banesullivan Don’t know if this issue is related to the destruction of one render window and the creation of the next…
If you want me to try anything at this end, then please advise and I’ll run anything you suggest that might help diagnose the root cause 👍
I downgraded to
vtk==9.1
and the issue went away with both versions of pyvista0.36.1
and0.38.dev0
.I am also running into this same issue. Here is my
pv.Report()
output:I will try installing from the
fix/show-returns
branch to see if that helps.Sorry, I missed the upper part when copying. I updated the original post.