diff --git a/openlp.py b/openlp.py index 68001f2d1..73c0d9033 100755 --- a/openlp.py +++ b/openlp.py @@ -28,9 +28,10 @@ import multiprocessing import sys from openlp.core.common import is_win, is_macosx +from openlp.core.common.applocation import AppLocation from openlp.core import main -faulthandler.enable() +faulthandler.enable(open(str(AppLocation.get_directory(AppLocation.CacheDir) / 'error.log'), 'wb')) if __name__ == '__main__': """ diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index ae32c0347..14b34a715 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -1017,7 +1017,13 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, RegistryProperties): wait_dialog = QtWidgets.QProgressDialog('Waiting for some things to finish...', '', 0, 0, self) wait_dialog.setWindowModality(QtCore.Qt.WindowModal) wait_dialog.setAutoClose(False) - self.version_thread.wait() + wait_dialog.show() + retry = 0 + while self.version_thread.isRunning() and retry < 10: + self.application.processEvents() + self.version_thread.wait(500) + if self.version_thread.isRunning(): + self.version_thread.terminate() wait_dialog.close() except RuntimeError: # Ignore the RuntimeError that is thrown when Qt has already deleted the C++ thread object