Segfaults with --batch-process
#### Steps to reproduce: run `inkscape --batch-process` somewhere without a GUI system available (a chroot is enough) #### What happened? ``` root@warren:/# gdb --args inkscape --batch-process [...] Reading symbols from inkscape... Reading symbols from /usr/lib/debug/.build-id/85/f36d8d1c35f51a49dbcfa33f6645be96046ec8.debug... (gdb) r Starting program: /usr/bin/inkscape --batch-process [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". No protocol specified Unable to init server: Could not connect: Connection refused [New Thread 0x7fffef4c8640 (LWP 2720797)] [New Thread 0x7fffeecc7640 (LWP 2720798)] [New Thread 0x7fffee4c6640 (LWP 2720799)] [New Thread 0x7fffedc54640 (LWP 2720800)] (inkscape:2720793): Gtk-CRITICAL **: 16:00:25.434: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed Thread 1 "inkscape" received signal SIGSEGV, Segmentation fault. Gtk::IconTheme::prepend_search_path (this=0x0, path=...) at ../untracked/gtk/gtkmm/icontheme.cc:294 294 ../untracked/gtk/gtkmm/icontheme.cc: No such file or directory. (gdb) bt full #0 Gtk::IconTheme::prepend_search_path (this=0x0, path=...) at ../untracked/gtk/gtkmm/icontheme.cc:294 No locals. #1 0x00007ffff77e285e in Inkscape::Application::Application (this=0x555555606bd0, use_gui=<optimized out>) at ./src/inkscape.cpp:229 icon_theme = {pCppObject_ = 0x0} ui_language = {static npos = 18446744073709551615, string_ = "export-id-only"} fontdirs_pref = {static npos = 18446744073709551615, string_ = "p'`UUU\000\000@\250`UUU\000"} prefs = <optimized out> handler = <optimized out> factory = <optimized out> Python Exception <class 'gdb.error'> value has been optimized out: fontdirs = prefs = <optimized out> handler = <optimized out> ui_language = {static npos = 18446744073709551615, Python Exception <class 'gdb.error'> value has been optimized out: string_ = } factory = <optimized out> fontdirs_pref = {static npos = 18446744073709551615, Python Exception <class 'gdb.error'> value has been optimized out: string_ = } Python Exception <class 'gdb.error'> value has been optimized out: fontdirs = msg = {static npos = 18446744073709551615, Python Exception <class 'gdb.error'> value has been optimized out: string_ = } secondary = {static npos = 18446744073709551615, Python Exception <class 'gdb.error'> value has been optimized out: string_ = } icon_theme = {pCppObject_ = <optimized out>} fontsdir = <optimized out> fontsdir = <optimized out> fontdir = <optimized out> __for_range = <optimized out> Python Exception <class 'gdb.error'> value has been optimized out: __for_begin = Python Exception <class 'gdb.error'> value has been optimized out: __for_end = #2 0x00007ffff77e31c0 in Inkscape::Application::create (use_gui=<optimized out>) at ./src/inkscape.cpp:162 No locals. #3 0x00007ffff788003a in InkscapeApplication::on_startup2 (this=0x5555555aa770) at ./src/inkscape-application.cpp:719 gapp = <optimized out> #4 0x00007ffff788c644 in InkscapeApplication::on_activate (this=0x5555555aa770) at ./src/inkscape-application.cpp:957 output = "" document = <optimized out> prefs = <optimized out> #5 0x00007ffff6262c98 in Glib::SignalProxyNormal::slot0_void_callback(_GObject*, void*) () from /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1 No symbol table info available. #6 0x00007ffff549e6df in g_closure_invoke () from /usr/bin/../lib/x86_64-linux-gnu/inkscape/../libgobject-2.0.so.0 No symbol table info available. #7 0x00007ffff54b0d11 in ?? () from /usr/bin/../lib/x86_64-linux-gnu/inkscape/../libgobject-2.0.so.0 No symbol table info available. #8 0x00007ffff54b6f51 in g_signal_emit_valist () from /usr/bin/../lib/x86_64-linux-gnu/inkscape/../libgobject-2.0.so.0 No symbol table info available. #9 0x00007ffff54b74ff in g_signal_emit () from /usr/bin/../lib/x86_64-linux-gnu/inkscape/../libgobject-2.0.so.0 No symbol table info available. #10 0x00007ffff55c5e88 in ?? () from /usr/bin/../lib/x86_64-linux-gnu/inkscape/../libgio-2.0.so.0 No symbol table info available. #11 0x00007ffff55c5ffe in g_application_run () from /usr/bin/../lib/x86_64-linux-gnu/inkscape/../libgio-2.0.so.0 No symbol table info available. --Type <RET> for more, q to quit, c to continue without paging-- #12 0x00007ffff5e38e4a in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. #13 0x0000555555556eba in _start () No symbol table info available. (gdb) ``` #### Inkscape Version and Operating System: - Inkscape Version: 1.1.1-2 - Operating System: Debian sid FTR, I found #541 that is the very same issue, that was seemingly already fixed with https://gitlab.com/inkscape/inkscape/-/commit/6779967743bd8a3676cdc61f79706201d3e5f5d3 (!1079), but it looks like it regressed again (the relevant commit was later "overwrote" with other changes, I didn't follow it fully).
issue