Thanks a lot! I did a quick test and it seems to work on LibreOffice 24.8.1.2 (Ubuntu).
Thanks, but this is not the optimal solution. LibreOffice keeps developing and new versions will continuously replace older ones. If TexMaths is actively developed, which I believe it is, then this issue must be solved.
I get the exact same error in Ubuntu, after LibreOffice was updated to 24.8.1.2.