Inkscape: A Vector Drawing Tool

raster image extensions fail on osx: missing ImageMagick config files/resources

Reported by David Reitter on 2009-06-20
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Undecided
Michael Wybrow

Bug Description

Running different raster image manipulations such as Blur or Contrast very regularly crash Inkscape 0.46-devel (recent build).

I can reproduce by importing a PNG (with alpha channel) and then using "Blur" repeatedly, or simply enabling "Live Preview" and changing the values.

I can make the specific PNG file available if this is what's causing the problem (I've tried with a few related ones).

In the example below, I think I used "contrast".

Also note that Inkscape always says that the emergency save failed.

Process: inkscape-bin [15216]
Path: /Applications/Inkscape.app/Contents/Resources/bin/inkscape-bin
Identifier: inkscape-bin
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: Inkscape [15215]

Interval Since Last Report: 222908 sec
Crashes Since Last Report: 17
Per-App Interval Since Last Report: 0 sec
Per-App Crashes Since Last Report: 9

Date/Time: 2009-06-20 16:29:41.269 -0400
OS Version: Mac OS X 10.5.7 (9J61)
Report Version: 6
Anonymous UUID: 91FCF483-3023-4F2A-952D-036B2116B80B

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0

Thread 0 Crashed:
0 libSystem.B.dylib 0x916bee42 __kill + 10
1 libSystem.B.dylib 0x9173123a raise + 26
2 libSystem.B.dylib 0x9173d622 __abort + 97
3 libSystem.B.dylib 0x9173d68a _cproc_fork_child + 0
4 libglib-2.0.0.dylib 0x01aba557 g_logv + 1495
5 libglib-2.0.0.dylib 0x01aba589 g_log + 41
6 libglibmm-2.4.1.dylib 0x010c5389 Glib::exception_handlers_invoke() + 329
7 libgtkmm-2.4.1.dylib 0x00cb63f4 Gtk::Dialog_Class::response_callback(_GtkDialog*, int) + 196
8 libgobject-2.0.0.dylib 0x0162e3a6 g_closure_invoke + 534
9 libgobject-2.0.0.dylib 0x01640c3b g_signal_init + 5019
10 libgobject-2.0.0.dylib 0x0164216b g_signal_emit_valist + 1771
11 libgobject-2.0.0.dylib 0x016427e9 g_signal_emit + 41
12 libgtk-x11-2.0.0.dylib 0x01159695 gtk_dialog_response + 85
13 libgobject-2.0.0.dylib 0x0162e3a6 g_closure_invoke + 534
14 libgobject-2.0.0.dylib 0x01640a92 g_signal_init + 4594
15 libgobject-2.0.0.dylib 0x0164216b g_signal_emit_valist + 1771
16 libgobject-2.0.0.dylib 0x016427e9 g_signal_emit + 41
17 libgtk-x11-2.0.0.dylib 0x0112788e gtk_button_clicked + 78
18 libgtk-x11-2.0.0.dylib 0x011295d8 gtk_button_get_alignment + 1080
19 libgobject-2.0.0.dylib 0x0162e3a6 g_closure_invoke + 534
20 libgobject-2.0.0.dylib 0x01640697 g_signal_init + 3575
21 libgobject-2.0.0.dylib 0x0164216b g_signal_emit_valist + 1771
22 libgobject-2.0.0.dylib 0x016427e9 g_signal_emit + 41
23 libgtk-x11-2.0.0.dylib 0x011277fe gtk_button_released + 78
24 libgtk-x11-2.0.0.dylib 0x01128b1b gtk_button_set_relief + 3307
25 libgtk-x11-2.0.0.dylib 0x011d655b gtk_marshal_VOID__UINT_STRING + 331
26 libgobject-2.0.0.dylib 0x0162e3a6 g_closure_invoke + 534
27 libgobject-2.0.0.dylib 0x01640c3b g_signal_init + 5019
28 libgobject-2.0.0.dylib 0x01641c67 g_signal_emit_valist + 487
29 libgobject-2.0.0.dylib 0x016427e9 g_signal_emit + 41
30 libgtk-x11-2.0.0.dylib 0x012ef9b6 gtk_widget_activate + 806
31 libgtk-x11-2.0.0.dylib 0x011d4745 gtk_propagate_event + 213
32 libgtk-x11-2.0.0.dylib 0x011d4cdf gtk_main_do_event + 1151
33 libgdk-x11-2.0.0.dylib 0x014b6015 gdk_event_get_graphics_expose + 1365
34 libglib-2.0.0.dylib 0x01aaefab g_main_context_dispatch + 587
35 libglib-2.0.0.dylib 0x01ab345e g_main_context_check + 2750
36 libglib-2.0.0.dylib 0x01ab37c7 g_main_loop_run + 455
37 libgtk-x11-2.0.0.dylib 0x011d3dc1 gtk_main + 177
38 libgtkmm-2.4.1.dylib 0x00cdb1fb Gtk::Main::run() + 27
39 inkscape-bin 0x00004f1a 0x1000 + 16154
40 inkscape-bin 0x001f3162 std::multiset<SPDocument*, std::less<SPDocument*>, std::allocator<SPDocument*> >::multiset() + 1042
41 inkscape-bin 0x00003972 0x1000 + 10610
42 inkscape-bin 0x000031a6 0x1000 + 8614

~suv (suv-lp) wrote :

confirmed with Inkscape 0.46+devel r21615 on Mac OS X 10.5.7, XQuartz 2.3.3.2

to reproduce:
1) create object
2) make bitmap copy, select bitmap copy
3) Extensions > Raster > Contrast… > check 'Live preview'
   or: Extensions > Raster > Blur… > check 'Live preview'
4) Inkscape crashes

console msgs:

glibmm-ERROR **:
unhandled exception (type std::exception) in signal handler:
what: ImageMagick: NoDecodeDelegateForThisImageFormat `/Users/suv/New_document_1-path12-309.png' @ constitute.c/ReadImage/526

aborting...

Emergency save activated!

~suv (suv-lp) on 2009-06-20
tags: added: crash
~suv (suv-lp) wrote :

duplicate of bug #379977 'Imagemagick Raster extensions not working'? same error but no crash on linux/ubuntu.

tags: added: extensions-plugins raster
~suv (suv-lp) on 2009-06-24
Changed in inkscape:
status: New → Confirmed
~suv (suv-lp) wrote :

Mac OS X 10.5.8 (9L30)
XQuartz 2.3.3.2 (xorg-server 1.4.2-apple42)
Inkscape 0.46+devel r22011, built Aug 7 2009

compiled with ImageMagick package installed:

LeWitt:svn suv$ port installed | grep ImageMagick
  ImageMagick @6.5.4-0_0+graphviz+gs+jbig+jpeg2+lcms+mpeg+perl+q16+rsvg+wmf (active)

raster extension work as expected, no more glibmm-errors seen.

Fix of bug #379977 confirmed (SVN rev. 21703 committed by buliabyak),
still remains a build issue on OS X though (assigning to Michael Wybrow)

Changed in inkscape:
assignee: nobody → Michael Wybrow (mjwybrow)
tags: added: build osx
removed: crash
~suv (suv-lp) wrote :

ImageMagick doesn't work in packages from sf.net because can't find its config files:

After renaming $(macport-prefix)/lib/ImageMagick-6.5.4 Inkscape r22011 fails with the same messages as mentioned in comment 7 of bug #379977:

Caught exception: ImageMagick: NoDecodeDelegateForThisImageFormat `/Users/suv/tmp/bitmap-copies/New_document_1-rect3048-591.png' @ blob.c/ImageToBlob/1369

or similar.

proposed fix:
1) the required lib and/or share files need to be included into the bundle and
2) set $MAGICK_HOME in bin/inkscape - see <http://www.imagemagick.org/script/resources.php#environment>

~suv (suv-lp) on 2009-08-07
summary: - raster image extensions crash
+ raster image extensions fail on osx: missing ImageMagick config
+ files/resources
~suv (suv-lp) wrote :

I could not get it to work with $MAGICK_HOME. Inkscape-bin still loaded the coder files from the MacPorts installation.
new proposed fix:

in 'Contents/Resources/bin/inkscape' add
        export MAGICK_CODER_FILTER_PATH="$TOP/lib/ImageMagick-6.5.4/modules-Q16/filters"
        export MAGICK_CODER_MODULE_PATH="$TOP/lib/ImageMagick-6.5.4/modules-Q16/coders"

in 'osx-app.sh' add
cp -r "$LIBPREFIX/lib/ImageMagick-6.5.4" "$pkglib/"
cp -r "$LIBPREFIX/share/ImageMagick-6.5.4" "$pkgresources/share/"

works for me, though I didn't test with patched files yet - just tried these steps:
1) added the resource directories to the bundle (into lib and share),
2) renamed the original directories in $LIBPREFIX (i.e. the MacPorts installation),
3) changed the 'bin/inkscape' script and
4) watched inkscape-bin with 'lsof'.

Raster effect used for testing: 'Swirl'
Image: linked PNG image (inkscape bitmap copy), embedded as result of raster effect

Michael Wybrow (mjwybrow) wrote :

Thanks for the help ~suv~

The Inkscape-0.47pre2-1.LEOPARD.dmg package up on sourceforge contains the ImageMagick resources and config.

The app building files have been updated to show an error if these files are not present.

Changed in inkscape:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers