Gorkem Cismel
unread,Sep 22, 2025, 4:49:57 PM (5 days ago) Sep 22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Kivy users support
Hello,
I'm encountering a crash on startup with the error IndexError: list index out of range originating from
Kivy's internal graphics engine.
This error is typically caused by an imbalance in the graphics instruction stack. After reviewing the
code, the likely cause is redundant loading of .kv files.
The main slothrunner.kv file uses the #:include directive to manually load the .kv files for each screen
(e.g., profilescreen.kv, settingsscreen.kv). However, Kivy's engine is designed to automatically find and
load these files because their names match the corresponding screen class names (e.g., ProfileScreen ->
profilescreen.kv).
This double-loading process likely corrupts the graphics state, leading to the crash.
To fix this, you should remove the following lines from the end of the `C:\Users\cisme\Desktop\Game
projects\sloth_runner\kv\slothrunner.kv` file:
`kv
#:include settingsscreen.kv
#:include profilescreen.kv
#:include how_to_play_screen.kv
`
Removing these lines will eliminate the redundant loading and should resolve the IndexError.