Saturday, December 2, 2017

How do I solve Kivy error: Bad Window (invalid Window parameter)?

Leave a Comment

I installed Kivy and Cython. I am using VirtualBox and Arch Linux with Gnome as my Display Manager. Upon creating the following app,

from kivy.app import App from kivy.uix.button import Button  class CalcApp(App):     def build(self):         return Button(text="Hello World")  if __name__ == '__main__':     CalcApp().run() 

I receive the following error

[INFO   ] [Logger      ] Record log in /home/kyle/.kivy/logs/kivy_17-10-19_40.txt [INFO   ] [Kivy        ] v1.10.0 [INFO   ] [Python      ] v3.6.2 (default, Jul 20 2017, 03:52:27)  [GCC 7.1.1 20170630] [INFO   ] [Factory     ] 194 symbols loaded [INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored) [INFO   ] [Text        ] Provider: sdl2 [INFO   ] [OSC         ] using <multiprocessing> for socket [INFO   ] [Window      ] Provider: sdl2(['window_egl_rpi'] ignored) X Error of failed request:  BadWindow (invalid Window parameter)   Major opcode of failed request:  4 (X_DestroyWindow)   Resource id in failed request:  0x0   Serial number of failed request:  151   Current serial number in output stream:  152 

If I run the command unset DISPLAY it works as intended, but without the option to minimize, maximize and close window that normally are available.

Is there a way to fix this error so I won't need to type unset DISPLAY every time a new terminal window is open and have it look like a normal window?

1 Answers

Answers 1

Take a look at this issue on Github, it seems likely to be the same problem: https://github.com/kivy/kivy/issues/5476

For posterity (and in case the link breaks), it's likely a multi-sampling issue.

Try these fixes:

  • Use another desktop environment where the multi sampling works
  • downgrade sdl2 to 2.0.5
  • upgrade sdl2 to 2.0.7
  • disable multisampling in kivy (can be done by editing ~/.kivy/config.ini and setting multisampling to 0
If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment