Bug 117625 - FILESAVE Writer freezes when exporting to PDF through unoconv
Summary: FILESAVE Writer freezes when exporting to PDF through unoconv
Status: RESOLVED WORKSFORME
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: 2021-09-08 07:25 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
Comment 8 QA Administrators 2021-09-08 03:41:48 UTC Comment hidden (obsolete)
Comment 9 mattia.b89 2021-09-08 07:25:19 UTC
Bug has gone for me!

Version: 7.2.0.4 / LibreOffice Community
Build ID: 20(Build:4)
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: it-IT (en_GB.UTF-8); UI: en-GB
7.2.0-2
Calc: threaded

$ pacman -Si unoconv
Repository      : extra
Name            : unoconv
Version         : 0.9-2
Description     : Libreoffice-based document converter
Architecture    : any
URL             : http://dag.wiee.rs/home-made/unoconv
Licenses        : GPL2
Groups          : None
Provides        : None
Depends On      : python  libreoffice
Optional Deps   : None
Conflicts With  : None
Replaces        : None
Download Size   : 24.01 KiB
Installed Size  : 75.00 KiB
Packager        : Evangelos Foutras <evangelos@foutrelis.com>
Build Date      : Tue 19 May 2020 09:55:58 CEST
Validated By    : MD5 Sum  SHA-256 Sum  Signature


$ unoconv -f pdf -vvv directive_1640_56.odt
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 arguments are ['/usr/lib/libreoffice/program/soffice.bin', '--headless', '--invisible', '--nocrashreport', '--nodefault', '--nofirststartwizard', '--nologo', '--norestore', '--accept=socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ComponentContext'].
LibreOffice listener successfully started. (pid=13126)
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:///tmp/directive_1640_56.pdf
DEBUG: Terminating LibreOffice instance.
DEBUG: Waiting for LibreOffice instance to exit.

$ file /tmp/directive_1640_56.pdf
/tmp/directive_1640_56.pdf: PDF document, version 1.6, 7 pages