I have a script that runs in LibreOffice Calc that uses matplotlib.pyplot.
It used to work on a daily basis, but I ran it yesterday, (after a gap of maybe 2 months) and it crashed libreoffice.
Through trial and error I narrowed down the last statement run before the crash to "import matplotlib.pyplot as plt". When I removed the statement, the script ran without a crash.
I moved the "import matplotlib.pyplot as plt" line down to after the logging started, and this message came out in the log before the crash occurred: "Loaded backend qt5agg version unknown." QT5Agg is a "Backend" for pyplot, i.e., it provides lower-level graphics support for the drawing of the chart images.
If I put this in a python script outside of the libreoffice environment (for example, in a jupyter notebook, or a standalone python script), it doesn't crash.
I'm wondering whether LO cannot access the backend QT5Agg, and that's why this crash is happening.
As I say, this used to work fine every time, and after no changes to the script it crashes Libreoffice, this would have occurred over perhaps the last 2 months. I've been keeping my software up-to-date.
Python : 3.6.8
Matplotib : 3.1.1
QT : 5.9.5
Steps to Reproduce:
1. Create python script with the following lines of code: (I'm assuming that it would be necessary to match the OS, LO version, etc.) This is a simplified script that I hope will suffice for bug reporting purposes)
import matplotlib.pyplot as plt
2. Open an empty Calc spreadsheet and run the script
3. It will cause LO to crash
The script will run without crashing LibreOffice. The script does not do anything but load the modules.
User Profile Reset: No
Build ID: 1:6.0.7-0ubuntu0.18.04.10
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: kde4;
Locale: en-CA (en_CA.UTF-8); Calc: group
Thank you for reporting the bug.
it seems you're using an old version of LibreOffice.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INSUFFICIENTDATA
due to lack of needed information.
For more information about our NEEDINFO policy please read the
wiki located here:
If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.
Thank you for helping us make LibreOffice even better for everyone!
Please read this message in its entirety before proceeding.
Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):
a) Provide details of your system including your operating
system and the latest version of LibreOffice that you have
confirmed the bug to be present
b) Provide easy to reproduce steps – the simpler the better
c) Provide any test case(s) which will help us confirm the problem
d) Provide screenshots of the problem if you think it might help
e) Read all comments and provide any requested information
Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:
a) respond via email
b) update the version field in the bug or any of the other details
on the top section of our bug tracker