🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #2920

Bug#1152805: inkscape: concurrent command-line exports abort with Gio::DBus::Error (ServiceUnknown) in GApplication registration

#2920
From: Barak A. Pearlmutter
Date: Sun, 01 Nov 2026 18:50
69 lines
4382 bytes
Package: inkscape
Version: 1.4.3-2+b2
Severity: normal
Tags: upstream
Forwarded: https://gitlab.com/inkscape/inkscape/-/work_items/4716

When several non-interactive inkscape processes are started at the same
time, e.g. by a parallel "make -j", a good fraction of them abort:

  terminate called after throwing an instance of 'Gio::DBus::Error'
  Aborted

A command-line export should not depend on, or be able to fail because
of, the D-Bus session bus.  In practice this breaks any parallel build
that rasterizes SVG with inkscape, including indirectly: ImageMagick's
"convert foo.svg foo.png" delegates to inkscape whenever it is
installed.  That is how I hit it; usbview fails to build with -j28 on a
machine that has inkscape installed.

Reproducer (any SVG):

  for i in $(seq 1 20); do
    inkscape some.svg --export-filename=out$i.png >log$i 2>&1 &
  done; wait
  grep -l terminate log* | wc -l

Here 5-13 of the 20 processes abort on each run.  Run serially, all
succeed.

The GError being thrown (from gdb, catch throw Gio::DBus::Error) is:

  GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown:
    The name is not activatable

and the backtrace is:

  #0  __cxa_throw () from libstdc++.so.6
  #1  Gio::DBus::Error::throw_func(_GError*) () from libgiomm-2.4.so.1
  #2  Glib::Error::throw_exception(_GError*) () from libglibmm-2.4.so.1
  #3  Gio::Application::register_application() () from libgiomm-2.4.so.1
  #4  InkscapeApplication::InkscapeApplication() () from libinkscape_base.so.1.4.3.0
  #5  main ()

That is, the InkscapeApplication constructor registers the application
as a unique GApplication (org.inkscape.Inkscape) on the session bus,
even for a pure command-line export.  A second process sees the name
already owned, tries to act as a remote instance, the owning process
exits in the meantime, and the resulting exception is never caught, so
std::terminate aborts the process.

Observations:

 * Giving each process its own bus (dbus-run-session -- inkscape ...)
   makes all 20 succeed.
 * Unsetting DBUS_SESSION_BUS_ADDRESS does not help (13/20 failed),
   because GLib still finds the bus via $XDG_RUNTIME_DIR/bus.
 * Setting SELF_CALL=1 in the environment, which makes inkscape
   register as NON_UNIQUE, makes all 20 succeed.  This is the
   workaround barebox adopted:
   https://lists.infradead.org/pipermail/barebox/2025-August/052403.html

Suggested fix: use G_APPLICATION_NON_UNIQUE whenever inkscape runs
non-interactively (export, --actions, --batch-process, --shell, or no
GUI), and at minimum catch the error from register_application() and
fall back to running locally instead of aborting.

Inkscape 1.4.3 (0d15f75042, 2025-12-25)
  GLib 2.90.1, GTK 3.24.52, glibmm 2.66.10, gtkmm 3.24.11
  Debian GNU/Linux forky/sid, amd64
Technical Details
Message-ID: <NUIMV-9g6o-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: "Barak A. Pearlmutter" <barak@cs.nuim.ie>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1152805: inkscape: concurrent command-line exports abort with Gio::DBus::Error (ServiceUnknown) in GApplication registration
Date: Sun, 01 Nov 2026 19:50:01 +0100
Message-ID: <NUIMV-9g6o-1@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Sun Nov  1 18:47:09 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.45
Reply-To: "Barak A. Pearlmutter" <barak@cs.nuim.ie>, 1152805@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-multimedia@lists.debian.org
X-Debian-Pr-Message: report 1152805
X-Debian-Pr-Package: inkscape
X-Debian-Pr-Keywords: upstream
X-Debian-Pr-Source: inkscape
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2000130
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 69
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Sun, 01 Nov 2026 18:45:19 +0000
X-Original-Message-ID: <E1xNaYR-00000003h1D-2nGt@port-kadr>