Details
Description
Up to 6.7.3, exceptions called sys.excepthook immediately. From 6.8.0, sys.excepthook is called with (sometimes very long) delay.
The following code illustrates that. In 6.7.3, the window opens and a message box is shown immedietaly. In 6.8.0(.1), the window opens and hangs. Only when you close the window do you see the message box.
import sys from PySide6.QtCore import QTimer, Slot from PySide6.QtWidgets import QApplication, QMainWindow, QMessageBox class Window(QMainWindow): def __init__(self): super().__init__() self.show() sys.excepthook = self.excepthook QTimer().singleShot(500, self.raise_) def excepthook(self, *_): QMessageBox.critical(self, "Error", "Error") sys.exit() @Slot() @staticmethod def raise_(): print("RuntimeError") raise RuntimeError app = QApplication() window = Window() sys.exit(QApplication.exec())