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 618573 - F-Spot is fracturizing my pictures and messing them up COMPLETELY
F-Spot is fracturizing my pictures and messing them up COMPLETELY
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
0.6.x
Other Linux
: Normal blocker
: 0.7.1
Assigned To: F-spot maintainers
F-spot maintainers
Depends on: f-spot-taglib
Blocks:
 
 
Reported: 2010-05-13 21:14 UTC by David Runge
Modified: 2010-07-13 18:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Runge 2010-05-13 21:14:25 UTC
Wow... this was mindblowing.

So, to begin:

F-Spot is working very very slow and at some point crashed my whole system (freezing).
I had to kill it (yes, sort of pulling the plug).

Fun thing is: I rebooted and started it up again. Suddenly lots of my pictures are completely fractured (with parts of other pictures in them).
Even those that I haven't been working (tagging only) on!

As I started it over the terminal it gave me this for infinity:

GLib.GException: Unrecognized image file format
  at Gdk.PixbufLoader.Write (System.Byte[] buf, UInt64 count) [0x00000] in <filename unknown>:0 
  at PixbufUtils+AspectLoader.Load (System.IO.Stream stream, PixbufOrientation orientation) [0x00000] in <filename unknown>:0 
  at FSpot.ImageFile.Load (Int32 max_width, Int32 max_height) [0x00000] in <filename unknown>:0 
  at ImageLoaderThread.ProcessRequest (.RequestItem request) [0x00000] in <filename unknown>:0 
Exeption while reading jpeg headers
System.Exception: Invalid marker found 229
  at JpegHeader+Marker.Load (System.IO.Stream stream) [0x00000] in <filename unknown>:0 
  at JpegHeader.Load (System.IO.Stream stream, Boolean metadata_only) [0x00000] in <filename unknown>:0 
  at JpegHeader..ctor (System.IO.Stream stream, Boolean metadata_only) [0x00000] in <filename unknown>:0 
error checking orientation

Some of the pictures are not jpgs anymore. I get this, when trying to open them with eye of gnome: 
"Error interpreting JPEG image file (Invalid JPEG file structure: SOS before SOF)"

Some of the pictures have been put to other places (meaning the contents of some pictures have overwritten others!).

What sort of horror show is this?

I'm lucky to have this stuff backed up... but holy cow... what HAPPENED?!


I'm running on Archlinux x64, and latest stable of f-spot (currently 0.6.15), 4GB Ram, Intel DualCore, nvidia Graphics
Comment 1 Ruben Vermeersch 2010-05-14 06:26:52 UTC
That's scary indeed! Not something I can explain through the workings of f-spot itself. How full is your filesystem? Did you recently check it? My guess is that it became corrupted at some point.

The freezing is probably a memory leak, we need to track those down, a high priority task.
Comment 2 David Runge 2010-05-14 11:57:00 UTC
(In reply to comment #1)
> That's scary indeed! Not something I can explain through the workings of f-spot
> itself. How full is your filesystem? Did you recently check it? My guess is
> that it became corrupted at some point.
> 
> The freezing is probably a memory leak, we need to track those down, a high
> priority task.

well, the filesystem seems to be okay. I ran a filesystem scan lately (no bad blocks so far).
It's a ntfs filesystem inside a truecrypt volume.
The disk is not full either, nor is my root filesystem (yet) ;)

It seems as if the file headers have been modified.

The memory leaks seem to be related to the background task syncing the metadata to files.
If I run f-spot via terminal it always freezes the system while "writing metadata to file..."

I know that just turning off the computer was not the best choice, but at that moment in time it seemed the only option... :/

I'm really not sure where to put all this
Comment 3 David Runge 2010-05-14 15:17:41 UTC
This is a zip with some messed up pictures, temp files and actually one picture still working in there: http://dl.dropbox.com/u/502921/Misc/f-spot-bug.zip
Comment 4 David Runge 2010-05-14 15:39:23 UTC
(In reply to comment #3)
> This is a zip with some messed up pictures, temp files and actually one picture
> still working in there: http://dl.dropbox.com/u/502921/Misc/f-spot-bug.zip

Some of the broken pictures that come with a tmp file alongside produce this error message while opening: Error interpreting JPEG image file (Not a JPEG file: starts with 0x7d 0xfb)
Comment 5 Ruben Vermeersch 2010-05-17 09:41:53 UTC
This is a pretty serious corruption.

Let's track this down:
* Does this happen with all files?
* Does this also happen if you store your photos on ext3 instead of ntfs?


I'm suspecting that this is either a problem with NTFS (in which case this will be a tough nut to crack), or a problem with our JPEG parsing/writing. The latter case will get fixed once we switch to taglib#.
Comment 6 David Runge 2010-05-17 10:26:26 UTC
The problem right now occurs with some newer (!= newest) files and luckily not all files.
I put some tags on these photos and after tagging some to have them on a upload queue the computer went unresponsive. Couldn't even get to tty1 or something to kill the processes. Complete system freeze.
That's when the fun started because after reboot f-spot began messing with them so weirdly.
So I replaced them with the originals (plain copy/paste over nautilus), but after a restart of f-spot it messed with them again. So I'm not too sure if another copy/paste action will finally get some better results or not... :>
It's just a subset of some of the newer pictures being affected, which makes it so unexplainable to me. There is still plenty of room on the drive...

I will test with some pictures that I'll put on ext3/ext4 and add them to the collection (while keeping their residence on that partition).
Comment 7 Ruben Vermeersch 2010-05-17 10:29:03 UTC
Make sure you send me some of these files in their uncorrupted form, I want them in our regression testing set for Taglib#
Comment 8 David Runge 2010-06-16 15:56:51 UTC
these are the unmodified originals of the messed up pictures above: http://dl.dropbox.com/u/502921/Misc/originals.zip

I will now try to replace all the folders with broken pictures with the originals again and see what happens if f-spot 0.6.2 tries to handle them.

to be continued... :>
Comment 9 Ruben Vermeersch 2010-06-20 17:12:36 UTC
There's indeed something strange with these files, when I run them through the Taglib# unit test framework, I get bad parsing before even writing. We'll need to investigate these. Adding Mike to CC.
Comment 10 Ruben Vermeersch 2010-07-13 18:46:25 UTC
Tested these files with Taglib# and they are working now. Should be safe.

If this still happens with 0.7.1, then I'm not sure if it is related with F-Spot. Please reopen when it does.