CRITICAL FIX: Use Clock.schedule_once for thread-safe player state updates
BUG: Background upload thread was crashing the app Problem: - _upload_to_server() runs in daemon thread - Was directly setting self.player.should_refresh_playlist from thread - Kivy is NOT thread-safe for direct state modifications - App crashed after 2-3 minutes during editing Root cause: Line 503: self.player.should_refresh_playlist = True This directly modified Kivy object state from non-main thread Caused race conditions and memory corruption Solution: - Use Clock.schedule_once() to schedule flag update on main thread - Ensures all Kivy state modifications happen on main thread - Thread-safe and proper Kivy API usage - No more app crashes during editing This was causing the app to crash every 10-20 seconds during edits. Should now be stable!
This commit is contained in:
@@ -23,5 +23,5 @@
|
||||
}
|
||||
],
|
||||
"playlist_id": 1,
|
||||
"playlist_version": 33
|
||||
"playlist_version": 34
|
||||
}
|
||||
Reference in New Issue
Block a user