Bug 103051 - Export to pdf scrambles png GTK3
Summary: Export to pdf scrambles png GTK3
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
5.1.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.3.0 target:5.1.6 target:5.2.4
Keywords: bibisected, bisected, filter:pdf, regression
: 103496 104961 (view as bug list)
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2016-10-07 13:17 UTC by Taylor
Modified: 2017-10-27 11:22 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Contains exported pdf document, odt document and png file. (20.00 KB, application/x-tar)
2016-10-07 13:17 UTC, Taylor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Taylor 2016-10-07 13:17:56 UTC
Created attachment 127857 [details]
Contains exported pdf document, odt document and png file.

May be duplicate of following bugs: 89387 and 96654.
Both have been closed as "FIXED" in earlier versions.

Not a duplicate of: 
    93462 -- occurs under both selectable compressions
    98802 -- as far as I can tell, not the same symptom

OS Information: Arch Linux

Steps to reproduce:
1) Create PNG image (I used qrencode to make a qr image)
2) Add to document
3) Export as PDF

Actual results:
PNG exported to PDF did not match PNG in document

Expected results:
PNG exported to PDF should not have changed as it did.

First encounter:
09/21/2016 on Arch Linux

Additional Builds and Platforms:
Does not occur under Windows.
Comment 1 Joel Madero 2016-10-08 04:40:31 UTC
This is fixed in 5.3 so I'm closing this as WFM.

I tested with 5.1.4.2 and 5.3 master and in 5.1.4.2 it's broken but 5.3 it's resolved. This won't be backported unless you track down the exact commit that resolved the problem (sorry our developer are just stretched to thin to go back and track this minor issue down).

If you can confirm this issue on a current daily build of LibreOffice please set back to UNCONFIRMED.

http://dev-builds.libreoffice.org/daily/master/
Comment 2 Taylor 2016-10-10 20:21:15 UTC
I did the following:
$ git clone git://anongit.freedesktop.org/libreoffice/core libreoffice
$ cd libreoffice && ./autogen.sh && make
$ instdir/program/soffice

Build IDs: ae94c223e2e21e42fc7feca72402b910e5eab5c7 and e0d442b1995082fd28614d51b85cb4248ba8189d

(those are the same as the git hash, right?).

The same thing happened that I described in initial bug report.

It might be a supporting library.

What distribution did you test on? I can try and see if I can reproduce with something approximating your setup.

Anyway, I'm currently waiting on the clone of the bibisect repository to finish right now.
Comment 3 Taylor 2016-10-11 02:19:35 UTC
OK, I just ran a bisect on the binary tree and found the "bad" commit.
 daca5ed1742e6c0f2a10739b2bb5ee813b964515 is the first bad commit
commit daca5ed1742e6c0f2a10739b2bb5ee813b964515
Author: Miklos Vajna <vmiklos@collabora.co.uk>
Date:   Thu Jun 2 05:42:39 2016 +0200

    2016-06-02: source-hash-242b51c9f6ba0c580b73b713cbaacc4fb922c28e

:100644 100644 b4d911496e20379ec21028576534240ac1996802 ee2a5f29cdd7fc6d53875512c8d4e8d605f0462e M	build-info.txt
:040000 040000 25691fdace53a7febb5269908f5a1b72cca957cb c96a43bbc4a71165af333ed5daab34ce4ceb3cc2 M	opt


Here is the git bisect log:
git bisect start
# bad: [8bb36bab947443d584581f030c7d476f96f414c7] 2016-10-10: source-hash-8bfbd7fbd74b69959929e29df3c99aa22ec13ca5
git bisect bad 8bb36bab947443d584581f030c7d476f96f414c7
# good: [5d480e64a972e0a71aa58a261d3d9706336400dd] 2016-05-26: source-hash-a042951ad4db2b84021e1d43361511dec998ce82
git bisect good 5d480e64a972e0a71aa58a261d3d9706336400dd
# skip: [05b36582da87aa073ece143551b279ae00fab5ca] 2016-08-02: source-hash-389b08190092f9a9103b3ac098994ec83b2d0bfa
git bisect skip 05b36582da87aa073ece143551b279ae00fab5ca
# bad: [c316db64b322fa426baf09e3f0552f4a95017248] 2016-06-07: source-hash-b3f1afc28fa537e6d4ff15de457a4a9dc4af809e
git bisect bad c316db64b322fa426baf09e3f0552f4a95017248
# good: [dc618681d9501059b3e706ba76227c2deccba966] 2016-06-01: source-hash-cbf36dd473fdc9e8d8b78c9e9317836a7cbbc6c7
git bisect good dc618681d9501059b3e706ba76227c2deccba966
# bad: [bbc57ae90098122ca2c60213295bc3702adcfab5] 2016-06-04: source-hash-b2abb97a6545096d6952430f7ff37cadb1a23707
git bisect bad bbc57ae90098122ca2c60213295bc3702adcfab5
# bad: [8a5681a22f947ca4a6f276379e5a4f23e27ecdd9] 2016-06-03: source-hash-6b3b352b06d92ef20194b9a992a521af2ef07b48
git bisect bad 8a5681a22f947ca4a6f276379e5a4f23e27ecdd9
# bad: [daca5ed1742e6c0f2a10739b2bb5ee813b964515] 2016-06-02: source-hash-242b51c9f6ba0c580b73b713cbaacc4fb922c28e
git bisect bad daca5ed1742e6c0f2a10739b2bb5ee813b964515
# first bad commit: [daca5ed1742e6c0f2a10739b2bb5ee813b964515] 2016-06-02: source-hash-242b51c9f6ba0c580b73b713cbaacc4fb922c28e
Comment 4 Xisco Faulí 2016-10-13 12:13:38 UTC
Confirmed in

Version: 5.3.0.0.alpha0+
Build ID: ae94c223e2e21e42fc7feca72402b910e5eab5c7
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 5 Xisco Faulí 2016-10-13 12:27:11 UTC
Regression introduced by

author	Caolán McNamara <caolanm@redhat.com>	2016-06-01 10:37:39 (GMT)
committer	Caolán McNamara <caolanm@redhat.com>	2016-06-01 12:25:30 (GMT)
commit de8c740ca1aaebd51e3f18b05110f756ddce5cf8 (patch)
tree 5594321981685813fe564df74ef3f4b395bb9789
parent 9bf1dac4be55f8591d5fd2b8aa93c9369191c02c (diff)

1 bit masks need each byte to be reversed
to match CAIRO_FORMAT_A1 ordering

as seen under gtk3 with animated gif of tdf#99519

Adding Cc: to Caolán McNamara
Comment 6 Caolán McNamara 2016-10-13 19:18:25 UTC
This presumably only affects the gtk3/headless backends with the use of an alternative format 1 bit bitmap tripping up the pdf export assumptions
Comment 7 Commit Notification 2016-10-13 19:44:04 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1c9096dad7dc2ee25d9ebe16ab02d5caba5f8a79

Resolves: tdf#103051 pdf export assumed 1bit bitmaps were N1BitMsbPal

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Buovjaga 2016-10-13 19:54:26 UTC
Taylor: would you like to join QA team? Here is the contact info: https://wiki.documentfoundation.org/QA/GetInvolved#Contact
Comment 9 Commit Notification 2016-10-18 10:45:44 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-1-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=295932259f624988b5891bfa18491b11b50302be&h=libreoffice-5-1-6

Resolves: tdf#103051 pdf export assumed 1bit bitmaps were N1BitMsbPal

It will be available in 5.1.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2016-10-18 10:45:54 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=112f4bbea029d71ad35873d7e3585c8e1c01460d&h=libreoffice-5-1

Resolves: tdf#103051 pdf export assumed 1bit bitmaps were N1BitMsbPal

It will be available in 5.1.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2016-10-18 13:27:10 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ac245ef35b6a70474909a66e8988ee225321e9b4&h=libreoffice-5-2

Resolves: tdf#103051 pdf export assumed 1bit bitmaps were N1BitMsbPal

It will be available in 5.2.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Julien Nabet 2016-10-25 15:18:22 UTC
*** Bug 103496 has been marked as a duplicate of this bug. ***
Comment 13 Xisco Faulí 2017-10-27 11:22:53 UTC
*** Bug 104961 has been marked as a duplicate of this bug. ***