Crash on opening/importing specific PDF

Summary:

Inkscape crashes when I try to import a specific PDF (attached, with permission from author).

As an aside: I also work with PDFs and know how impossible it is to account for all the possible ways they are authored. I wrote a utility last year to mangle PDF content so that people can attach proprietary documents along with bug reports, perhaps it would be useful for you as well: https://github.com/cfcurtis/pdf-mangler. Right now the content stream is parsed and re-written, but I've been slowly working on a branch to mangle the byte stream directly.

Steps to reproduce:

  • open Inkscape
  • Select File -> Import or File -> Open and choose the "Raglan v1.pdf" file attached
  • Use internal import with default options (shown below) image
  • Select Ok

What happened?

Inkscape crashes with a backtrace and dialog suggesting I file a bug report.

What should have happened?

The PDF should have opened properly. Note that I am able to open this document with Inkscape v1.2.

Sample attachments:

Raglan_v1.pdf

Version info

Inkscape 1.3 (0e150ed6c4, 2023-07-21)

    GLib version:     2.76.4
    GTK version:      3.24.38
    glibmm version:   2.66.6
    gtkmm version:    3.24.7
    libxml2 version:  2.10.4
    libxslt version:  1.1.38
    Cairo version:    1.17.8
    Pango version:    1.50.14
    HarfBuzz version: 7.1.0

    OS version:       Fedora Linux 38 (Workstation Edition)

Backtrace

 0# Inkscape::Application::crash_handler(int) in /usr/bin/inkscape
 1# 0x00007F4EF1A3BB70 in /lib64/libc.so.6
 2# 0x00007F4EF1A8C844 in /lib64/libc.so.6
 3# gsignal in /lib64/libc.so.6
 4# abort in /lib64/libc.so.6
 5# __gnu_debug::_Safe_sequence_base::_M_get_mutex() in /lib64/libstdc++.so.6
 6# Inkscape::Extension::Internal::SvgBuilder::addChar(GfxState*, double, double, double, double, double, double, unsigned int, int, unsigned int const*, int) in /usr/bin/inkscape
 7# PdfParser::doShowText(GooString const*) in /usr/bin/inkscape
 8# PdfParser::go(bool) in /usr/bin/inkscape
 9# PdfParser::parse(Object*, bool) in /usr/bin/inkscape
10# Inkscape::Extension::Internal::PdfInput::add_builder_page(std::shared_ptr, Inkscape::Extension::Internal::SvgBuilder*, SPDocument*, int) in /usr/bin/inkscape
11# Inkscape::Extension::Internal::PdfInput::open(Inkscape::Extension::Input*, char const*) in /usr/bin/inkscape
12# Inkscape::Extension::open(Inkscape::Extension::Extension*, char const*) in /usr/bin/inkscape
13# ink_file_open(Glib::RefPtr const&, bool*) in /usr/bin/inkscape
14# InkscapeApplication::document_open(Glib::RefPtr const&, bool*) in /usr/bin/inkscape
15# InkscapeApplication::create_window(Glib::RefPtr const&) in /usr/bin/inkscape
16# sp_file_open_dialog(Gtk::Window&, void*, void*) in /usr/bin/inkscape
17# 0x00007F4EF2D07C59 in /lib64/libgiomm-2.4.so.1
18# g_closure_invoke in /lib64/libgobject-2.0.so.0
19# 0x00007F4EF3A9915D in /lib64/libgobject-2.0.so.0
20# g_signal_emit_valist in /lib64/libgobject-2.0.so.0
21# g_signal_emit in /lib64/libgobject-2.0.so.0
22# 0x00007F4EF3BA5595 in /lib64/libgio-2.0.so.0
23# Gio::ActionGroup_Class::activate_action_vfunc_callback(_GActionGroup*, char const*, _GVariant*) in /lib64/libgiomm-2.4.so.1
24# Inkscape::Shortcuts::invoke_action(_GdkEventKey const*) in /usr/bin/inkscape
25# InkscapeWindow::on_key_press_event(_GdkEventKey*) in /usr/bin/inkscape
26# Gtk::Widget_Class::key_press_event_callback(_GtkWidget*, _GdkEventKey*) in /lib64/libgtkmm-3.0.so.1
27# 0x00007F4EF2299FE7 in /lib64/libgtk-3.so.0
28# g_signal_emit_valist in /lib64/libgobject-2.0.so.0
29# g_signal_emit in /lib64/libgobject-2.0.so.0
30# 0x00007F4EF2571174 in /lib64/libgtk-3.so.0
31# 0x00007F4EF240863F in /lib64/libgtk-3.so.0
32# gtk_main_do_event in /lib64/libgtk-3.so.0
33# 0x00007F4EF2A33427 in /lib64/libgdk-3.so.0
34# 0x00007F4EF2A6BE0E in /lib64/libgdk-3.so.0
35# g_main_context_dispatch in /lib64/libglib-2.0.so.0
36# 0x00007F4EF3D42648 in /lib64/libglib-2.0.so.0
37# g_main_context_iteration in /lib64/libglib-2.0.so.0
38# g_application_run in /lib64/libgio-2.0.so.0
39# main in /usr/bin/inkscape
40# 0x00007F4EF1A25B4A in /lib64/libc.so.6
41# __libc_start_main in /lib64/libc.so.6
42# _start in /usr/bin/inkscape