After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 596922 - f-spot crashes when using "soft focus"
f-spot crashes when using "soft focus"
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: Editing
0.6.1
Other Linux
: Normal normal
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2009-09-30 21:00 UTC by Christian Krause
Modified: 2009-10-05 20:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Krause 2009-09-30 21:00:26 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)
Comment 2 Christian Krause 2009-10-04 09:04:29 UTC
I haven't seen any bad side effects of the patch so far, I'll create a merge request on gitorious.
Comment 3 Stephane Delcroix 2009-10-05 20:06:31 UTC
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