GNOME Bugzilla – Bug 482038
F-spot crashes at Exif.ExifData.exif_data_save_data during export
Last modified: 2008-04-22 22:42:47 UTC
Steps to reproduce: 1. Select a large range of images 2. Select File --> Export to Folder, files only, no resize, autorotate. 3. Run the export, wait for the crash. (about 20-50 files) Stack trace: Initializing Mono.Addins Starting new FSpot server Query: SELECT photos.id, photos.time, photos.directory_path, photos.name, photos.description, photos.roll_id, photos.default_version_id FROM photos WHERE photos.id NOT IN (SELECT photo_id FROM photo_tags WHERE tag_id = 2) ORDER BY photos.time Query: SELECT photos.id, photos.time, photos.directory_path, photos.name, photos.description, photos.roll_id, photos.default_version_id FROM photos WHERE photos.id NOT IN (SELECT photo_id FROM photo_tags WHERE tag_id = 2) ORDER BY photos.time Query: SELECT photos.id, photos.time, photos.directory_path, photos.name, photos.description, photos.roll_id, photos.default_version_id FROM photos WHERE photos.id NOT IN (SELECT photo_id FROM photo_tags WHERE tag_id = 2) ORDER BY photos.time (f-spot:19709): Gtk-WARNING **: gtk_menu_attach_to_widget(): menu already attached to GtkMenuItem (f-spot:19709): Gtk-WARNING **: gtk_menu_attach_to_widget(): menu already attached to GtkMenuItem Query: SELECT photos.id, photos.time, photos.directory_path, photos.name, photos.description, photos.roll_id, photos.default_version_id FROM photos WHERE photos.id NOT IN (SELECT photo_id FROM photo_tags WHERE tag_id = 2) ORDER BY photos.time Reloading Query: SELECT photos.id, photos.time, photos.directory_path, photos.name, photos.description, photos.roll_id, photos.default_version_id FROM photos WHERE photos.id NOT IN (SELECT photo_id FROM photo_tags WHERE tag_id = 2) ORDER BY photos.time item changed open uri = file:///home/nick/Photos/2007/09/27/std_3120.jpg open uri = file:///home/nick/Photos/2007/09/27/std_3120.jpg (f-spot:19709): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference. open uri = file:///home/nick/Photos/2007/09/27/std_3120.jpg open uri = file:///home/nick/Photos/2007/09/27/std_3120.jpg open uri = file:///home/nick/Photos/2007/09/27/stc_3119.jpg open uri = file:///home/nick/Photos/2007/09/27/stc_3119.jpg open uri = file:///home/nick/Photos/2007/09/27/ste_3114.jpg Query: SELECT photos.id, photos.time, photos.directory_path, photos.name, photos.description, photos.roll_id, photos.default_version_id FROM photos WHERE (((id IN (SELECT photo_id FROM photo_tags WHERE tag_id IN (67))) AND id NOT IN (SELECT photo_id FROM photo_tags WHERE tag_id = 2))) ORDER BY photos.time Reloading Query: SELECT photos.id, photos.time, photos.directory_path, photos.name, photos.description, photos.roll_id, photos.default_version_id FROM photos WHERE photos.id NOT IN (SELECT photo_id FROM photo_tags WHERE tag_id = 2) ORDER BY photos.time item changed open uri = file:///home/nick/Photos/2007/07/23/P1000833.JPG open uri = file:///home/nick/Photos/2007/07/23/P1000833.JPG open uri = file:///home/nick/Photos/2007/07/23/P1000833.JPG open uri = file:///home/nick/Photos/2007/07/23/P1000833.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000742.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000742.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000725.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000725.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000721.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000721.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000686.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000686.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000684.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000684.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000680.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000688.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000688.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000693.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000693.JPG open uri = file:///home/nick/Photos/2007/07/20/P1000695.JPG open uri = file:///home/nick/Photos/2007/07/20/P1000695.JPG open uri = file:///home/nick/Photos/2007/07/20/P1000694.JPG open uri = file:///home/nick/Photos/2007/07/20/P1000694.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000720 (Modified).JPG open uri = file:///home/nick/Photos/2007/07/21/P1000720 (Modified).JPG open uri = file:///home/nick/Photos/2007/07/21/P1000729.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000729.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000731.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000731.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000728.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000728.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000660.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000734.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000734.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000741.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000741.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000739.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000739.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000733.JPG open uri = file:///home/nick/Photos/2007/07/21/P1000733.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000665.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000666.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000668.JPG open uri = file:///home/nick/Photos/2007/07/13/P1000376.JPG open uri = file:///home/nick/Photos/2007/07/13/P1000376.JPG open uri = file:///home/nick/Photos/2007/07/13/P1000377.JPG open uri = file:///home/nick/Photos/2007/07/13/P1000377.JPG open uri = file:///home/nick/Photos/2007/07/13/P1000379.JPG open uri = file:///home/nick/Photos/2007/07/13/P1000379.JPG open uri = file:///home/nick/Photos/2007/07/13/P1000381.JPG open uri = file:///home/nick/Photos/2007/07/13/P1000381.JPG open uri = file:///home/nick/Photos/2007/07/13/P1000380.JPG open uri = file:///home/nick/Photos/2007/07/13/P1000380.JPG open uri = file:///home/nick/Photos/2007/07/13/P1000378.JPG open uri = file:///home/nick/Photos/2007/07/13/P1000378.JPG Exporting full size image Exporting rotated image open uri = file:///home/nick/Photos/2007/07/19/P1000668.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000667.JPG Saving jpeg data open uri = file:///tmp/tmp1bc74b9.tmp..JPG value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:28:37 len = 19 value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:28:37 len = 19 Saved 12170 bytes open uri = file:///home/nick/Photos/2007/07/19/P1000666.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000665.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000664.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000663.JPG (f-spot:19709): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference. Saving jpeg data open uri = file:///tmp/tmp3f636629.tmp..JPG value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:28:52 len = 19 value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:28:52 len = 19 Saved 17906 bytes open uri = file:///home/nick/Photos/2007/07/19/P1000662.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000661.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000660.JPG Saving jpeg data open uri = file:///tmp/tmp22bef9ff.tmp..JPG value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:28:55 len = 19 value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:28:55 len = 19 Saved 16446 bytes (f-spot:19709): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference. (f-spot:19709): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference. open uri = file:///home/nick/Photos/2007/07/19/P1000659.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000658 (Modified).JPG open uri = file:///home/nick/Photos/2007/07/19/P1000657.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000656.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000655.JPG Saving jpeg data open uri = file:///tmp/tmp50c00529.tmp..JPG value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:29:12 len = 19 value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:29:12 len = 19 Saved 19954 bytes open uri = file:///home/nick/Photos/2007/07/19/P1000654.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000653.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000652.JPG Saving jpeg data open uri = file:///tmp/tmp2dedbe6a.tmp..JPG value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:29:15 len = 19 value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:29:15 len = 19 Saved 16658 bytes (f-spot:19709): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference. (f-spot:19709): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference. open uri = file:///home/nick/Photos/2007/07/19/P1000651.JPG Saving jpeg data open uri = file:///tmp/tmp241495c2.tmp..JPG value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:29:16 len = 19 value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:29:16 len = 19 Saved 16692 bytes open uri = file:///home/nick/Photos/2007/07/19/P1000650.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000649.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000648.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000647.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000646.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000645.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000644.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000643.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000642.JPG Saving jpeg data open uri = file:///tmp/tmp3a5fe0ad.tmp..JPG value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:29:33 len = 19 value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:29:33 len = 19 Saved 13541 bytes (f-spot:19709): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference. (f-spot:19709): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference. open uri = file:///home/nick/Photos/2007/07/19/P1000641.JPG Saving jpeg data open uri = file:///tmp/tmp3c2b1aee.tmp..JPG value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:29:35 len = 19 value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:29:35 len = 19 Saved 15249 bytes open uri = file:///home/nick/Photos/2007/07/19/P1000639-1.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000638-1.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000637-1.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000636-1.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000635-1.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000634-1.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000633-1 (Modified).JPG open uri = file:///home/nick/Photos/2007/07/19/P1000632-1.JPG open uri = file:///home/nick/Photos/2007/07/19/P1000631-1.JPG Saving jpeg data open uri = file:///tmp/tmp49d5b35c.tmp..JPG value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:29:52 len = 19 value = f-spot version 0.4.0 len = 20 value = 2007:09:30 18:29:52 len = 19 Stacktrace: at (wrapper managed-to-native) Exif.ExifData.exif_data_save_data (System.Runtime.InteropServices.HandleRef,intptr&,uint&) <0x00004> at (wrapper managed-to-native) Exif.ExifData.exif_data_save_data (System.Runtime.InteropServices.HandleRef,intptr&,uint&) <0xffffffff> at Exif.ExifData.Save () <0x0003a> at JpegHeader.SetExif (Exif.ExifData) <0x0001f> at FSpot.JpegFile.SaveMetaData (System.IO.Stream,System.IO.Stream) <0x0004e> at FSpot.JpegFile.SaveMetaData (string) <0x00095> at FSpot.Filters.OrientationFilter.Convert (FSpot.Filters.FilterRequest) <0x00224> at FSpot.Filters.FilterSet.Convert (FSpot.Filters.FilterRequest) <0x000ee> at FSpot.FolderGallery.ProcessImage (int,FSpot.Filters.FilterSet) <0x0012f> at FSpot.FolderExport.Upload () <0x004da> at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void () <0xffffffff> at (wrapper runtime-invoke) System.Object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff> Native stacktrace: f-spot [0x815b7d2] f-spot [0x8146536] [0xffffe440] [0x464a1000] Debug info from gdb: (no debugging symbols found) Using host libthread_db library "/lib/libthread_db.so.1". (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread -1208715584 (LWP 19709)] [New Thread -1272972400 (LWP 19720)] [New Thread -1268487280 (LWP 19717)] [New Thread -1259361392 (LWP 19716)] [New Thread -1258308720 (LWP 19715)] [New Thread -1238557808 (LWP 19712)] [New Thread -1219789936 (LWP 19711)] [New Thread -1208689776 (LWP 19710)] 0xffffe410 in __kernel_vsyscall () 8 Thread -1208689776 (LWP 19710) 0xffffe410 in __kernel_vsyscall () 7 Thread -1219789936 (LWP 19711) 0xffffe410 in __kernel_vsyscall () 6 Thread -1238557808 (LWP 19712) 0xffffe410 in __kernel_vsyscall () 5 Thread -1258308720 (LWP 19715) 0xffffe410 in __kernel_vsyscall () 4 Thread -1259361392 (LWP 19716) 0xffffe410 in __kernel_vsyscall () 3 Thread -1268487280 (LWP 19717) 0xffffe410 in __kernel_vsyscall () 2 Thread -1272972400 (LWP 19720) 0xffffe410 in __kernel_vsyscall () 1 Thread -1208715584 (LWP 19709) 0xffffe410 in __kernel_vsyscall ()
+ Trace 166736
================================================================= Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= Other information: Exporting doesn't fail if autorotation is disabled for the export.
I experienced almost the same bug as you, but IIRC it wasn't on export. It has been a random crash while running out of memory. at (wrapper managed-to-native) Exif.ExifData.exif_data_save_data (System.Runtime.InteropServices.HandleRef,intptr&,uint&) <0x00012> at (wrapper managed-to-native) Exif.ExifData.exif_data_save_data (System.Runtime.InteropServices.HandleRef,intptr&,uint&) <0xffffffff> maybe it's a libexif problem. Some time ago it has been said devs are working on a libexif-free code for F-Spot. Does it happen regularly on the same batch of photos?
It certainly seems like it's EXIF related, that would explain why turning off autorotation fixes the problem... F-spot wouldn't be rewriting the EXIF tag under those conditions. I don't do large exports like this often, but the batch of photos I was working with gave me fits consistently, but not always at the same place in the process. ie, Sometimes it would make it through more/less photos before crashing. Exporting the same number of photos with resize enabled (800px) I got a crash on the first try (~100 photos or so), then it ran successfully the next attempt. Now that I think about it, f-spot's memory usage did climb and climb during the operations, perhaps related to this: (f-spot:19709): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.
There was this bug http://bugzilla.gnome.org/show_bug.cgi?id=382382 related to some crashes and memory leaks due to libexif. A patch for libexif was committed, but no new version since then AFAIK. Maybe you want to try it yourself :)
Always the same photo it crashes on? Perhaps you can attach this photo in that case to this bug?
It's not always the same photo, the crash seems to be related to memory exhaustion, not any photo in particular.
*** Bug 483522 has been marked as a duplicate of this bug. ***
The other reporter claims this issue doesn't occur in Ubuntu 7.10.
On closer inspection, this is indeed a duplicate of bug #382382, which has the same stack trace. Newer versions of libexif should be fixed. :) There might possibly still be a memory leak somewhere, but f-spot shouldn't crash. Thanks for the bug report. Please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 382382 ***