Bug 165433 - Opening PDF files fails with poppler 25.02.0
Summary: Opening PDF files fails with poppler 25.02.0
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
24.8.5.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL: https://gitlab.archlinux.org/archlinu...
Whiteboard: target:25.8.0
Keywords: filter:pdf
: 165363 (view as bug list)
Depends on:
Blocks: PDF-Import-Draw
  Show dependency treegraph
 
Reported: 2025-02-25 12:34 UTC by Robin Candau
Modified: 2025-02-25 23:01 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the error (9.77 KB, image/png)
2025-02-25 12:34 UTC, Robin Candau
Details
Sample document to reproduce the issue (26.01 KB, application/pdf)
2025-02-25 12:49 UTC, Robin Candau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Candau 2025-02-25 12:34:07 UTC
Description:
Hi,

With poppler 25.02.0, opening PDF files in LibreOffice (Writer) fails with:

```
General Error. 
General input/output error.
```

Screenshot here: https://pasteboard.co/W5s0NnuAhj25.png

Steps to Reproduce:
1. Build LibreOffice with poppler 25.02.0
2. Open a PDF file in LibreOffice Writer
3. See error

Actual Results:
```
General Error. 
General input/output error.
```

Expected Results:
PDF file opening as expected


Reproducible: Always


User Profile Reset: Yes

Additional Info:
This issue is affecting both `24.8.5.x` and `25.2.0.x` versions.

I wasn't able to generate more logs than the error in the description for the moment, sorry about that.

For cross-reference, this issue was reported on our side (Arch Linux) here: https://gitlab.archlinux.org/archlinux/packaging/packages/libreoffice-fresh/-/issues/6

I'm happy to provide any information that could help or test any patches :)
Comment 1 Robin Candau 2025-02-25 12:34:59 UTC
Created attachment 199437 [details]
Screenshot of the error
Comment 2 Xisco Faulí 2025-02-25 12:47:37 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 3 Robin Candau 2025-02-25 12:49:46 UTC
Created attachment 199438 [details]
Sample document to reproduce the issue
Comment 4 Xisco Faulí 2025-02-25 12:52:24 UTC
not reproduced with poppler-25.01, testing with poppler-25.02...
Comment 5 V Stuart Foote 2025-02-25 12:52:47 UTC
confirmed as in bug 165363 and external downstream for LFS and arch linux.

Seems LO only up to poppler 25.01 for CVE-2024-56378 with https://gerrit.libreoffice.org/c/core/+/179903

and backport to 24.8 with
https://gerrit.libreoffice.org/c/core/+/179956
Comment 6 Robin Candau 2025-02-25 12:55:41 UTC
> not reproduced with poppler-25.01, testing with poppler-25.02...

@Xisco, yes sorry... I should have made clearer that this only happens with poppler-25.02.
Comment 7 Xisco Faulí 2025-02-25 12:58:01 UTC
(In reply to Robin Candau from comment #6)
> > not reproduced with poppler-25.01, testing with poppler-25.02...
> 
> @Xisco, yes sorry... I should have made clearer that this only happens with
> poppler-25.02.

then it looks like a poppler regression, isn't it ?
Comment 8 Xisco Faulí 2025-02-25 13:14:07 UTC
I can't reproduce the issue with LibreOffice master bf4fe0c2ba1d0a44cc07c6afba6d56b8adf8af50 using --without-system-poppler with https://gerrit.libreoffice.org/c/core/+/182169 on top. PDF file opens fine for me
Comment 9 V Stuart Foote 2025-02-25 13:23:22 UTC
*** Bug 165363 has been marked as a duplicate of this bug. ***
Comment 10 Xisco Faulí 2025-02-25 13:41:39 UTC
Hi Robin,
Is https://gitlab.archlinux.org/archlinux/packaging/packages/libreoffice-fresh/-/commit/070fd4f2f5d939e6d4f21f96dd15f306f526575d missing anything ? I'm surprised it works out of the box without tweaking any patch
Comment 11 Robin Candau 2025-02-25 13:47:08 UTC
(In reply to Xisco Faulí from comment #10)
> Hi Robin,
> Is
> https://gitlab.archlinux.org/archlinux/packaging/packages/libreoffice-fresh/-
> /commit/070fd4f2f5d939e6d4f21f96dd15f306f526575d missing anything ? I'm
> surprised it works out of the box without tweaking any patch

Hi,

It should not, I was able to rebuild the package against poppler 25.02.0 just now without issue nor requiring any additional tweaking.
Comment 12 Buovjaga 2025-02-25 17:39:08 UTC
I repro with the Arch-packaged version, but building master with --with-system-poppler, I can't repro.

Robin: can you repro with master?
Comment 13 Commit Notification 2025-02-25 19:15:20 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/12c1596b0fd152399bed90f3d26014a32efc24e3

related tdf#165433: poppler: upgrade to 25.02.0

It will be available in 25.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 14 Xisco Faulí 2025-02-25 19:16:20 UTC
Internal poppler has been upgraded to 25.02.0 as well. No crash for me when building with --without-system-poppler. Testing from others is appreciated as well
Comment 15 codestation 2025-02-25 22:38:36 UTC
Same error in Archlinux with poppler 25.02.0

I also get a coredump with xpdfimport when the error happens

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ffff74a56d3 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#2  0x00007ffff744bba0 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff7433582 in __GI_abort () at abort.c:73
#4  0x00007ffff7697b2c in __gnu_cxx::__verbose_terminate_handler () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc:95
#5  0x00007ffff76ae3ba in __cxxabiv1::__terminate (handler=<optimized out>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48
#6  0x00007ffff769752a in std::terminate () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:58
#7  0x00007ffff76ae676 in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x7ffff7876d60 <typeinfo for std::logic_error>, dest=0x7ffff76c5a30 <std::logic_error::~logic_error()>)
    at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc:98
#8  0x00007ffff769b2dd in std::__throw_logic_error (__s=0x5555555620a0 "basic_string: construction from null is not valid") at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/functexcept.cc:70
#9  0x0000555555557549 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> > () at /usr/include/c++/14.2.1/bits/basic_string.h:651
#10 0x000055555555812f in std::make_unique<GlobalParams, char const*&> () at /usr/include/c++/14.2.1/bits/unique_ptr.h:1077
#11 main (argc=-7792, argv=0xd6da) at /usr/src/debug/libreoffice-fresh/libreoffice-25.2.0.3/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx:127

Checking the source code changes from poppler 25.02.0 it seems that GlobalParams doesn't have  a constructor that accepts a nullptr anymore

https://fossies.org/diffs/poppler/25.01.0_vs_25.02.0/poppler/GlobalParams.h-diff.html
Comment 16 Robin Candau 2025-02-25 23:01:05 UTC
(In reply to Xisco Faulí from comment #14)
> Internal poppler has been upgraded to 25.02.0 as well. No crash for me when
> building with --without-system-poppler. Testing from others is appreciated
> as well

I backported the related patch (https://git.libreoffice.org/core/commit/12c1596b0fd152399bed90f3d26014a32efc24e3) into our LibreOffice package and built it with internal poppler 25.02.0 (using --without-system-poppler) for testing purposes. It built fine and I can open PDF files without issues. 

I'm confused... I guess that means there's either an issue with our poppler 25.02.0 build somehow, or the culprit is elsewhere?

(In reply to Buovjaga from comment #12)
> I repro with the Arch-packaged version, but building master with
> --with-system-poppler, I can't repro.
> 
> Robin: can you repro with master?

Given the above result, I guess the issue is elsewhere. But I'll still try to give master a go tomorrow, just in case.