Bug 109281 - Printing omits all text
Summary: Printing omits all text
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
5.4.0.1 rc
Hardware: x86-64 (AMD64) Windows (All)
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0 target:5.4.0
Keywords: bibisected, bisected, regression
: 109279 111624 (view as bug list)
Depends on:
Blocks: Print DirectWrite
  Show dependency treegraph
 
Reported: 2017-07-23 06:03 UTC by Christoffer
Modified: 2017-08-10 08:53 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
Printing documents omits all text (205.78 KB, image/jpeg)
2017-07-23 07:41 UTC, Christoffer
Details
console output (126.78 KB, text/plain)
2017-07-24 00:09 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoffer 2017-07-23 06:03:52 UTC
Sending a document to the printer omits all text.
http://bugs.documentfoundation.org/attachment.cgi?id=134786

Tested with 5.4.0.2
and libo-master64~2017-07-21_04.09.11_LibreOfficeDev_6.0.0.0.alpha0_Win_x64
Comment 1 Christoffer 2017-07-23 06:43:10 UTC
> From https://bugs.documentfoundation.org/show_bug.cgi?id=107166
(In reply to V Stuart Foote from comment #102)
> (In reply to Christoffer from comment #96)
> > 
> > The bug isn't fixed completely yet.
> > Sending a document to the printer omits all text. I guess it's the same bug.
> > Check my attachment .jpg
> 
> That is troubling, and a new issue.  Displaying to document canvas and the
> GUI are isolated from the print and PDF export.
> 
> Could you try your printing with Tools -> Options -> View: "Use hardware
> acceleration" unchecked.
> 
> Also, report test results of an export to PDF.
> 
> This printing issue will need a new BZ report opened, please do so.

Exporting to PDF works.
Hardware acceleration option does not affect the issue.
Comment 2 Christoffer 2017-07-23 07:41:59 UTC
Created attachment 134789 [details]
Printing documents omits all text
Comment 3 tommy27 2017-07-23 07:47:18 UTC
please attach the offending file (or does it happens with any document?) so we can retest.

P.S. I remove the reference to the mab5.0 since the MAB metabugs are no longer used here in bugzilla.
Comment 4 Christoffer 2017-07-23 07:52:50 UTC
It happens with any document, including different documents created with Writer, Draw, Impress, Calc and Math.
Comment 5 Christoffer 2017-07-23 08:07:45 UTC
Exporting to PDF then printing with Adobe Reader is a workaround, tested just now.
Comment 6 tommy27 2017-07-23 08:56:30 UTC
I confirm issue with LibO 6.0.0.0.alpha0+
Build ID: 28b382b7b0a32417e0aedd4ae415a69e479fe60b
CPU threads: 8; OS: Windows 6.1; UI render: GL; 
TinderBox: Win-x86@39, Branch:master, Time: 2017-07-23_03:20:41
Locale: it-IT (it_IT); Calc: group

printing is completely broken...
blank pages come out from the printer...

my O/S is Win7x64 and  my printer is an HP Officejet Pro 8100.

interestingly I was able to print with a previous 6.0.x daily build from july 20th.. 

it seems it's a very recent regression!!!

I raise importance to "highest critical".
Comment 7 Christoffer 2017-07-23 09:11:56 UTC
I can print images and objects but no text.
Comment 8 Julien Nabet 2017-07-23 12:12:30 UTC
*** Bug 109279 has been marked as a duplicate of this bug. ***
Comment 9 Julien Nabet 2017-07-23 12:17:50 UTC
I put bibisectRequest even if 6.0 is ok because I think it could be easiest to find the fix already on 6.0 if we know the commit which triggered the problem.
Comment 10 Aron Budea 2017-07-23 14:42:16 UTC
(In reply to Julien Nabet from comment #9)
> I put bibisectRequest even if 6.0 is ok because I think it could be easiest
> to find the fix already on 6.0 if we know the commit which triggered the
> problem.

6.0 is not okay, tommy27 confirmed with a daily build from the 23rd.

(In reply to tommy27 from comment #6)
> I confirm issue with LibO 6.0.0.0.alpha0+
> Build ID: 28b382b7b0a32417e0aedd4ae415a69e479fe60b
> CPU threads: 8; OS: Windows 6.1; UI render: GL; 
> TinderBox: Win-x86@39, Branch:master, Time: 2017-07-23_03:20:41
> Locale: it-IT (it_IT); Calc: group
(...)
> interestingly I was able to print with a previous 6.0.x daily build from
> july 20th.. 

This commit is the very likely cause, see bug 107166:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=3fdc41af6370a53f7db4e52104cfd3328ee40563
author		Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	2017-07-19 21:28:31 (GMT)
committer	Tomaž Vajngerl <quikee@gmail.com>	2017-07-20 16:26:24 (GMT)

"tdf#107166 improve AA mode selection, retry, more checks"


Is there a way to repro this bug without actual printing?
I wonder if installing a Canon driver software including Canon IJ Preview would be good enough (I can look for it and test later today).
Comment 11 Julien Nabet 2017-07-23 15:08:27 UTC
(In reply to Aron Budea from comment #10)
> (In reply to Julien Nabet from comment #9)
> > I put bibisectRequest even if 6.0 is ok because I think it could be easiest
> > to find the fix already on 6.0 if we know the commit which triggered the
> > problem.
> 
> 6.0 is not okay, tommy27 confirmed with a daily build from the 23rd.
> 
Oups! you're right!

> ...
> 
> Is there a way to repro this bug without actual printing?
> I wonder if installing a Canon driver software including Canon IJ Preview
> would be good enough (I can look for it and test later today).
On Windows, perhaps by installing virtual printer (PDF creator)?
Comment 12 Julien Nabet 2017-07-23 15:09:26 UTC
Tomaz: following comment 10, thought you might be interested in this one.
Comment 13 Aron Budea 2017-07-24 00:09:44 UTC
Created attachment 134804 [details]
console output

(In reply to Julien Nabet from comment #11)
> On Windows, perhaps by installing virtual printer (PDF creator)?

Good idea, Foxit Reader worked (it's a PDF reader, but adds a PDF printer as well).

Repro with commit 3fdc41af6370a53f7db4e52104cfd3328ee40563, no repro with the preceding commit.

For me it's reproducible even with computers where bug 107166 wasn't (with my main computer, locally for example). Reproducible both with OpenGL enabled and disabled.

Attaching console output of the following process: start Writer, type a word, File -> Print..., print to Foxit Reader PDF Printer, exit Writer.
The following line looks suspicious:
warn:vcl.gdi:9940:7936:vcl/win/gdi/DWriteTextRenderer.cxx:231 HRESULT failed with: -2147024809

Note that OpenGL was enabled. When it's disabled, 99% of the warnings are gone, but the same HRESULT failed message is there as well.
Comment 14 Aron Budea 2017-07-24 00:17:42 UTC
On a somewhat unrelated note, I'd be very interested to know what these are about in the console output:

- warn:vcl.gdi:9940:7936:vcl/win/gdi/winlayout.cxx:73: SelectObject failed: The operation completed successfully.
- warn:vcl.gdi:9940:7936:vcl/win/gdi/winlayout.cxx:86: Binding of font failed. The font might not be supported by Direct Write.
- warn:vcl.opengl:9940:7936:vcl/opengl/win/gdiimpl.cxx:104: wglMakeCurrent failed: The operation completed successfully.
Comment 15 Tomaz Vajngerl 2017-07-24 12:59:19 UTC
OK I'm looking into this..
Comment 16 Jan Holesovsky 2017-07-25 12:36:30 UTC
Fix for this one has been submitted to gerrit.
Comment 17 Commit Notification 2017-07-25 13:51:52 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#109281 add fallback to GDI back when we can't bind a DC

It will be available in 6.0.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 18 Commit Notification 2017-07-25 20:16:02 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

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

tdf#109281 add fallback to GDI back when we can't bind a DC

It will be available in 5.4.1.

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 19 Commit Notification 2017-07-25 20:17:31 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=10a2dd0ca46cf05234019d10d8eac19ebaca1b63&h=libreoffice-5-4-0

tdf#109281 add fallback to GDI back when we can't bind a DC

It will be available in 5.4.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 20 Aron Budea 2017-07-26 03:33:07 UTC
Would it useful to let the fallback be disabled with an environment variable for testing/bughunting purposes?
Comment 21 V Stuart Foote 2017-07-26 12:41:57 UTC
confirmed fixed

On Windows 10 Pro 64-bit en-US with
Version: 6.0.0.0.alpha0+
Build ID: 343d40206a929969e1755b073edae91cc4bd9751
CPU threads: 8; OS: Windows 6.19; UI render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-07-26_05:51:20
Locale: en-US (en_US); Calc: CL
Comment 22 Christoffer 2017-07-26 14:06:07 UTC
Text appear on screen, preview and on paper now. No apparent issues with the new RC.
Comment 23 V Stuart Foote 2017-07-26 14:11:23 UTC
(In reply to Christoffer from comment #22)

to VERIFIED then, thanks for checking.
Comment 24 kontaktak 2017-07-26 17:24:47 UTC
(RE: Christoffer from comment #22)


Tested Version5.4.0.3 on 2 Win7/32Bits systems - no problems
Comment 25 Timur 2017-08-10 08:53:39 UTC
*** Bug 111624 has been marked as a duplicate of this bug. ***