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:
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB |
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"time_of_modification": "2026-01-17T21:51:37.035997",
|
||||
"original_name": "2026efvev-1428673176.jpg",
|
||||
"new_name": "2026efvev-1428673176_e_v1.jpg",
|
||||
"original_path": "/home/pi/Desktop/Kiwy-Signage/media/2026efvev-1428673176.jpg",
|
||||
"version": 1,
|
||||
"user_card_data": "0007206239"
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB |
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"time_of_modification": "2026-01-17T21:53:55.318456",
|
||||
"original_name": "4k1.jpg",
|
||||
"new_name": "4k1_e_v1.jpg",
|
||||
"original_path": "/home/pi/Desktop/Kiwy-Signage/media/4k1.jpg",
|
||||
"version": 1,
|
||||
"user_card_data": "0007206239"
|
||||
}
|
||||
Reference in New Issue
Block a user