pythonkivyraspberry-pi4fault

from kivy.core.window import Window Segmentation fault


for a school project i have to make graphique application on Raspberry pi 4 model B.

I use kivy to make this. I got no problem with my code. But yesterday, i got a error (segmentation fault) and when i use past version of my code, this error keep existing.

I locate the error on this line.

from kivy.core.window import Window 

When i put this only one line in a other python file on my raspberry, that crash but not on my pc.

I got this error.

[INFO   ] [Logger      ] Record log in /root/.kivy/logs/kivy_23-11-09_30.txt
[INFO   ] [Kivy        ] v2.2.1
[INFO   ] [Kivy        ] Installed at "/usr/local/lib/python3.9/dist-packages/kivy/__init__.py"
[INFO   ] [Python      ] v3.9.2 (default, Mar 12 2021, 04:06:34) 
[GCC 10.2.1 20210110]
[INFO   ] [Python      ] Interpreter at "/usr/bin/python3"
[INFO   ] [Logger      ] Purge log fired. Processing...
[INFO   ] [Logger      ] Purge finished!
[INFO   ] [Factory     ] 190 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [Window      ] Provider: x11(['window_sdl2'] ignored)
error: XDG_RUNTIME_DIR not set in the environment.
FBConfig selected:
Doublebuffer: Yes
Red Bits: 8, Green Bits: 8, Blue Bits: 8, Alpha Bits: 8, Depth Bits: 24
[INFO   ] [GL          ] Using the "OpenGL ES 2" graphics system
[INFO   ] [GL          ] Backend used <gl>
Segmentation fault


------------------
(program exited with code: 139)
Press return to continue

So i don't understand what i can do to fix that. Someone know what can i do ?

Sorry for my english.

I tried to upade my OS and kivy package but nothing change.

If i try a simple code like that works normaly:

print("test")

If someone have idea.


Solution

  • I needed to plug a screen, I was using a VNC.

    Look like linux don't active graphic driver without a screen.