Iniciar sesión

Redondela en Foto

F-Spot icon view decorations —and gtk-sharp compiled from development version

::

F-Spot icon view with tags, dates and rating stars.

With my last pull request, which you can see here, I'm trying to recover a few aesthetic features that was missing on F-Spot/gtk3, mainly the decorations of icon view mode thumbnails —date, tag icons and rating stars.

But the most interesting task I've accomplished last week was to investigate the reason of tons of weird GLib errors I was seeing when navigating through photos, just like this one:

Domain: 'GLib' Level: Critical
Message: Source ID 1915 was not found when attempting to remove it
Trace follows:
at GLib.Log.PrintTraceLogFunction(System.String domain, LogLevelFlags level, System.String message)
at GLib.Log.NativeCallback(IntPtr log_domain_native, LogLevelFlags flags, IntPtr message_native, IntPtr user_data)
at GLib.Source.g_source_remove(UInt32 )
at GLib.Source.Remove(UInt32 tag)
at GLib.Idle+IdleProxy.Dispose(Boolean disposing)
at GLib.Idle+IdleProxy.Finalize()

After some debugging I've found the source of the problem: One error message was being printed for each call to g_idle_add, so I decided to write two little programs to see if the error was with F-Spot or with something between gtk-sharp or GLib itself —and I've discarded F-Spot because my C# test program had exactly the same problem.

After searching the Web finding no more than complaints about the problem, but no solutions nor explanations about it, I've been able to understand the problem simply changing the return value of the callback function I was using to perform the tests: It looks like gtk-sharp glib bindings has an error in stable version that makes GLib complain about trying to double free a non existent source if the callback you passed to g_idle_add has returned false —since returning false makes GLib free that source, so it shouldn't be freed again.

So I've compiled and installed the git version of gtk-sharp and I've started seeing weird crashes in my test programs and also in F-Spot:

Unhandled Exception:
System.TypeInitializationException: An exception was thrown by the type initializer for FSpot.Utils.XdgThumbnailSpec ---> System.DllNotFoundException: libglib-2.0-0.dll
at (wrapper managed-to-native) GLib.Marshaller:g_malloc (uintptr)
at GLib.Marshaller.StringToPtrGStrdup (System.String str) [0x00000] in :0
at Hyena.SafeUri.FilenameToUri (System.String localPath) [0x00000] in /home/valentin/Escritorio/f-spot-sanva/external/Hyena/Hyena/Hyena/SafeUri.cs:88
at Hyena.SafeUri..ctor (System.String uri) [0x00047] in /home/valentin/Escritorio/f-spot-sanva/external/Hyena/Hyena/Hyena/SafeUri.cs:59
at FSpot.Utils.XdgThumbnailSpec..cctor () [0x00000] in /home/valentin/Escritorio/f-spot-sanva/src/Core/FSpot.Utils/XdgThumbnailSpec.cs:91
--- End of inner exception stack trace ---
at FSpot.Driver.Main (System.String[] args) [0x0006b] in /home/valentin/Escritorio/f-spot-sanva/src/Clients/MainApp/FSpot/main.cs:180
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for FSpot.Utils.XdgThumbnailSpec ---> System.DllNotFoundException: libglib-2.0-0.dll
at (wrapper managed-to-native) GLib.Marshaller:g_malloc (uintptr)
at GLib.Marshaller.StringToPtrGStrdup (System.String str) [0x00000] in :0
at Hyena.SafeUri.FilenameToUri (System.String localPath) [0x00000] in /home/valentin/Escritorio/f-spot-sanva/external/Hyena/Hyena/Hyena/SafeUri.cs:88
at Hyena.SafeUri..ctor (System.String uri) [0x00047] in /home/valentin/Escritorio/f-spot-sanva/external/Hyena/Hyena/Hyena/SafeUri.cs:59
at FSpot.Utils.XdgThumbnailSpec..cctor () [0x00000] in /home/valentin/Escritorio/f-spot-sanva/src/Core/FSpot.Utils/XdgThumbnailSpec.cs:91
--- End of inner exception stack trace ---
at FSpot.Driver.Main (System.String[] args) [0x0006b] in /home/valentin/Escritorio/f-spot-sanva/src/Clients/MainApp/FSpot/main.cs:180

In short, I've found this link and with the help of

ldconfig -p | grep 'libraryname'

I've been able to fix my system creating a symbolic link to every *.so file with the name Mono was expecting...

And now the GLib critical warnings are gone.

Tags: [en], GNOME, Google Summer of Code, F-Spot, Mono, gtk-sharp, glib, Planet GNOME

Comentarios (0)

Escribe tu comentario

Nos encantará que des tu opinión, para lo cual puedes utilizar el siguiente formulario. Por favor, intenta que tus comentarios estén relacionados con este artículo. Así mismo te pedimos que no faltes al respeto a nadie, y que no escribas como en un teléfono móvil. Cualquier comentario fuera de lugar (insultos, spam, off-topic, etc) puede ser borrado sin previo aviso.

¿No tienes una cuenta?

Regístrate

Es fácil, rápido y gratuito.

Inicia sesión en sanva.net

He olvidado mis datos de acceso.

Redondela en Foto 8.6.9 - XHTML 1.0 Strict - CSS - Política de Privacidad