Fix model switching crash and improve error handling
**Model Reload Fixes:** - Properly disconnect signals before reconnecting to prevent duplicate connections - Wait for previous model loader thread to finish before starting new one - Add garbage collection after unloading model to free memory - Improve error handling in model reload callback **Settings Dialog:** - Remove duplicate success message (callback handles it) - Only show message if no callback is defined **Transcription Engine:** - Explicitly delete model reference before setting to None - Force garbage collection to ensure memory is freed This prevents crashes when switching models, especially when done multiple times in succession or while the app is under load. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -283,11 +283,13 @@ class SettingsDialog(QDialog):
|
||||
self.config.set('server_sync.room', self.server_room_input.text())
|
||||
self.config.set('server_sync.passphrase', self.server_passphrase_input.text())
|
||||
|
||||
# Call save callback
|
||||
# Call save callback (which will show the success message)
|
||||
if self.on_save:
|
||||
self.on_save()
|
||||
else:
|
||||
# Only show message if no callback
|
||||
QMessageBox.information(self, "Settings Saved", "Settings have been saved successfully!")
|
||||
|
||||
QMessageBox.information(self, "Settings Saved", "Settings have been saved successfully!")
|
||||
self.accept()
|
||||
|
||||
except ValueError as e:
|
||||
|
||||
Reference in New Issue
Block a user