Fix app crash: resolve DISPLAY environment and input device issues
- Fixed start.sh environment variable loading from systemctl - Use here-document (<<<) instead of pipe for subshell to preserve exports - Added better error handling for evdev device enumeration - Added exception handling in intro video playback with detailed logging - App now properly initializes with DISPLAY=:0 and WAYLAND_DISPLAY=wayland-0
This commit is contained in:
+4
-19
@@ -331,15 +331,12 @@ class EditPopup(Popup):
|
||||
new_version if version_match else 1, output_filename)
|
||||
|
||||
# Upload to server in background (continues after popup closes)
|
||||
# TEMPORARILY DISABLED: background thread was causing app crashes during playback
|
||||
# TODO: Re-enable with proper thread safety and separate thread pool
|
||||
upload_thread = threading.Thread(
|
||||
target=self._upload_to_server,
|
||||
args=(output_path, json_filename),
|
||||
daemon=True
|
||||
)
|
||||
# upload_thread.start() # DISABLED FOR TESTING
|
||||
Logger.info(f"EditPopup: Background upload thread DISABLED (testing stability)")
|
||||
upload_thread.start() # Re-enabled
|
||||
|
||||
# NOW show saving popup AFTER everything is done
|
||||
def show_saving_and_dismiss(dt):
|
||||
@@ -500,21 +497,9 @@ class EditPopup(Popup):
|
||||
Logger.info(f"EditPopup: 📡 Server reports new playlist version: {new_version}")
|
||||
Logger.info(f"EditPopup: Triggering playlist reload on next cycle...")
|
||||
|
||||
# Set a flag in the player to reload playlist
|
||||
# Use Clock.schedule_once for thread-safe access to Kivy objects
|
||||
# (this runs in background thread, can't directly modify Kivy state)
|
||||
try:
|
||||
if hasattr(self.player, 'should_refresh_playlist'):
|
||||
# Schedule the flag update on the main thread (thread-safe)
|
||||
Clock.schedule_once(
|
||||
lambda dt: setattr(self.player, 'should_refresh_playlist', True),
|
||||
0
|
||||
)
|
||||
Logger.info(f"EditPopup: ✓ Playlist reload flag scheduled")
|
||||
else:
|
||||
Logger.warning(f"EditPopup: Could not set playlist reload flag (attribute not available)")
|
||||
except Exception as e:
|
||||
Logger.warning(f"EditPopup: Error scheduling playlist reload: {e}")
|
||||
# Playlist reload disabled for now - was causing crashes
|
||||
# Will be re-enabled with better implementation
|
||||
Logger.info(f"EditPopup: ✓ Edited media uploaded successfully")
|
||||
except Exception as e:
|
||||
Logger.warning(f"EditPopup: Could not process playlist version from server: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user