GNOME Bugzilla – Bug 397002
Taglib# chockes on JPEG with strange UserComment encoding.
Last modified: 2010-07-13 15:51:16 UTC
f-spot-0.3.1 has Gtk-CRITICAL warning crashers: (f-spot:4145): Gtk-CRITICAL **: gtk_text_buffer_set_text: assertion `text != NULL' failed f-spot can be made to run by setting G_DEBUG to "warning". A trace from running G_DEBUG=warning f-spot 2>&1 | tee f-spot.log is shown below. The trace depicts: * start up a clean version of f-spot * import a single jpeg from a folder containing a single image * select edit photo * open "adjust colors" dialog * change the "hue" -Joseph ==================================================================== $ G_DEBUG=warning f-spot GTK Accessibility Module initialized Bonobo accessibility support initialized Starting new FSpot server Reloading item changed item ImportCommand+SourceItem Scanning /home/testuser/pictures item changed open uri = file:///home/testuser/pictures/azalea-1.jpg open uri = file:///home/testuser/pictures/azalea-1.jpg System.Exception: Invalid charset name: at FSpot.Tiff.UserComment..ctor (System.Byte[] raw_data, Boolean little) [0x00000] at FSpot.Tiff.DirectoryEntry.get_UserCommentValue () [0x00000] at FSpot.Tiff.DirectoryEntry.get_ValueAsString () [0x00000] at FSpot.JpegFile.get_Description () [0x00000] open uri = file:///home/testuser/Photos/2005/06/01/azalea-1.jpg System.Exception: Invalid charset name: at FSpot.Tiff.UserComment..ctor (System.Byte[] raw_data, Boolean little) [0x00000] at FSpot.Tiff.DirectoryEntry.get_UserCommentValue () [0x00000] at FSpot.Tiff.DirectoryEntry.get_ValueAsString () [0x00000] at FSpot.Tiff.Header.SelectDirectory (FSpot.Tiff.ImageDirectory dir, StatementSink sink) [0x00000] at FSpot.Tiff.Header.SelectDirectory (FSpot.Tiff.ImageDirectory dir, StatementSink sink) [0x00000] item changed open uri = file:///home/testuser/Photos/2005/06/01/azalea-1.jpg open uri = file:///home/testuser/Photos/2005/06/01/azalea-1.jpg Stopping open uri = file:///home/testuser/Photos/2005/06/01/azalea-1.jpg open uri = file:///home/testuser/Photos/2005/06/01/azalea-1.jpg cleanup context cleanup context open uri = file:///home/testuser/Photos/2005/06/01/azalea-1.jpg open uri = file:///home/testuser/Photos/2005/06/01/azalea-1.jpg Reloading item changed open uri = file:///home/testuser/Photos/2005/06/01/azalea-1.jpg open uri = file:///home/testuser/Photos/2005/06/01/azalea-1.jpg open uri = file:///home/testuser/Photos/2005/06/01/azalea-1.jpg System.Exception: Invalid charset name: at FSpot.Tiff.UserComment..ctor (System.Byte[] raw_data, Boolean little) [0x00000] at FSpot.Tiff.DirectoryEntry.get_UserCommentValue () [0x00000] at FSpot.Tiff.DirectoryEntry.get_ValueAsString () [0x00000] at FSpot.Tiff.Header.SelectDirectory (FSpot.Tiff.ImageDirectory dir, StatementSink sink) [0x00000] at FSpot.Tiff.Header.SelectDirectory (FSpot.Tiff.ImageDirectory dir, StatementSink sink) [0x00000] (f-spot:6198): Gtk-CRITICAL **: gtk_text_buffer_set_text: assertion `text != NULL' failed (f-spot:6198): Gtk-CRITICAL **: gtk_text_buffer_set_text: assertion `text != NULL' failed open uri = file:///home/testuser/Photos/2005/06/01/azalea-1.jpg open uri = file:///home/testuser/Photos/2005/06/01/azalea-1.jpg Saving.... open uri = file:///home/testuser/Photos/2005/06/01/azalea-1.jpg value = f-spot version 0.3.1 len = 20 value = 2007:01:15 14:57:44 len = 19 Saved 16225 bytes open uri = file:///home/testuser/Photos/2005/06/01/azalea-1 (Modified).jpg open uri = file:///home/testuser/Photos/2005/06/01/azalea-1 (Modified).jpg item changed open uri = file:///home/testuser/Photos/2005/06/01/azalea-1 (Modified).jpg open uri = file:///home/testuser/Photos/2005/06/01/azalea-1 (Modified).jpg open uri = file:///home/testuser/Photos/2005/06/01/azalea-1 (Modified).jpg open uri = file:///home/testuser/Photos/2005/06/01/azalea-1 (Modified).jpg open uri = file:///home/testuser/Photos/2005/06/01/azalea-1 (Modified).jpg clearing window open uri = file:///home/testuser/Photos/2005/06/01/azalea-1 (Modified).jpg
Note: System is G4 powermac running Fedora FC6, GARNOME-2.17.5 -Joseph
do you have a glib configured with --enable-debug ??
On gnome development branches (like GARNOME-2.17.5) they set G_DEBUG to fatal_criticals. I think this is not something we could solve F-Spot... the issue should be in gtk-sharp or something :(
Stephane, I do not know the source of the critical warning although the trace is suggestive. ... System.Exception: Invalid charset name: at FSpot.Tiff.UserComment..ctor (System.Byte[] raw_data, Boolean little) [0x00000] at FSpot.Tiff.DirectoryEntry.get_UserCommentValue () [0x00000] at FSpot.Tiff.DirectoryEntry.get_ValueAsString () [0x00000] at FSpot.JpegFile.get_Description () [0x00000] ... I would venture a guess that an exception that needs to be handled is not being handled. -Joseph
Hi Joseph, can you attach the image that causes this exception ?
Created attachment 80975 [details] jpeg test image
Created attachment 80989 [details] [review] try this Hi Joseph, Please try this patch and report. This patch ensure that the exception is caught earlier and sets the UserComment to "" if such an exception is caught. Please run f-spot with --sync, to trigger the errors and warnings as soon as they're generated
Stephane, The patch did *not* eliminate the critical warning. See below. -Joseph ============================================== # f-spot --sync GTK Accessibility Module initialized Bonobo accessibility support initialized Starting new FSpot server (f-spot:22073): libglade-WARNING **: unknown attribute `comment' for <property>. Reloading item changed open uri = file:///home/testuser/Photos/2005/06/01/azalea-1-1.jpg open uri = file:///home/testuser/Photos/2005/06/01/azalea-1-1.jpg open uri = file:///home/testuser/Photos/2005/06/01/azalea-1-1.jpg System.Exception: Invalid charset name: at FSpot.Tiff.UserComment..ctor (System.Byte[] raw_data, Boolean little) [0x00000] at FSpot.Tiff.DirectoryEntry.get_UserCommentValue () [0x00000] open uri = file:///home/testuser/Photos/2005/06/01/azalea-1-1.jpg System.Exception: Invalid charset name: at FSpot.Tiff.UserComment..ctor (System.Byte[] raw_data, Boolean little) [0x00000] at FSpot.Tiff.DirectoryEntry.get_UserCommentValue () [0x00000] (f-spot:22073): libglade-WARNING **: unknown attribute `comment' for <property>. Gtk-CRITICAL **: gtk_text_buffer_set_text: assertion `text != NULL' failed aborting... GTK Accessibility Module initialized Bonobo accessibility support initialized GTK Accessibility Module initialized Bonobo accessibility support initialized "/usr/local/src/GARNOME/Devel/garnome-trunk/bin/f-spot": not in executable format: File format not recognized Previous frame inner to this frame (corrupt stack?) Previous frame inner to this frame (corrupt stack?) Previous frame inner to this frame (corrupt stack?) Previous frame inner to this frame (corrupt stack?)
no effect was the expected result. I just wanted to close a door...
I tried it now and doesn't cause any problem with git master. Adding f-spot-taglib to be tested against new library.
Confirmed problem in Taglib#. Should be easy fix.
I've pushed a fix for this and added your image to our regression tests. Thanks! Will be in the 0.7.1 release tomorrow.