Bug 159094 - FILESAVE PDF Tagged PDF export of media file fails to create PDF
Summary: FILESAVE PDF Tagged PDF export of media file fails to create PDF
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.6.0.3 release
Hardware: All All
: high critical
Assignee: Tibor Nagy
URL:
Whiteboard: target:24.8.0 target:24.2.3 target:7.6.7
Keywords: bibisected, bisected, regression
Depends on:
Blocks: PDF-Accessibility
  Show dependency treegraph
 
Reported: 2024-01-09 22:57 UTC by Gabor Kelemen (allotropia)
Modified: 2024-03-20 15:16 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Calc with media object (428.32 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-01-09 22:57 UTC, Gabor Kelemen (allotropia)
Details
PDF export settings to trigger the bug (61.73 KB, image/png)
2024-01-09 23:01 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2024-01-09 22:57:47 UTC
Created attachment 191830 [details]
Example file from Calc with media object

Attached simple example file has a media file.
When this is exported to tagged PDF, the export process fails to produce a PDF file.

1. Open attached file
2. Go to File - Export as PDF
3. Disable the Archival, PDF/UA, Create PDF Form and the Structure options (they are not necessary for this to happen, but seems like enabling Archival, PDF/UA, Create PDF Form makes LO also crash, or successfully export the PDF... unsure yet what triggers these)
4. Enable "View PDF after export" box
5. Press OK, give it some name, press OK
-> the file is not exported, does not open in PDF viewer. The "Export as PDF" progress bar is also not removed from the status bar.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 55e97eaabf6cce91f424e440af392143f11f3343
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

Seems to have first started in 7.6 with:

https://git.libreoffice.org/core/+/a5225ba82e94a549f44420f56a7cb9d7906561cc

 a5225ba82e94a549f44420f56a7cb9d7906561cc	[log]
author	Michael Stahl <michael.stahl@allotropia.de>	Wed Apr 05 11:50:44 2023 +0200
committer	Michael Stahl <michael.stahl@allotropia.de>	Wed Apr 05 14:34:51 2023 +0200

avmedia,*: guess the mime type of media files based on file name
Comment 1 Gabor Kelemen (allotropia) 2024-01-09 23:01:40 UTC
Created attachment 191831 [details]
PDF export settings to trigger the bug
Comment 2 Buovjaga 2024-01-19 17:14:05 UTC
Repro

I get this in the console with a debug build:
soffice.bin: /home/user/libreoffice/vcl/source/gdi/pdfextoutdevdata.cxx:690: const ::std::vector<sal_Int32> &vcl::PDFExtOutDevData::GetScreenAnnotIds(const SdrObject *const) const: Assertion `false' failed.

Arch Linux 64-bit, X11
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 18e579761cb622e8ff7e67f319ef80c61b3bd588
CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 19 January 2024
Comment 3 Commit Notification 2024-03-11 14:59:43 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f3bfe66fb54190fee6ac579835c03c2b4a2735d0

tdf#159094 sc: fix failure when exporting media files to PDF

It will be available in 24.8.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.
Comment 4 Commit Notification 2024-03-19 12:11:26 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/4c1b617863f46ec4ef2553df8bde46b98b4a48bf

tdf#159094 sc: fix failure when exporting media files to PDF

It will be available in 24.2.3.

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.
Comment 5 Commit Notification 2024-03-20 15:16:20 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/bffef73b0a0633969149ef504f97d9c701647a9e

tdf#159094 sc: fix failure when exporting media files to PDF

It will be available in 7.6.7.

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.