GNOME Bugzilla – Bug 596922
f-spot crashes when using "soft focus"
Last modified: 2009-10-05 20:06:31 UTC
Description of problem: f-spot crashes when using the "soft focus" utility to change a photo The problems only happens if cairo-devel is _not_ installed. Steps to Reproduce: 0. uninstall cairo-devel 1. navigate to "edit image" view of an image 2. select "Edit" in the sidebar 3. press "Soft Focus" button 4. move the slider -> f-spot crashes The reason for the problem is, that f-spot/src/SoftFocus.cs uses itself DllImport for the library "cairo". Without a "dllmap" the mono runtime environment will only find /usr/lib/libcairo.so which is usually only needed for development and so it is normally in the cairo-devel package and is not installed on most linux systems by default. Since mono's internal Cairo-C# API already provides the needed function, the problem can be fixed by using this API instead of the explicit DllImport. I'll provide a patch soon... backtrace: Exception in Gtk# callback delegate Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. System.Reflection.TargetInvocationException: Exception has been thrown by the ta rget of an invocation. ---> System.DllNotFoundException: cairo at (wrapper managed-to-native) FSpot.Widgets.SoftFocus:cairo_version () at FSpot.Widgets.SoftFocus.CreateMask () [0x00000] at FSpot.Widgets.SoftFocus.set_Radius (Double value) [0x00000] at FSpot.Widgets.SoftFocus..ctor (FSpot.Widgets.ImageInfo info) [0x00000] at FSpot.Editors.SoftFocusEditor.ProcessImpl (Gdk.Pixbuf input, Cms.Profile in put_profile, Boolean fast) [0x00000] at FSpot.Editors.SoftFocusEditor.ProcessFast (Gdk.Pixbuf input, Cms.Profile in put_profile) [0x00000] at FSpot.Editors.Editor.UpdatePreview () [0x00000] at FSpot.Editors.SoftFocusEditor.HandleValueChanged (System.Object sender, Sys tem.EventArgs args) [0x00000] at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (ob ject,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invoke Attr, System.Reflection.Binder binder, System.Object[] parameters, System.Global ization.CultureInfo culture) [0x00000] --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invoke Attr, System.Reflection.Binder binder, System.Object[] parameters, System.Global ization.CultureInfo culture) [0x00000] at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] par ameters) [0x00000] at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args ) [0x00000] at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal _data) [0x00000] at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal) at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal _data) at Gtk.Application.gtk_main() at Gtk.Application.Run() at FSpot.Driver.Main(System.String[] args)
preliminary patch: http://gitorious.org/~chkr/f-spot/chkrs-clone/commit/4788efd86bca54eb3870ab43765151df14500f2d
I haven't seen any bad side effects of the patch so far, I'll create a merge request on gitorious.
commit 9c61aa6f334a94f077e63e3b82f1aeaa457dfe8a Author: Christian Krause <chkr@plauener.de> Date: Sun Oct 4 20:30:18 2009 +0200 remove support for older cairo version - remove DllImport of cairo since it is not needed anymore - remove special code for older cairo version - check for cairo >= 1.4.0 in configure.ac