Repository navigation
pyvista freeze #130
Copy link
Copy link
Closed
Description
Using docker image as explained here https://github.com/FEniCS/dolfinx/blob/main/README.md#installation.
Following https://jsdokken.com/dolfinx-tutorial/chapter2/linearelasticity_code.html, I end up with pyvista freezing (no GUI + stall => compelled to ctrl-C):
>>> p.show()
^C
Loguru caught a signal: SIGINT
Stack trace:
24 0x556937da7245 _start + 37
23 0x7f8c16e53e40 __libc_start_main + 128
22 0x7f8c16e53d90 /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f8c16e53d90]
21 0x556937da734d Py_BytesMain + 45
20 0x556937dd130c Py_RunMain + 1308
19 0x556937c1c520 PyRun_AnyFileExFlags + 79
18 0x556937ddfe58 _PyRun_AnyFileObject + 104
17 0x556937c30653 _PyRun_InteractiveLoopObject + 195
16 0x556937c309c6 python3(+0xb59c6) [0x556937c309c6]
15 0x556937dd9d5b python3(+0x25ed5b) [0x556937dd9d5b]
14 0x556937de0f08 python3(+0x265f08) [0x556937de0f08]
13 0x556937db4456 PyEval_EvalCode + 134
12 0x556937cbc766 python3(+0x141766) [0x556937cbc766]
11 0x556937cc014a _PyEval_EvalFrameDefault + 2058
10 0x556937cd73ac _PyFunction_Vectorcall + 124
9 0x556937cc014a _PyEval_EvalFrameDefault + 2058
8 0x556937cd73ac _PyFunction_Vectorcall + 124
7 0x556937cc648e _PyEval_EvalFrameDefault + 27470
6 0x556937ccd7db _PyObject_MakeTpCall + 603
5 0x556937cd6b88 python3(+0x15bb88) [0x556937cd6b88]
4 0x7f8bf4bfe8ed /usr/local/lib/python3.10/dist-packages/vtkmodules/vtkRenderingCore.cpython-310-x86_64-linux-gnu.so(+0x15c8ed) [0x7f8bf4bfe8ed]
3 0x7f8bf19bc8a4 vtkXRenderWindowInteractor::StartEventLoop() + 68
2 0x7f8bf19c048f vtkXRenderWindowInteractor::ProcessEvents() + 1039
1 0x7f8c16f457ed __select + 349
0 0x7f8c16e6c520 /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f8c16e6c520]
2023-05-27 11:55:11.822 ( 209.993s) [main ] :0 FATL| Signal: SIGINT
root@2a7031a303bf:~/dolfinx-tutorial/chapter2# pip list | grep pyvista
pyvista 0.39.1
root@2a7031a303bf:~/dolfinx-tutorial/chapter2# pip list | grep vtk
vtk 9.2.6
Any clue?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
jorgensd commentedon May 27, 2023
How are you starting the docker container? Are you forwarding the necessary ports for a graphical user interface? Are you using a Python script or a notebook?
fghoussen commentedon May 27, 2023
This does work: I have a GUI that pops up and I can navigate the into the colored mesh
But this doesn't work: the visualization stalls
Did I miss something?
Yes
Yes
python script
fghoussen commentedon May 28, 2023
Any clue so far?
jorgensd commentedon May 28, 2023
Please note that is the weekend, and it doesn't help adding extra posts here.
Try removing
pyvista.start_xvfb().fghoussen commentedon May 28, 2023
Sorry didn't meant to disturb. As I work, I can only deal with that topic by the week-end.
Worked, thanks! Do you want me to PR this change?
jorgensd commentedon May 28, 2023
No, as it stands, most pyvista visualization needs xvfb (for instance in jupyter notebook or for screenshots). As the tutorial is based on the ipynb scripts (to render the webpage) I need start_xvfb() to run and render plots there.
What you could do is to add a comment or separate section about plotting in chapter1, where one goes through what is needed for various plotting methods.