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 397002 - Taglib# chockes on JPEG with strange UserComment encoding.
Taglib# chockes on JPEG with strange UserComment encoding.
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
0.3.x
Other Linux
: Normal normal
: 0.7.1
Assigned To: F-spot maintainers
F-spot maintainers
Depends on: f-spot-taglib
Blocks:
 
 
Reported: 2007-01-15 20:02 UTC by Joseph Sacco
Modified: 2010-07-13 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
jpeg test image (117.76 KB, image/jpeg)
2007-01-23 14:21 UTC, Joseph Sacco
  Details
try this (545 bytes, patch)
2007-01-23 15:17 UTC, Stephane Delcroix
none Details | Review

Description Joseph Sacco 2007-01-15 20:02:22 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
Comment 1 Joseph Sacco 2007-01-15 20:04:26 UTC
Note: System is  G4 powermac running Fedora FC6, GARNOME-2.17.5

-Joseph
Comment 2 Stephane Delcroix 2007-01-23 12:13:34 UTC
do you have a glib configured with --enable-debug ??
Comment 3 Stephane Delcroix 2007-01-23 12:21:35 UTC
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 :(
Comment 4 Joseph Sacco 2007-01-23 13:43:23 UTC
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
Comment 5 Stephane Delcroix 2007-01-23 14:10:23 UTC
Hi Joseph,

can you attach the image that causes this exception ?
Comment 6 Joseph Sacco 2007-01-23 14:21:41 UTC
Created attachment 80975 [details]
jpeg test image
Comment 7 Stephane Delcroix 2007-01-23 15:17:54 UTC
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
Comment 8 Joseph Sacco 2007-01-24 19:12:36 UTC
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?)
Comment 9 Stephane Delcroix 2007-01-24 19:57:57 UTC
no effect was the expected result. I just wanted to close a door...
Comment 10 Maxxer 2010-06-19 14:51:41 UTC
I tried it now and doesn't cause any problem with git master.
Adding f-spot-taglib to be tested against new library.
Comment 11 Ruben Vermeersch 2010-07-08 18:12:19 UTC
Confirmed problem in Taglib#. Should be easy fix.
Comment 12 Ruben Vermeersch 2010-07-13 15:51:16 UTC
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.