Bug 117252 - Inconsistent behaviour of HTML to PNG conversion between filters and versions
Summary: Inconsistent behaviour of HTML to PNG conversion between filters and versions
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
6.0.1.1 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Graphics-Export
  Show dependency treegraph
 
Reported: 2018-04-26 13:32 UTC by Jack O'Sullivan
Modified: 2024-06-19 05:39 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Input HTML file (17.89 KB, text/html)
2018-04-26 13:32 UTC, Jack O'Sullivan
Details
Output PNG File (59.91 KB, image/png)
2018-04-26 13:32 UTC, Jack O'Sullivan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack O'Sullivan 2018-04-26 13:32:02 UTC
Created attachment 141651 [details]
Input HTML file

I am using the LibreOffice CLI to export various import formats as PNG thumbnails. I have noticed inconsistent behaviour depending on the exact filter specified, which I noticed because the 6.0.1.1 version is not working using the same defaults as 5.3.5.2.

I have tried running the following:

soffice --headless --convert-to png --outdir /tmp Tessella.htm

on both 5.3.5.2 and 6.0.1.1 (on CentOS7), and whilst this completes and generates a believable png on 5.3, it fails with the following error on 6.0:

Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///tmp//Tessella.png> failed: 0xc10)

Both versions defaulted to using the "writer_web_png_Export" filter.


For both versions, I then tried:

soffice --headless --convert-to png:$FILTER --outdir /tmp $INPUTFILE.htm

for the following filters:
PNG___Portable_Network_graphic  (1)
calc_png_Export  (2)
draw_png_Export  (3)
impress_png_Export   (4)
writer_png_Export   (5)

with the following behaviours:
(1) both versions give:
Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///tmp//Tessella.png> failed: 0x81a)

(2) Works on both

(3) both versions give:
Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///tmp//Tessella.png> failed: 0xc10)

(4) both versions give:
Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///tmp//Tessella.png> failed: 0xc10)

(5) Works on both


It's not clear to me that draw and impress should fail where calc and writer both work (although if this is expected behaviour that's fine), but clearly it's problematic for me that writer_web seems to have broken between 5.3 and 6.0.

I have attached the htm that I am using, and the png that gets exported (it appears to be the exact same file that is generated by each of the filters that work).
Comment 1 Jack O'Sullivan 2018-04-26 13:32:41 UTC
Created attachment 141652 [details]
Output PNG File
Comment 2 Buovjaga 2018-05-14 18:18:46 UTC
Reproduced.

For convenience, the full commands:
soffice --headless --convert-to png:PNG___Portable_Network_graphic --outdir /tmp Tessella.htm
soffice --headless --convert-to png:calc_png_Export --outdir /tmp Tessella.htm
soffice --headless --convert-to png:draw_png_Export --outdir /tmp Tessella.htm
soffice --headless --convert-to png:impress_png_Export --outdir /tmp Tessella.htm
soffice --headless --convert-to png:writer_png_Export --outdir /tmp Tessella.htm

Arch Linux 64-bit
Version: 6.1.0.0.alpha1+
Build ID: 21b11273ae91f0cf7fd5f3f9fd2168e4349852c4
CPU threads: 8; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on May 11th 2018
Comment 3 QA Administrators 2019-05-15 02:57:09 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2021-05-15 04:17:40 UTC Comment hidden (obsolete)
Comment 5 Jack O'Sullivan 2021-05-20 09:40:16 UTC
Re-tested against 7.0.6.2, behavior seems to still be as described. Default --convert-to png does not work. For each specified filter, the same pass or fail as described in the original ticket is still occurring.
Comment 6 MichaelWilliams 2022-03-22 15:14:58 UTC Comment hidden (spam)
Comment 7 Jack O'Sullivan 2022-07-11 14:24:02 UTC
Still appears to be broken in 7.2.7.2, but all PNG filters seem to be broken now.
Comment 8 Buovjaga 2022-07-11 14:50:39 UTC
It should be possible to bibisect this, I overlooked it before.

That said, as part of a Google Summer of Code project, our own PNG writing code is being replaced by the libpng library: https://gerrit.libreoffice.org/c/core/+/136008

Might be interesting to re-test with a daily build after that patch is merged.
Comment 9 Jack O'Sullivan 2022-07-11 15:23:16 UTC
Thanks for the update, this isn't critical for me (as you can probably tell from the infrequent updates) but it would be nice to have a fix, hence me keeping it open. Checking a daily build sounds a bit more involved than I generally have time for, but happy to check back in after the SoC stuff makes it into a release build.
Comment 10 Adam664 2023-07-12 17:14:25 UTC
Confirming this still happens using 

      soffice --headless --convert-to png --outdir /tmp Tessella.htm
in

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e24a3a3c339d7a175ebfeef31a280becda9d5950
CPU threads: 1; OS: Linux 6.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 11 Adam664 2023-07-12 17:19:05 UTC
bibisected using linux-64-6.0 

and this command: soffice --headless --convert-to png --outdir /tmp Tessella.htm
 3fbb8a638b54f35af28d738c422e164658e69865 is the first bad commit
commit 3fbb8a638b54f35af28d738c422e164658e69865
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Sun Sep 24 03:19:21 2017 +0200

    source 5d1bfa6586bad79f2ab9279bcecfee9c245d4501
    
    source 5d1bfa6586bad79f2ab9279bcecfee9c245d4501

 instdir/program/libgraphicfilterlo.so | Bin 102472 -> 102472 bytes
 instdir/program/versionrc             |   2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)

Adding Cc: to <erak@redhat.com>
Comment 12 Stéphane Guillou (stragu) 2024-06-19 05:39:51 UTC
(In reply to Buovjaga from comment #2)
> Reproduced.
> 
> For convenience, the full commands:
Tested all with:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6f4adc1274cfac30b9097411bb193bd4386969f0
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Still getting errors with the filters (1), (3) and (4):

soffice --headless --convert-to png:PNG___Portable_Network_graphic --outdir /tmp Tessella.htm
soffice --headless --convert-to png:draw_png_Export --outdir /tmp Tessella.htm
soffice --headless --convert-to png:impress_png_Export --outdir /tmp Tessella.htm

All resulting in:

Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///tmp/Tessella.png> failed: 0xc10(Error Area:Io Class:Write Code:16) at /[...]/sfx2/source/doc/sfxbasemodel.cxx:3299 at /[...]/sfx2/source/doc/sfxbasemodel.cxx:1817)

If I try to open the file with the GUI, it opens in Writer's Web view (with the macro warning banner), and then File > Export > PNG gives me no error message but no output file whatsoever.