Bug 68724 - In Libreoffice Writer, inserting a .pdf embedded with libreoffice crashes it.
Summary: In Libreoffice Writer, inserting a .pdf embedded with libreoffice crashes it.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.0.4 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: target:4.3.0 target:4.2.0.1
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-08-29 19:33 UTC by lobugs
Modified: 2016-03-07 15:31 UTC (History)
2 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 lobugs 2013-08-29 19:33:19 UTC
When creating a pdf in writer, you have a option to export it with libreoffice embedded into it for easy editing.
When inserting a file (insert --> File) doing a .pdf embedded with a libreoffice document crashes libreoffice and forces a recovery. Doing this on a .pdf without a embedding file simply gives a read error.

PDF
Comment 1 Mike Kaganski 2013-09-17 09:35:35 UTC
Reproducible in 3.6.0.4 - 4.1.2.1 under Win7x64 -> NEW.
Not reproducible with 3.5.6.2 and lower (in that versions, both cases give read errors) -> regression.

A user may actually want to insert a PDF that is known to include the ODF data (hoping that this will insert that embedded data), and the crash may interrupt work and make data loss, so it's a legitimate real-life issue.
Comment 2 Michael Stahl (CIB) 2013-12-04 16:01:58 UTC
the change was introduced with this commit on libreoffice-3-6 branch:

commit 70e4fd2a10f9d7255285d26fe8fec22b18858116
Author:     Kohei Yoshida <kohei.yoshida@gmail.com>
AuthorDate: Tue Jun 5 15:45:52 2012 -0400

    fdo#50694: Honor the preferred filter returned by type detection.
    
    Because that filter is more reliable.
Comment 3 Michael Stahl (CIB) 2013-12-04 16:50:35 UTC
ok so the commit in comment #2 is actually an improvement since
before the filter "pdf_Portable_Document_Format" is used whereas
with the change the proper filter "writer_pdf_addstream_import"
is used that reads the embedded ODF.

the only problem is that reading that doesn't work...
Comment 4 Commit Notification 2013-12-05 12:07:10 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#68724: sw: fix crash on Insert->File with Hybrid PDF



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 5 Commit Notification 2013-12-05 12:43:30 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

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

fdo#68724: sw: fix crash on Insert->File with Hybrid PDF


It will be available in LibreOffice 4.2.

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 6 Michael Stahl (CIB) 2013-12-05 12:59:39 UTC
inserting Hybrid PDF in Writer works now

not sure if this is a regression really; this never worked before
but the failure mode was perhaps less annoying before 3.6...
Comment 7 Mike Kaganski 2013-12-05 13:20:51 UTC
(In reply to comment #6)
> inserting Hybrid PDF in Writer works now
Thank you Michael for all your work!

> not sure if this is a regression really; this never worked before
> but the failure mode was perhaps less annoying before 3.6...

If only you reverted the behaviour to previous non-crashing rejecting state, than it would be regression fix.
I vote for inclusion of this _new feature_ to the 4.2 feature list.