Description: Create a Python macro. Add any simple PySide6 (PyQT6) dialog window. Everything works but when the macro ends, whole LO crashes. It does not matter what you use, nothing or combination of sys.exit(app.exec()), app.quit() or other commands. I am not the only one. I found this: https://stackoverflow.com/questions/75325084/is-there-a-possibility-to-close-a-pyqt-dialog-in-libre-office-properly-python-m. In older version of LO, it worked with just sys.exit(app.exec()). After upgrade, the crashes started. Not sure what the older version was. Also it seemed to me that the older LO version has PyQT singleton instance running but in this new version 7.5.5.2, I have to create a new instance in the macro. Steps to Reproduce: 1. Write a basic HelloWorld Python macro. 2. Add a basic HelloWorld PySide6 dialog using a ui file. 3. Run the macro. It crashes on the last line. Actual Results: Crash of LO. Expected Results: Gracefully closing the Python macro and continue work in LO. Reproducible: Always User Profile Reset: Yes Additional Info: Other user having the same or very similar problem: https://stackoverflow.com/questions/75325084/is-there-a-possibility-to-close-a-pyqt-dialog-in-libre-office-properly-python-m Version: 7.5.5.2 (X86_64) / LibreOffice Community Build ID: 50(Build:2) CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-GB (cs_CZ.UTF-8); UI: cs-CZ Ubuntu package version: 4:7.5.5~rc2-0ubuntu0.22.04.1~lo1 Calc: threaded
Can you please share a sample script for testing? How did you instal pyqt6? Are you using the system interpreter or LO's internal interpreter? What OS are you using?
Created attachment 190158 [details] Hello World GUI test
Created attachment 190159 [details] Error Screenshot
(In reply to Rafael Lima from comment #1) > Can you please share a sample script for testing? > > How did you instal pyqt6? Are you using the system interpreter or LO's > internal interpreter? > > What OS are you using? Hi, thank you! Yes, I am attaching a sample script. Runs nicely, when the window is closed, the whole LibreOffice crashes (I am attaching the error screenshot). I am on Linux Mint 21.2 and LibreOffice is installed using deb. That means LibreOffice is using the system Python interpreter (which I also confirmed in APSO Python Shell). PyQT6 was installed using 'pip install PyQt6' or actually 'pip install PySide6' maybe (not sure now) into the system Python. My friend was also successful on Mac with installing PyQT6 using pip into LibreOffice's Python interpreter and the window also runs nicely. Not sure if it also crashes on close but he has an older version of LO anyways and in that older version (not sure which) closing the window did not crash LO both on Mac and Linux. Now I have LibreOffice 7.6.1.2 and closing the PyQT window crashes whole LO.
[Automated Action] NeedInfo-To-Unconfirmed