Describe the bug
In src/buskill_gui.py, the show_debug_log() method modifies self.rv.data (a Kivy RecycleView property) from a background threading.Thread. Kivy's UI properties are not thread-safe — they must only be modified from the main thread. This can cause random crashes, data corruption, or visual glitches.
Code reference
src/buskill_gui.py:1026-1032:
threading.Thread( target=self.show_debug_log ).start()
...
def show_debug_log( self ):
lines = []
for line in self.debug_log_contents.splitlines(keepends=False):
lines.append({'text': line})
self.rv.data = lines # <-- UI mutation from background thread
Expected behavior
Use Clock.schedule_once() to schedule the data update on the main thread:
def show_debug_log( self ):
lines = [{'text': line} for line in self.debug_log_contents.splitlines(keepends=False)]
from kivy.clock import Clock
Clock.schedule_once(lambda dt: setattr(self.rv, 'data', lines), 0)
Severity
Medium — can cause hard-to-reproduce crashes and visual corruption in the debug log screen.
Describe the bug
In
src/buskill_gui.py, theshow_debug_log()method modifiesself.rv.data(a KivyRecycleViewproperty) from a backgroundthreading.Thread. Kivy's UI properties are not thread-safe — they must only be modified from the main thread. This can cause random crashes, data corruption, or visual glitches.Code reference
src/buskill_gui.py:1026-1032:Expected behavior
Use
Clock.schedule_once()to schedule the data update on the main thread:Severity
Medium — can cause hard-to-reproduce crashes and visual corruption in the debug log screen.