[Libreoffice-bugs] [Bug 136972] LibreOffice running in server mode forever, taking 100% CPU

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Sep 23 11:05:48 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=136972

--- Comment #2 from Gaëtan Delannay <gaetan.delannay at geezteem.com> ---
I have been able to reproduce the problem.

When calling LO in server mode, with LibreOffice 6.0.x, when asking him to
convert big documents (several hundreds of pages) to PDF, sometimes, the
resulting PDF was truncated: the last pages were missing from it.

For that reason, in appy/pod/converter.py, just after loading the ODT document
to convert in LO, I have added these commands, in a trial to force LO to open
it "until the end of the document":

viewCursor.jumpToLastPage()
viewCursor.jumpToEndOfPage()

With LO starting from 6.2 or 6.3, the problem of truncated PDF files has
disappeared, but I have kept this code.

These commands cause LO to enter into an infinite loop and consume 100% of CPU.

The bug can be reproduced with the attached file, if you launch LO in server
mode and WITHOUT the UI. If the UI is there, the bug does not occur.

The example below is produced with the Appy framework (pip3 install appy),
version 1.0.3:

If you launch LO 7 in server mode, but with the UI, via this command:

soffice "--accept=socket,host=0.0.0.0,port=2002;urp;"

And you try to call LO for converting the attached file to PDF, it will work:

python3 /home/gdy999/projets/appy/pod/converter.py /home/gdy999/test1.odt pdf

If you launch LO 7 in server mode, but without the UI, via this command:
soffice --invisible --headless "--accept=socket,host=localhost,port=2002;urp;"&

And you try to call LO for converting the attached file to PDF, LO will never
return and use 100% CPU.

python3 /home/gdy999/projets/appy/pod/converter.py /home/gdy999/test1.odt pdf


In the next version of Appy, I will not call these methods anymore
(jumpToLastPage, jumpToEndOfPage), but I guess it would be interesting for you
to fix this behaviour.

Thanks for your attention

Best regards
Gaetan Delannay
Appy framework developer.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200923/74b24bc7/attachment.htm>


More information about the Libreoffice-bugs mailing list