community
community copied to clipboard
Crash (seg fault) when Font size overflow
Software Versions Python: 3.6.8 - 3.10.4 OS: Windows 10 Kivy: 2.0 to 2.2 Kivy installation method: master from github.com ( latest )
Describe the bug Segmentation fault when font size of a widget overflows. Examples: size of a font on a label goes bigger than the screen or font from a button exceeds the button size
Expected behavior No segmentation fault
To Reproduce
self.button.font_size = self.button.size[1] * 0.5 -> works self.button.font_size = self.button.size[1] * 0.6 -> crashes
Additional context I tested this on Mac and Linux and the issue is not reproducible. Only on Windows 10 it crashes. It crashes with both NVIDIA or AMD hardware. I use SDL2 for everything (text,video,sound) on any of the 3 OS mentioned above. I use the latest version of SDL, so for fonts today it is: SDL2_ttf-2.0.18. The workaround for this is to make sure that font does not exceed certain size.
i have further investigated this. the bug is inside SDL2_ttf-2.0.18, nothing to do with Kivy.
We later updated (7 months ago) our SDL_ttf Windows dependency to 2.20.2.
pip install kivy-deps.sdl2==0.6.0 fixes the issue?
Yes