Description: Hybrid PDFs now only open with Draw. Steps to Reproduce: 1.Create a writer file. 2.Export this Writer file as a Hybrid PDF (embedded ODF file) 3.Open this Hybrid PDF with LibreOffice Actual Results: LibreOffice opens the Hybrid PDF with Draw Expected Results: LibreOffice should open the Hybrid PDF with Writer Reproducible: Always User Profile Reset: Yes Additional Info: The hybrid PDFs generated in LibreOffice 7.6.3.2 are not the issue — they open correct with LibreOffice 7.6.2.1
Created attachment 191116 [details] This file is a PDF with embedded Writer file. The file should be opened with Writer
Created attachment 191117 [details] Message opening with Ver 24.2 (created with 7.6.3 oe 24.2) Seems the inserted file in the pdf is corrupted, so only the pdf is open on Draw. Reproducible. Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 01a02ee7f1dbe7501a89b41e62599fba6a8b33f3 CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Regression from Version: 7.5.9.1 (X86_64) / LibreOffice Community Build ID: 2f04f73a0f4ebfe9735ca11da23d6ed8f830fe34 CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: default; VCL: win Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Set as critical because embedded file, it's lost.
I tried to bibisect, but is always good with 7.6 or 24.2. But also I can reproduce with 7.6 build by myself, not from bibisect repository. Also don't repro with Version: 7.6.2.1 (X86_64) / LibreOffice Community Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333 CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded Strange, that I can reproduce with latest 24.2 Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: c8f7408db73d2f2ccacb25a2b4fef8dfebdfc6cb CPU threads: 16; OS: Linux 6.2; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
"But also I can reproduce with 7.6 build by myself, not from bibisect repository". --> an typo here --> "But also I can reproduce with 24.2 build by myself, not from bibisect repository."
Some work on detect hybrid in https://cgit.freedesktop.org/libreoffice/core/log/?qt=grep&q=hybrid 2023-01-25 tdf#66580 added hybrid PDF test cases Tomaž Vajngerl 2023-01-24 tdf#66580 write ODF document as an attachment in hybrid mode Tomaž Vajngerl 2023-01-24 pdfimport: refactor pdf and hybrid format detection code Tomaž Vajngerl
(In reply to m.a.riosv from comment #7) Maybe, but quikee's work on the detection went in Jan of 2023, so would already be in 7.6.2 which looks to have no issues with hybrid PDF detection. Would be something much more recent. The bibisect is needed...
This seems to have begun at the below commit in bibisect repository/OS linux-64-24.2. Adding Cc: to Mike Kaganski ; Could you possibly take a look at this one? Thanks 932af46865b12a166ecc444cfb1da8caeb2f56cf is the first bad commit commit 932af46865b12a166ecc444cfb1da8caeb2f56cf Author: Jenkins Build User <tdf@maggie.tdf> Date: Sun Nov 26 21:18:43 2023 +0100 source 86c682273d907c77404637c89e584047de1c1099 159976: tdf#96401: allow to detect a broken ZIP package | https://gerrit.libreoffice.org/c/core/+/159976
(In reply to raal from comment #9) This can't be correct. Attachment 191116 [details] opens in Writer using 7.6.3.2; also creating a new hybrid PDF in Writer 7.6.3.2 creates a PDF that again opens in Draw. 7.6.3.2 (built 2023-11-18, announced 2023-11-23) doesn't include commit 86c682273d907c77404637c89e584047de1c1099 from 2023-11-26 (last Sunday).
In fact, it's a regression after my 046e9545956d8ad1d69345d6b4a4c0a33714d179 :-D
... but that was Windows-only change, making Windows work as Linux; a bibisect on Linux could give some even older result...
(In reply to Mike Kaganski from comment #12) > ... but that was Windows-only change, making Windows work as Linux; a > bibisect on Linux could give some even older result... I checked the results with git checkout bisected_commit and git checkout HEAD~1
(In reply to Mike Kaganski from comment #10) > Attachment 191116 [details] opens in Writer using 7.6.3.2 Oh, I must re-read what I write. It was meant to say "Attachment 191116 [details] opens in *Draw* using 7.6.3.2" Tested using Version: 7.6.3.2 (X86_64) / LibreOffice Community Build ID: 29d686fea9f6705b262d369fede658f824154cc0 CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: CL threaded
Sigh. The problematic commit, that prevents working on Windows after my 046e9545956d8ad1d69345d6b4a4c0a33714d179, is - ironically - 2b4cd99d3360ccffb9829a02412824864d045753, intended to "make Windows file handling more unx-like". It makes default file locking share mode FILE_SHARE_READ | FILE_SHARE_WRITE, and that conflicts with boost's mmap_file_iterator (used in file_iterator), which needs FILE_SHARE_READ [1]. Sigh again. [1] https://github.com/boostorg/spirit/blob/59515f0e56aebdf958eadab30be99cac8872e723/include/boost/spirit/home/classic/iterator/impl/file_iterator.ipp#L183
(In reply to raal from comment #13) Heh, it's *likely* two issues together (however unlikely such constellation might seem): something on Linux, and something *else* on Windows (with different reasons, different starting points, but both related to my - different - changes). Please make sure you test with commit c36cba38cc33f22e3388968814f426e88b7f1cd8 (from Nov 28) and commit 93357349ff1998b41ea1ebedf09dc1cc5da316f7 (from today).
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a5a49657dc17609a05dca59a8521fd71d14fe76e tdf#158442: fix opening hybrid PDFs on Windows It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Let me close it fixed. The introduced unit test makes sure that hybrid PDFs open in respective components on *all* platforms. But if there's still some scenario where it fails, please file it separately. Thank you!
(In reply to Mike Kaganski from comment #16) > (In reply to raal from comment #13) > > Heh, it's *likely* two issues together (however unlikely such constellation > might seem): something on Linux, and something *else* on Windows (with > different reasons, different starting points, but both related to my - > different - changes). > > Please make sure you test with commit > c36cba38cc33f22e3388968814f426e88b7f1cd8 (from Nov 28) and commit > 93357349ff1998b41ea1ebedf09dc1cc5da316f7 (from today). Verified with Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 55097433ed766a2ced6b87021a71c8a31cde9d99 CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3 Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US Calc: threaded Thanks for the fix.
Mike, is a solution also for Linux? It seems I could reproduce on 24.2alpha
(In reply to BogdanB from comment #20) As I wrote, it is expected that it works on *all* platforms. 1. What specifically do you see, that makes you unsure ("It seems I could...")? 2. With which specific version (which last commit) did you test? As said: if you still repro, with all the changes mentioned in this bug, please file it separately, and CC me. Thanks!
Working well also on master on Linux, thanks, Mike. Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 08ba31da63b58e92de05e96563146d3e909352e9 CPU threads: 16; OS: Linux 6.2; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
*** Bug 158579 has been marked as a duplicate of this bug. ***
@Mike Kaganski, can you please consider creating fix for 7.6.x branch too?
(In reply to grofaty from comment #24) It is already there, in https://gerrit.libreoffice.org/c/core/+/160306, waiting for independent review.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/873c56df149bb463e5267162e43c755ad16779b8 tdf#158442: fix opening hybrid PDFs on Windows It will be available in 7.6.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.