Download it now!
Bug 117625 - FILESAVE Writer freezes when exporting to PDF through unoconv
Summary: FILESAVE Writer freezes when exporting to PDF through unoconv
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.6.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2018-05-15 14:33 UTC by Stefan
Modified: 2019-09-08 14:52 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT file that causes freeze (27.88 KB, application/vnd.oasis.opendocument.text)
2018-05-15 14:33 UTC, Stefan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan 2018-05-15 14:33:19 UTC
Created attachment 142114 [details]
ODT file that causes freeze

I'm converting ODT files to PDF, using LO Writer through unoconv. The ODT files are generated by Appy Pod[1].

In most cases, the above works perfectly fine, however with some documents, LO Writer freezes/takes 100% CPU load on one core, without crashing or responding at all.

unoconv command line to reproduce: (download the file from the attachments)

  unoconv -f pdf -vvv directive_1640_56.odt

Output on my system:

  Verbosity set to level 3 
  Using office base path: /usr/lib64/libreoffice
  Using office binary path: /usr/lib/libreoffice/program
  DEBUG: Connection type: 
  socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ComponentContext
  DEBUG: Existing listener not found.
  DEBUG: Launching our own listener using 
  /usr/lib/libreoffice/program/soffice.bin.
  LibreOffice listener successfully started. (pid=31074)
  Input file: directive_1640_56.odt

Version 5.4.6.2 40m0(Build:2) is affected as well.

[1] http://appyframework.org/pod.html
Comment 1 Buovjaga 2018-06-14 18:58:43 UTC
Repro.
Exporting through UI works fine.

Arch Linux 64-bit
Version: 6.0.4.2
Build ID: 6.0.4-1
CPU threads: 8; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Comment 2 michi88 2018-08-27 21:42:26 UTC
I'm having the same issue and also tested with the file attached here running directly with libreoffice:

root@linuxkit-025000000001:/src# convert /src/directive_1640_56.odt -> /src/directive_1640_56.pdf using filter : writer_pdf_Export
Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///src/directive_1640_56.pdf> failed: 0x11b)

root@linuxkit-025000000001:/src# soffice --version
LibreOffice 6.0.3.2 00m0(Build:2)

Other files convert just fine.

Ubuntu 18.04 on docker
Comment 3 michi88 2018-08-27 22:09:21 UTC
Didn't paste the command correctly in my last comment:

soffice --convert-to pdf directive_1640_56.odt
root@linuxkit-025000000001:/src# convert /src/directive_1640_56.odt -> /src/directive_1640_56.pdf using filter : writer_pdf_Export
Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///src/directive_1640_56.pdf> failed: 0x11b)


When running the same with unoconv this is the error:

root@c583f9e05fc7:/src# unoconv -vvv -f pdf directive_1640_56.odt
Verbosity set to level 3
Using office base path: /usr/lib/libreoffice
Using office binary path: /usr/lib/libreoffice/program
DEBUG: Connection type: socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ComponentContext
Input file: directive_1640_56.odt
Selected output format: Portable Document Format [.pdf]
Selected office filter: writer_pdf_Export
Used doctype: document
Output file: file:///src/directive_1640_56.pdf
Traceback (most recent call last):
  File "/usr/bin/unoconv", line 1030, in convert
    document.storeToURL(outputurl, tuple(outputprops) )
uno.IOException: SfxBaseModel::impl_store <file:///src/directive_1640_56.pdf> failed: 0x11b

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/unoconv", line 1275, in <module>
    main()
  File "/usr/bin/unoconv", line 1191, in main
    convertor.convert(inputfn)
  File "/usr/bin/unoconv", line 1032, in convert
    raise UnoException("Unable to store document to %s (ErrCode %d)\n\nProperties: %s" % (outputurl, e.ErrCode, outputprops), None)
  File "/usr/lib/python3/dist-packages/uno.py", line 507, in _uno_struct__getattr__
    return getattr(self.__dict__["value"], name)
AttributeError: ErrCode
Comment 4 michi88 2018-08-27 23:30:13 UTC
I think I got those errors because of file locking:

Document file 'directive_1640_56.pdf' is locked for editing by:

root ( 27.08.2018 14:22 )

You may try to ignore the file locking and overwrite the existing document.

When doing that also the UI freezes with 100% CPU.

Version: 6.1.0.3
Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1
CPU threads: 4; OS: Mac OS X 10.13.5; UI render: default; 
Locale: en-US (en_NL.UTF-8); Calc: group threaded
Comment 5 michi88 2018-08-28 00:31:13 UTC
BTW, Word for Mac (which can also open .odt) also has problems with this file:

.... found problems with it's contents:

Details:

HRRESULT 0x80004005

Location: Part: /content.xml, Line: 0, Column: 0
Comment 6 QA Administrators 2019-09-02 09:28:18 UTC Comment hidden (obsolete)
Comment 7 mattia.b89 2019-09-06 22:14:57 UTC
Issue still here with:

Version: 6.3.1.2
Build ID: 6.3.1-1
CPU threads: 4; OS: Linux 5.2; UI render: default; VCL: gtk3; 
Locale: it-IT (en_GB.UTF-8); UI-Language: en-GB
Calc: threaded