Fix low-severity robustness issues

- show_error_dialog() aborted when QApplication construction itself was
  the failure; fall back to stderr so the real error is visible.
- Auto-update QThread cleanup dropped the last Python reference while
  run() could still be unwinding ("QThread: Destroyed while thread is
  still running"); defer destruction to deleteLater on finished.
- macOS ffmpeg install no longer curl|bash-es the Homebrew bootstrap
  script unattended; it now asks the user to install Homebrew
  themselves and fails cleanly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jaroslav Beneš
2026-07-25 01:36:29 +02:00
parent 4cc48ae98f
commit 1c885e3fc5
3 changed files with 23 additions and 8 deletions
+9 -5
View File
@@ -1176,12 +1176,16 @@ class YTSageApp(QMainWindow, FormatTableMixin, VideoInfoMixin, AnalysisMixin):
# Clean up the thread reference and ensure it's properly finished
if hasattr(self, "auto_update_thread"):
thread = self.auto_update_thread
# Disconnect all signals to prevent further callbacks
self.auto_update_thread.update_finished.disconnect()
# Make sure thread is finished
if self.auto_update_thread.isRunning():
self.auto_update_thread.quit()
self.auto_update_thread.wait(1000) # Wait up to 1 second
thread.update_finished.disconnect()
# Dropping the Python reference while run() is still unwinding
# can destroy a live QThread; let Qt delete it once finished.
if thread.isRunning():
thread.finished.connect(thread.deleteLater)
thread.quit()
else:
thread.deleteLater()
# Remove the reference
delattr(self, "auto_update_thread")