Crash due to re-registering GdkPixbufGdipAnim during BMP read

Bug #1467103 reported by Daniel Beardsmore on 2015-06-20
This bug affects 22 people
Affects Status Importance Assigned to Milestone
Patrick Storz
Inkscape Devlibs for Windows 64-bit
Patrick Storz

Bug Description

Visible fault:

Inkscape cannot read a Windows bitmap (BMP) file subsequent to opening an SVG file with an embedded raster object. Attempting to do so causes the program to simply disappear from the screen without warning.

To reproduce:

1) Open an SVG containing a raster object (any BMP/PNG/JPG etc already imported and embedded into the image), either with File → Open, or by starting Inkscape by double-clicking an SVG file in Windows Explorer/File Explorer

2) Try to import a BMP file using any of the methods below, either into the same document, or into a new document (after File → New):
  a) Drop a BMP file onto the image
  b) File → Import, click image (with thumbnail panel active in Open dialog) — crashes inside the Open dialog when showing the thumbnail prior to clicking Open
  c) File → Import, click image, click Open (with thumbnail panel hidden) — crashes during import


It appears the SVG image read process registers GdkPixbufGdipAnim when the image contains a raster object, as does reading a Windows BMP (but not PNG/JPG). Trying to re-register this type during a BMP read subsequent to reading an SVG document fails, causing the program to terminate.

Output from inkscapec.exe:

(inkscape.exe:5152): GLib-GObject-WARNING **: cannot register existing type 'GdkPixbufGdipAnim'

(inkscape.exe:5152): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(inkscape.exe:5152): GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed


Inkscape 0.91 r13725 64-bit (from inkscape 0.91 pre 2 x64.msi)
Windows 8.1 Pro 64-bit

su_v (suv-lp) wrote :
tags: added: bitmap crash win64
Changed in inkscape:
importance: Undecided → High
su_v (suv-lp) wrote :

Earlier report which are likely shares the same underlying issue:
* Bug #1447012 “crash while importing jpg and tiff images in the same drawing”

Daniel Beardsmore (telcontar) wrote :

Bug #1447012 is the same fault -- the same output is generated in inkscapec.exe, and the crash occurs inside the Open dialog box when clicking on the image to be imported, i.e. at the point that Inkscape first tries to read the image, causing the program to disappear.

su_v (suv-lp) on 2015-06-20
Changed in inkscape:
milestone: none → 0.92
status: New → Triaged
su_v (suv-lp) wrote :

On 2015-06-20 16:03 (+0200), ~suv wrote:
> ** Also affects: inkscape-devlibs64

JFTR - I added inkscape-devlibs64 because of the workaround described in the linked redhat bug report:

As a downstream, I guess we could compile all the GDI+ loaders into the main gdk-pixbuf DLL, which should fix the static variable problem. Another way to fix it would be to just stop using the GDI+ loaders.

su_v (suv-lp) wrote :

Raising Importance to 'Critical' due to loss of data (no emergency save).

AFAIU this needs fixing in how gdk-pixbuf in the 64bit devlibs is configured and compiled (not a change in Inkscape's own code). Builds using the current 32bit devlibs are not affected because there the gdk-pixbuf loaders are compiled in.

Changed in inkscape:
importance: High → Critical
Patrick Storz (ede123) wrote :

Was anybody able to reproduce this bug with the steps described in the initial report?

I just tried to verify the devlib64 update will fix this issue but I can't even reproduce it with the released stable version of Inkscape 0.91 win64.

If somebody can reliably reproduce it please post steps and sample files that can be used to trigger the crash!

Daniel Beardsmore (telcontar) wrote :

Funny, I was having this crash only a couple of days ago. I've attached a JPG image, after which I'll add a GIF image. If you launch Inkscape, then drag either image into the window to embed it, and then do the same with the second image, the program disappears from the screen. It doesn't matter whether you embed the GIF first, or the JPG first.

I can add either type repeatedly without issue, but the crash occurs when embedding a second type of image. e.g. I can add JPG after JPG after JPG, but the first GIF or PNG it sees crashes it, simply because it's a different format. Likewise, embed lots of GIFs, and then a JPG, at which point it crashes.

Daniel Beardsmore (telcontar) wrote :
Patrick Storz (ede123) wrote :

Great, thanks... I tried to import a BMP into an SVG already containing an embedded PNG before which apparently does not trigger the crash. Mixing BMP and JPG does the trick however.

Anyway good news is that the crash does not seem to occur with builds based on the updated devlibs64. If you like you can grab a recent build from [1] and confirm that it fixes the issue for you.


Daniel Beardsmore (telcontar) wrote :

It appears to be fixed for me, yes, thank you.

Patrick Storz (ede123) wrote :

Fixed with the major update of inkscape-devlibs64 in revision 19.

gdk-pixbuf is compiled without GDI loaders (configure option --without-gdiplus)
Alternatively it should also work to use --disable-modules (which builds all loaders statically into the gdk-pixbuf library )

Changed in inkscape:
assignee: nobody → Eduard Braun (eduard-braun2)
Changed in inkscape-devlibs64:
assignee: nobody → Eduard Braun (eduard-braun2)
status: New → Fix Committed
Changed in inkscape:
status: Triaged → Fix Committed
Changed in inkscape-devlibs64:
assignee: Eduard Braun (eduard-braun2) → nobody
assignee: nobody → Eduard Braun (eduard-braun2)
Patrick Storz (ede123) wrote :

Just for the sake of completeness:
The correct configure switch for gdk-pixbuf is --with-included-loaders, NOT --disable-modules as is wrote above. The latter only disables dynamic loading of modules altogether, but does not include any of them into the library.

I updated devlibs64 with gdk-pixbuf configured like this in r32 [2] and it seems to work nicely.


dryphi (dryphi) wrote :

I'm having this problem using Inkscape 0.91 r13725 (64 bit) on Windows 10.
Any way to solve it on Windows? When will this make it into an installer release? I'm not familiar with compiling, is there a beta I could download?

Alvin Penner (apenner) wrote :

you could get a more recent build at:

Daniel Beardsmore (telcontar) wrote :

The workaround is to re-save your images as PNG prior to importing them. I'd forgotten that PNG wasn't affected, as I'd been mentally noting for a while that this bug seems to have cured itself. It just so happens that I typically import PNG images!

Bryce Harrington (bryce) on 2017-01-09
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.