Bug 114314 - Draw filter export of specific ODG to PDF/A-1a format crashes LO and system
Summary: Draw filter export of specific ODG to PDF/A-1a format crashes LO and system
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.3.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf, haveBacktrace
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2017-12-07 15:32 UTC by Chris Piker
Modified: 2019-03-09 10:59 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Large format Draw single page poster (6.90 MB, application/vnd.oasis.opendocument.graphics)
2017-12-07 15:35 UTC, Chris Piker
Details
Output of soffice --backtrace >> backtrace.log (715 bytes, text/plain)
2017-12-07 15:38 UTC, Chris Piker
Details
File referenced in backtrace.log (3.80 KB, text/plain)
2017-12-07 15:40 UTC, Chris Piker
Details
Xorg backtrace (1.59 KB, text/plain)
2017-12-07 17:57 UTC, Chris Piker
Details
ODG exported to PDF embedded fonts, Hybrid format with embedded .ODG (6.93 MB, application/pdf)
2017-12-07 19:44 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Piker 2017-12-07 15:32:01 UTC
Description:
The attached PDF crashes all of X-Windows when the Convert to PDF option is selected.  The exact same behavior is observed on three different computers:

  Linux Mint 18.1, Libreoffice-draw (5 series, don't know exact version), NVidia 630
  Linux Mint 18.1, Libreoffice-draw (5 series, don't know exact version), Intel Mobile
  Linux CentOS 6.9 Libreoffice-draw (4.3.7.2), NVida ???

On CentOS problem affects both Gnome and KDE desktops

To reproduce this problem simply load the attached file into Libreoffice Draw and select the following options for PDF export:

  General:  * Range All
            * Lossless compression
            * PDF/A-1a
            * View After Export

  Initial View:  * Page Only

  User Interface:  * Display document after export

  Links:           (No options selected)

  Security:        (No options selected)

This is my presentation, which has to get submitted in PDF format today so I'm understandably distressed.

Steps to Reproduce:
1. Use File open to load the attached file (agu_2017_poster-0.6.odg) into Libreoffice

2. Select Export as PDF

3. select the following options for PDF export

  General:  * Range All
            * Lossless compression
            * PDF/A-1a
            * View After Export

  Initial View:  * Page Only

  User Interface:  * Display document after export

  Links:           (No options selected)

  Security:        (No options selected)


Actual Results:  
Application works for a bit then takes out entire desktop.

Expected Results:
Should have produced a PDF


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 4.3.7.2
Build ID: 4.3.7.2-2.el6_9.1

(Also affects current version on Linux Mint 18.1, it's something in the 5 series)


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Chris Piker 2017-12-07 15:35:03 UTC
Created attachment 138279 [details]
Large format Draw single page poster
Comment 2 Chris Piker 2017-12-07 15:38:27 UTC
Created attachment 138280 [details]
Output of soffice --backtrace >> backtrace.log
Comment 3 Chris Piker 2017-12-07 15:40:07 UTC
Created attachment 138281 [details]
File referenced in backtrace.log
Comment 4 Chris Piker 2017-12-07 15:54:09 UTC
On Windows 7 virtual machine with all acceleration turned off exporting to PDF using LibreOffice 5, the display does not crash of course, but the output PDF is blank.
Comment 5 Chris Piker 2017-12-07 17:57:14 UTC
Created attachment 138283 [details]
Xorg backtrace

Found the bug trigger is selecting PDF-A/1a in the export options.  Here's the X server backtrace
Comment 6 V Stuart Foote 2017-12-07 19:44:32 UTC
Created attachment 138284 [details]
ODG exported to PDF embedded fonts, Hybrid format with embedded .ODG

No issue opening and exporting to PDF with Windows 10 Ent 64-bit en-US (ver 1709)
Version: 5.4.3.2 (x64)
Build ID: 92a7159f7e4af62137622921e809f8546db437e5
CPU threads: 8; OS: Windows 6.19; UI render: default; 
Locale: en-US (en_US); Calc: group

Reveiwing meta.xml of the .ODG shows it to be prepared with LibreOffice 5.1.6.2 64 bit Linux.
 
Clearing defaults for Export to PDF and using just lossless checkbox and selecting a Hybrid PDF (embed ODF file) produces a readable PDF with fonts embedded from the document. Resulting PDF can be reopened into LibreOffice pulling out the embedded ODF.

So, this could be an issue with the PDF/A-1a format export to PDF.

Attaching the resulting PDF (if you are trying to get it printed for AGU)
Comment 7 Chris Piker 2017-12-07 20:33:20 UTC
Wow, that was very generous of you.  Thanks a lot!  The PDF has been sent to the printer.  

I know I'm generalizing here, but open source community never ceases to amaze me.
--
piker
Comment 8 tommy27 2017-12-08 04:37:20 UTC
@Chris
did you upgrade the obsolete 4.3.7.2 release you are using to latest LibO 5.4.7.2 version?

thousands of bugs have been fixed meanwhile so it's worth it.
Comment 9 Chris Piker 2017-12-08 04:58:58 UTC
The systems we use at work are managed by the group's system administrator, so we're stuck with CentOS 6.9 and whatever packages it provides for a little bit longer, at least until a few higher priority items are cleared from the schedule.

At home I'm running Mint 18.1 to avoid python3 until my current project is over. 

So unless 5.4.7.2 bug fixes are back ported, I won't see them for a while yet.
Comment 10 Xavier Van Wijmeersch 2017-12-08 15:27:27 UTC
I did a test with only PDF/A-1a and the system hangs and needed a cold restart off my pc. So I agree with the comment6 'So, this could be an issue with the PDF/A-1a format export to PDF.'
Comment 11 Buovjaga 2017-12-17 16:44:40 UTC
(In reply to Xavier Van Wijmeersch from comment #10)
> I did a test with only PDF/A-1a and the system hangs and needed a cold
> restart off my pc. So I agree with the comment6 'So, this could be an issue
> with the PDF/A-1a format export to PDF.'

Let's set to NEW, then. I am assuming Xavier used 5.4 or 6.0 to test.

Chris: on the topic of newer versions, you might try AppImages: http://libreoffice.soluzioniopen.com/
Comment 12 Michael Meeks 2017-12-19 09:28:51 UTC
Crashing X should never happen - and is outside of our control / the scope of LibreOffice - also:

[314267.152] (EE) 3: /usr/lib64/xorg/modules/drivers/nvidia_drv.so (0x7f934d8da000+0xb6d52) [0x7f934d990d52]

Is that the proprietary NVidia driver. I would strongly favour notourbug if this cannot be replicated elsewhere.

Thanks for reporting.
Comment 13 Buovjaga 2017-12-19 12:29:03 UTC
(In reply to Michael Meeks from comment #12)
> Is that the proprietary NVidia driver. I would strongly favour notourbug if
> this cannot be replicated elsewhere.

In the description Intel Mobile is mentioned.

Xavier: how about you?
Comment 14 Chris Piker 2017-12-19 16:50:45 UTC
On a Windows 7 virtual machine with both 2-D and 3-D acceleration turned off, the output is blank, though it doesn't crash the virtual machine environment.  

Also libreoffice 5.1.6.2 crashes hard when exporting the file to PDF though it doesn't take out the X-server when running with the following video setup:

$ sudo lshw -c video
  *-display              
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 02
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915_bpo latency=0
       resources: irq:277 memory:d0000000-d0ffffff memory:c0000000-cfffffff ioport:f000(size=64

Maybe there's more than one bug interacting to produce the observed results on NVidia, but Libreoffice still can't produce a PDF-A even if it doesn't take out the xserver.
Comment 15 Michael Meeks 2018-01-02 11:59:28 UTC
Consider re-prioritizing; this appears to be an issue that affects some small subset of documents (like the one attached), the hard crash is an Xorg bug so where to go.

It would be good to minimize the draw single-page poster to capture only the element that causes this issue - presumably some very unusual (perhaps generated) image or somesuch: can we bisect the document into pieces and create a minimal document that reproduces this ? It is rather a pretty document having said that - but large). 

Thanks !
Comment 16 Buovjaga 2018-01-02 13:39:58 UTC
Yeah the highest priority was a mis-step, correcting. Severity stays as it describes the awful effects.
Comment 17 Julien Nabet 2019-03-09 10:59:49 UTC
On pc Debian x86-64 with master sources updated today + enable-dbgutil (default UI Render, VCL = gtk3 + Radeon RX570), I don't reproduce crash but had:
- a dialog box with title "Problems during PDF Export" + entry "Transparencies removed"
Some objects were converted to an image in order to remove transparencies, ...

In console, I got:
- a lot of these:
warn:legacy.osl:12073:12073:vcl/source/gdi/pdfwriter_impl.cxx:10750: document structure in disorder !

clicking OK in dialog, I got on console:
! SyncTeX Error : No file?
warn:legacy.osl:12073:12073:svx/source/dialog/rulritem.cxx:675: Wrong MemberId
warn:legacy.tools:12073:12073:sfx2/source/control/statcach.cxx:387: setting state of dirty message
warn:vcl.gdi:12073:12073:vcl/headless/svpgdi.cxx:125: unsupported SvpSalGraphics::blendAlphaBitmap case
warn:sd.core:12073:12073:sd/source/core/PageListWatcher.cxx:96: ImpPageListWatcher::GetSdPage(PageKind::Standard): page number 1 >= 1
warn:vcl:12073:12073:vcl/source/window/winproc.cxx:844: ImplHandleKey: Keyboard-Input is sent to a frame without focus
warn:vcl:12073:12073:vcl/source/window/winproc.cxx:844: ImplHandleKey: Keyboard-Input is sent to a frame without focus

but no crash.