Raster Extensions crash Inkscape

Bug #1720330 reported by Gonzalo
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Patrick Storz

Bug Description

Inkscape shuts down each time a raster extension is tried to be applied on an image (bitmap).

OS: Windows 10 (64 bits)
Inkscape 0.92.2

Gonzalo (gonzm8)
tags: added: win64
tags: added: raster windows10
Revision history for this message
Alvin Penner (apenner) wrote :

- confirmed on Windows 10, Inkscape 0.92.2 (5c3e80d, 2017-08-06)
- open the attached gif file
- choose Extensions->Raster->Enhance
- get crash with attached DOS error message:

C:\Program Files (x86)\Inkscape>inkscape
terminate called after throwing an instance of 'Magick::ErrorMissingDelegate'
  what(): Magick: NoDecodeDelegateForThisImageFormat `PNG' @ error/blob.c/BlobToImage/355

Emergency save activated!
Emergency save completed. Inkscape will close now.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Alvin Penner (apenner) wrote :

crash not reproduced on the 0.92.x branch:
inkscape-0.92.x-c522dc6d

Revision history for this message
Patrick Storz (ede123) wrote :

Seems to happen with all *embedded* images; *linked* images seem to work just fine.

@Alvin: As this might be a packaging issue and/or related to the specific version of ImageMagick used could you comment on build method (i.e. MSYS2 or devlibs)?

Revision history for this message
Gonzalo (gonzm8) wrote :

With *embedded* images, Inkscape closes without any advise/error.
With *linked*, extensions don't work and the image is equal to before use the extension (from Raster)

Revision history for this message
Alvin Penner (apenner) wrote :

using devlibs32 for the 0.92.x branch compile
and using 32 bit exe file for the stable release

there is a difference in the imagemagick files:

for the 0.92.x branch with devlibs I get:
 Directory of C:\inkscape-0.92.x-c522dc6d\build\inkscape

08/05/2016 10:20 AM 705,752 libMagick++-3.dll
08/05/2016 10:20 AM 5,390,569 libMagickCore-3.dll
08/05/2016 10:20 AM 1,057,933 libMagickWand-3.dll

for the stable 92.2 release I get:
 Directory of C:\Program Files (x86)\Inkscape

04/05/2016 02:36 PM 435,112 libMagick++-6.Q16HDRI-6.dll
04/05/2016 02:36 PM 2,094,656 libMagickCore-6.Q16HDRI-2.dll
04/05/2016 02:36 PM 1,129,513 libMagickWand-6.Q16HDRI-2.dll

Revision history for this message
Patrick Storz (ede123) wrote :

Stable Inkscape 0.92.2 (5c3e80d, 2017-08-06) (both 32/64-bit) is compiled with MSYS2 and has ImageMagick 6.9.3.7.

I just confirmed also stable 0.92.1 (64-bit, devlibs64) is working which uses ImageMagick 6.9.0 (32-bit devlibs use ImageMagick 6.5.9).

I'll see if I can find out whats going on this evening...

Revision history for this message
Patrick Storz (ede123) wrote :

It's a relocation issue with ImageMagick...

If you have Inkscape installed in "root_dir/Inkscape/..." it searches for some files in "root_dir/etc".

Revision history for this message
Patrick Storz (ede123) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

but Inkscape is not installed in the root dir, it is installed in
C:\Program Files (x86)\Inkscape>inkscape

Revision history for this message
Patrick Storz (ede123) wrote :

Call "root_dir" -> "parent_dir" if it suits you better...

In your case "root/parent_dir" would be "C:\Program Files (x86)" and ImageMagick would search for files in "C:\Program Files (x86)\etc" and "C:\Program Files (x86)\lib".

Revision history for this message
Patrick Storz (ede123) wrote :

I committed a fix for the crashing issue in
https://gitlab.com/inkscape/inkscape/commit/1fe5b815e10ade11fbb4bbec6b15f1a8945b7a1b
(this will not "fix" the raster extension on it's own, but at least Inkscape should not crash anymore if anything goes wrong and a helpful message should be printed to the command line)

In order to work around the relocation issue in ImageMagick I rebuilt the package in a way that compiles all vital parts of the program into the main library (I guess this is also how the versions in devlibs/devlibs64 were compiled). While this does not magically repair relocation it at least ensures basic functionality as no external pieces are required anymore.

I updated the MSYS2 build with this custom ImageMagick built in
https://gitlab.com/inkscape/inkscape/commit/cb12c8d28ee46619bac0c519faca2e1114eed9f6
so CI builds should already be working properly (feel free to test as I'm not often using raster extensions myself and therefore do not know how they're "supposed" to work)

For future reference: I opened an issue about the relocation problems for the MSYS2 project at
https://github.com/Alexpux/MINGW-packages/issues/2995

Changed in inkscape:
importance: Undecided → Medium
status: Confirmed → Fix Committed
assignee: nobody → Eduard Braun (eduard-braun2)
milestone: none → 0.93
tags: added: backport-proposed extensions-plugins win32
removed: raster windows10
Revision history for this message
Patrick Storz (ede123) wrote :
tags: removed: backport-proposed
Changed in inkscape:
milestone: 0.93 → 0.92.3
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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