# VTK9.1.0 problems

**URL:** https://discourse.vtk.org/t/vtk9-1-0-problems/7094
**Category:** Support
**Created:** [November 7, 2021, 12:05am UTC](https://discourse.vtk.org/t/vtk9-1-0-problems/7094 "2021-11-07T00:05:43Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![marcomusy](https://discourse.vtk.org/user_avatar/discourse.vtk.org/marcomusy/32/95_2.png) [@marcomusy](https://discourse.vtk.org/u/marcomusy)
#### Post date: [November 7, 2021, 12:05am UTC](https://discourse.vtk.org/t/vtk9-1-0-problems/7094/1 "2021-11-07T00:05:43Z")

</div>

In the following code

```python
import vtk

src = vtk.vtkCylinderSource()

mapper = vtk.vtkPolyDataMapper()
mapper.SetInputConnection(src.GetOutputPort())

actor = vtk.vtkActor()
actor.SetMapper(mapper)

actor.GetProperty().EdgeVisibilityOn()
actor.GetProperty().SetLineWidth(5)
actor.GetProperty().SetOpacity(0.5)

ren = vtk.vtkRenderer()
ren.AddActor(actor)
ren.SetBackground(0.1, 0.2, 0.4)

renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren)
renWin.SetSize(500, 500)
#print(renWin.GetScreenSize()) # THIS SEG FAULTS in ubuntu

iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
iren.Initialize()
#iren.Start() # need this to see it rotating in OSX

for i in range(180):
    iren.Render()
    ren.GetActiveCamera().Azimuth(1)
iren.Start()

```

![Screenshot from 2021-11-07 00-01-43](https://discourse.vtk.org/uploads/default/original/2X/b/b455f05c73a9bf09142baf15f6117ebed0a5739d.png)

- one can see thin lines which should not be there.
- the `renWin.GetScreenSize()` causes either segmentation fault (ubuntu), or this output error depending on the machine:

```auto
X Error of failed request: BadWindow (invalid Window parameter)
  Major opcode of failed request: 38 (X_QueryPointer)
  Resource id in failed request: 0x5e00002
  Serial number of failed request: 188
  Current serial number in output stream: 188

```

- on OSX (Monterey) the cylinder is not rotating at all, only the final rendering is shown, unless `Start()` is called.

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [November 8, 2021, 1:43pm UTC](https://discourse.vtk.org/t/vtk9-1-0-problems/7094/2 "2021-11-08T13:43:31Z")

</div>

Hi, Marco,

Please, make sure you have the latest X11/Xorg and graphics card drivers in your systems.

regards,

Paulo

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [November 8, 2021, 3:46pm UTC](https://discourse.vtk.org/t/vtk9-1-0-problems/7094/3 "2021-11-08T15:46:54Z")

</div>

I could not reproduce the crash, with either the whl package or with a VTK 9.1 that I built myself.

But I can reproduce the edge visibility bug (the thin lines). These lines definitely did not appear with VTK 9.0.

```python
actor.GetProperty().EdgeVisibilityOn()

```

FYI, I’m using the open-source amdgpu drivers on ubuntu 20.04. @marcomusy what drivers are you using?

---

<div class="post-metadata">

### Author: ![marcomusy](https://discourse.vtk.org/user_avatar/discourse.vtk.org/marcomusy/32/95_2.png) [@marcomusy](https://discourse.vtk.org/u/marcomusy)
#### Post date: [November 8, 2021, 3:59pm UTC](https://discourse.vtk.org/t/vtk9-1-0-problems/7094/4 "2021-11-08T15:59:03Z")

</div>

I also have Ubuntu 20.04.3 LTS with nvidia

![Screenshot from 2021-11-08 16-54-17](https://discourse.vtk.org/uploads/default/original/2X/9/9de0ce665e5c801cdfaf928fa9670d0000fee087.png)

I have 2 ubuntu machines and they both crash in erratic ways on `GetScreenSize()` when the rendering window closes.

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [November 8, 2021, 4:22pm UTC](https://discourse.vtk.org/t/vtk9-1-0-problems/7094/5 "2021-11-08T16:22:02Z")

</div>

> [@marcomusy](#):
>
> crash in erratic ways on `GetScreenSize()` when the rendering window closes.

Ah, okay. I also see a crash on window close if I uncomment the `GetScreenSize()` line. That crash occurs for both 9.0 and 9.1. Must be a resource allocation/deallocation error or something similar. Stack trace shows the crash occurs while X11 is waiting for events:

```plaintext
#0 0x00007ffff17679b4 in xcb_poll_for_event () from /lib/x86_64-linux-gnu/libxcb.so.1
#1 0x00007ffff17c156e in ?? () from /lib/x86_64-linux-gnu/libX11.so.6
#2 0x00007ffff17c16ed in ?? () from /lib/x86_64-linux-gnu/libX11.so.6
#3 0x00007ffff17c19ea in _XEventsQueued () from /lib/x86_64-linux-gnu/libX11.so.6
#4 0x00007ffff17b3211 in XPending () from /lib/x86_64-linux-gnu/libX11.so.6
#5 0x00007ffff18f5dc7 in vtkXRenderWindowInteractor::StartEventLoop (this=<optimized out>) at VTK/Rendering/UI/vtkXRenderWindowInteractor.cxx:272
#6 0x00007ffff3cd114d in PyvtkRenderWindowInteractor_Start (self=<optimized out>, args=<optimized out>) at VTK-build/CMakeFiles/vtkRenderingCorePython/vtkRenderWindowInteractorPython.cxx:249
#7 0x00007ffff7ab3667 in ?? () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0
#8 0x00007ffff7ab3afb in _PyObject_MakeTpCall () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0
#9 0x00007ffff787fdf3 in ?? () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0
#10 0x00007ffff7887ef6 in _PyEval_EvalFrameDefault () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0
#11 0x00007ffff79d5ecb in _PyEval_EvalCodeWithName () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0
#12 0x00007ffff79d6252 in PyEval_EvalCodeEx () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0
#13 0x00007ffff79d663f in PyEval_EvalCode () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0
#14 0x00007ffff79970dc in ?? () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0
#15 0x00007ffff7998a47 in PyRun_SimpleFileExFlags () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0
#16 0x00007ffff7979558 in Py_RunMain () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0
#17 0x00007ffff7979aa7 in Py_Main () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0
#18 0x00007ffff7da88cb in vtkPythonInterpreter::PyMain (argc=<optimized out>, argv=0x7fffffffdfa8) at VTK/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:554
#19 0x00005555555552ff in main (argc=2, argv=0x7fffffffdfa8) at VTK/Wrapping/Python/vtkPythonAppInit.cxx:110

```

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [November 9, 2021, 4:24am UTC](https://discourse.vtk.org/t/vtk9-1-0-problems/7094/6 "2021-11-09T04:24:21Z")

</div>

I created a bug report ([#18372](https://gitlab.kitware.com/vtk/vtk/-/issues/18372)) for the X11 crash. A work-around is to not call `renWin.GetScreenSize()` until after `iren.Initialize()`.

The ghostly diagonals look similar to the ones reported in [#18064](https://gitlab.kitware.com/vtk/vtk/-/issues/18064), but that report was against VTK 9.0, not VTK 9.1. @cory.quammen are there other known issues with `EdgeVisibilityOn()`?
