Bug 77206 - CRASH printing with all applications
Summary: CRASH printing with all applications
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: Other Windows (All)
: high blocker
Assignee: Chris Sherlock
URL: http://cgit.freedesktop.org/libreoffi...
Whiteboard: target:4.3.0.0.beta2
Keywords: regression
: 79177 79194 79229 79507 (view as bug list)
Depends on:
Blocks: mab4.3
  Show dependency treegraph
 
Reported: 2014-04-08 21:42 UTC by m_a_riosv
Modified: 2014-06-14 13:48 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description m_a_riosv 2014-04-08 21:42:43 UTC
Win7x64Ultimate
Version: 4.3.0.0.alpha0+ Build ID: 615f6aa293a6da90da94e6e78828198ffbc0ca5e
   TinderBox: Win-x86@39, Branch:master, Time: 2014-04-08_01:30:26

With: Calc, Writer, Impress, Draw.

E.g. in calc enter any text in A1
Menu/File/Print - Ok -> crash.
Comment 1 tommy27 2014-04-09 04:09:09 UTC
issue confirmed under Win7x64 as well using a slightly older build than yours.

print crash reproducible with Calc and Writer. did not try other apps.

Version: 4.3.0.0.alpha0+
Build ID: 7d3a899f0ea4311b216b8398751d33a88b83d6ec
TinderBox: Win-x86@39, Branch:master, Time: 2014-04-05_00:09:26

adding to mab4.3 list.
Comment 2 sophie 2014-04-28 12:02:32 UTC
Hi, I tested Calc and Writer, print jobs are done correctly with no crash. Version: 4.3.0.0.alpha1+
Build ID: 75886eb439cb8bc4d78c87482a74aaa1fa422604
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-04-27_11:28:55
Ubuntu 14.04 - Sophie
Comment 3 tommy27 2014-05-02 20:19:50 UTC
still crashing under Win7x64 using Version: 4.3.0.0.alpha1+
Build ID: 0b03f7ed575838f90e6b1ebec3538a3a214f81fb
TinderBox: Win-x86@42, Branch:master, Time: 2014-04-30_02:30:23

I have no real printed connected but it crashes even on a virtual PDF printer (Bullzip PDF printer)
Comment 4 tommy27 2014-05-08 18:02:14 UTC
tested with Writer and Calc
still crashing under Win7x64 using newer build 4.3.0.0.alpha1+
Build ID: 657004ae5c9f4a07b2cdafbb21bc8657842d4d74
TinderBox: Win-x86@39, Branch:master, Time: 2014-05-08_00:35:12

this time I've a real printer connected.
once I hit "File/Print" LibO crashes, the document however reaches the printer and is correctly printed... 

in the meantime LibO relaunch itself with DocumentRecovery dialog...
if I click on start recovery I receive this error message:

.........................................
The file '$(ARG1)' is corrupt and therefore cannot be opened. LibreOfficeDev can try to repair the file.

The corruption could be the result of document manipulation or of structural document damage due to data transmission.

We recommend that you do not trust the content of the repaired document.
Execution of macros is disabled for this document.

Should LibreOfficeDev repair the file?
.........................................

as a weird side note if you try to print an empty Writer or Calc document, with no text at all, the printing job is completed with no crash..

basically you can only print blank sheets which is completely useless.

even a single digit in the document trigger the printing crash.

I raise importance to "blocker"
Comment 5 m_a_riosv 2014-05-18 23:36:04 UTC
Still reproducible:
Win7x64Ultimate
Version: 4.3.0.0.alpha1+ Build ID: f62de9113a4866f7152acbe0e8221c594b7a7b68
   TinderBox: Win-x86@51-TDF, Branch:MASTER, Time: 2014-05-17_07:51:54
Comment 6 Yousuf Philips (jay) (retired) 2014-05-26 15:02:43 UTC
*** Bug 79229 has been marked as a duplicate of this bug. ***
Comment 7 Yousuf Philips (jay) (retired) 2014-05-26 15:03:22 UTC
Tested on Linux Mint 13 with CUPS (pdf printer) and it didnt crash. Tested on Windows XP SP3 with PrimoPDF (pdf printer) and it crashed, but the PDF was still created. Done with 4.3 beta 1.
Comment 8 tommy27 2014-05-26 16:05:12 UTC
still crashing under Win7x64 with 4.3.0.0.beta1
Build ID: b7cfa1eab1cb1e94f71d6df6612b73f231d0bf92
Comment 9 k-j 2014-05-26 20:08:59 UTC
I can reproduce it: WIN 8.1 64bit
Version: 4.3.0.0.beta1
Build-ID: 2e39c7e59c8fc8b16a54c3d981dceef27fb0c07f

Getting a "Runtime error R6025 - pure virtual function call" as mentioned in bug 79194:
https://bugs.freedesktop.org/show_bug.cgi?id=79194
Comment 10 Christian Lohmaier 2014-05-26 23:42:31 UTC
http://cgit.freedesktop.org/libreoffice/core/commit/?id=143c059ff7f69a363b3cf736a9f0197a9f25cf9c is the very likely culprit

It crashes in mpGraphics->ReleaseFonts() in vcl/source/gdi/print.cxx - as the comment above that line states:

#ifndef UNX
    // HACK to fix an urgent P1 printing issue fast
    // WinSalPrinter does not respect GetGraphics/ReleaseGraphics conventions
    // so Printer::mpGraphics often points to a dead WinSalGraphics
    // TODO: fix WinSalPrinter's GetGraphics/ReleaseGraphics handling
    mpGraphics->ReleaseFonts();
#endif


the above mentioned patch changed the handling, as before the patch the mpGraphics->ReleaseFonts(); call was guarded by the "hack-block" like this:

#ifndef UNX
    // HACK to fix an urgent P1 printing issue fast
    // WinSalPrinter does not respect GetGraphics/ReleaseGraphics conventions
    // so Printer::mpGraphics often points to a dead WinSalGraphics
    // TODO: fix WinSalPrinter's GetGraphics/ReleaseGraphics handling
    if( meOutDevType != OUTDEV_PRINTER )
#endif
        mpGraphics->ReleaseFonts();

i.e. the patch removed the if statement, probably in error.

If I restore the if again (and put the ReleaseFonts call outside of the ifndef), then no crash on windows...
Comment 11 tommy27 2014-05-27 04:52:27 UTC
*** Bug 79194 has been marked as a duplicate of this bug. ***
Comment 12 Chris Sherlock 2014-05-27 05:49:20 UTC
Yow! Sorry about that. That should be an #ifdef UNX, not #ifndef UNX...

If someone wants to do the honours (thanks to Optus, I'm without my normal Internet connection - typing this on a iPad) and test this out, it would be greatly appreciated!
Comment 13 Chris Sherlock 2014-05-27 05:50:45 UTC
Or perhaps maybe #ifndef WNT :-) this is solely a Window related bug.
Comment 14 Commit Notification 2014-05-27 11:41:04 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5970bfd278052d59c560c6f8bd33b3f7cf4cae75&h=libreoffice-4-3

Resolves: fdo#77206 CRASH printing with all applications on windows


It will be available in LibreOffice 4.3.

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 15 Commit Notification 2014-05-27 11:41:19 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: fdo#77206 CRASH printing with all applications on windows



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 16 manj_k 2014-05-27 11:45:40 UTC
*** Bug 79177 has been marked as a duplicate of this bug. ***
Comment 17 Yousuf Philips (jay) (retired) 2014-06-01 19:37:53 UTC
*** Bug 79507 has been marked as a duplicate of this bug. ***
Comment 18 Dominik 2014-06-01 20:03:37 UTC
works in build  4.4.0.0.alpha0+ Build ID: df48d00ffb4fb1bf206ea41ba704373fcc35c749
TinderBox: Win-x86@42, Branch:master, Time: 2014-06-01_01:57:36 on windows 7 x64