pystk icon indicating copy to clipboard operation
pystk copied to clipboard

segmentation fault while pystk.init(config)

Open JonathanJao opened this issue 4 years ago • 1 comments

Describe the bug Pystk throws a segmentation fault when calling pystk.init(config)

To Reproduce

Python 3.9.9 (main, Apr 16 2022, 15:43:56) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pystk
>>> 
>>> 
>>> config = pystk.GraphicsConfig.hd()
>>> config.screen_width = 800
>>> config.screen_height = 600
>>> pystk.init(config)
Segmentation fault

System information: Verified occur on two systems: First without dedicated graphics:

  • OS: Debian Linux 11
  • CPU: Intel Core i5-4590T
  • GPU: Mesa DRI Intel HD Graphics 4600

Second with dedicated graphics:

  • OS: Debian Linux 11
  • CPU: Intel Pentium
  • GPU: Nvidia GTX 1080 Ti

Additional context pystk was installed with pip. Another issue opened earlier: https://github.com/philkr/pystk/issues/33

JonathanJao avatar Apr 21 '22 09:04 JonathanJao

I had this same issue and running the following command fixed it.

apt-get install -y libglu1-mesa-dev libgl1-mesa-dev libosmesa6-dev xvfb ffmpeg curl patchelf libglfw3 libglfw3-dev cmake zlib1g zlib1g-dev swig

I was following the gym installation steps from this page and I am not sure why it fixed it or which package was needed.

sttteephen avatar Nov 18 '23 16:11 sttteephen