Bug 304124

Summary: F-Spot - Importing specific jpg files causes "Object reference not set to an instance of an object"
Product: [openSUSE] openSUSE 10.3 Reporter: Eric Ward <eward>
Component: GNOMEAssignee: Larry Ewing <lewing>
Status: RESOLVED FIXED QA Contact: Eric Ward <eward>
Severity: Major    
Priority: P5 - None CC: captain.magnus, christian.jaeger, forgotten_5_CWdqbCuR, mpepping
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: openSUSE 10.3   
Whiteboard: gnome-function-does-not-work
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: test jpg file
f-spot-tagged file

Description Eric Ward 2007-08-24 02:30:51 UTC
Created attachment 159600 [details]
test jpg file

Tested build:
openSUSE 10.3 beta2 GNOME CD install

Problem -
Attempting to import jpg images that were created using Nikon Capture software causes the import process to throw the following error:

Object reference not set to an instance of an object

viewing the console output shows the following:

Error importing /mnt/smb/Entertainment/Pictures/Events/2007/July 22 - 27, 2007/Manually Processed/dsc_7246.jpg
System.NullReferenceException: Object reference not set to an instance of an object
  at FSpot.Xmp.XmpTagsImporter.ProcessStore (FSpot.MetadataStore store, .Photo photo) [0x00000] 
  at FSpot.Xmp.XmpTagsImporter.Import (.Photo photo, System.String path, System.String orig_path) [0x00000] 
  at FileImportBackend.Step (.Photo& photo, Gdk.Pixbuf& thumbnail, System.Int32& count) [0x00000] 

NOTE: After the error message sometimes the photo is successfully imported.

Steps to Reproduce 
- Open F-Spot
- Drag the attached file into the main view to import it

Expected Behavior:
The image should be imported successfully without
Comment 1 Eric Ward 2007-08-24 02:32:08 UTC
Here are some details about the f-spot package that was tested:

> rpm -qa|grep f-spot
f-spot-0.4.0-10
erw@erw-t42p:~/OOo_Custom_Scripts> rpm -q --changelog f-spot |head
* Thu Aug 09 2007 - maw@suse.de
- Fix up the -lang subpackage.

* Tue Aug 07 2007 - mauro@suse.de 
- Split out a -lang subpackage
- Add %fdupes stuff

* Fri Aug 03 2007 - mauro@suse.de
- Updated to 0.4.0
- bugfixes for #397171, #418583, #461708, #440001, #460125.


> rpm -q --info f-spot
Name        : f-spot                       Relocations: (not relocatable)
Version     : 0.4.0                             Vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
Release     : 10                            Build Date: Mon 20 Aug 2007 03:19:15 PM MDT
Install Date: Wed 22 Aug 2007 05:49:59 PM MDT      Build Host: unisys0.suse.de
Group       : Productivity/Graphics/Viewers   Source RPM: f-spot-0.4.0-10.src.rpm
Size        : 5564854                          License: GPL v2 or later
Signature   : DSA/SHA1, Mon 20 Aug 2007 03:25:57 PM MDT, Key ID a84edae89c800aca
Packager    : http://bugs.opensuse.org
URL         : http://www.gnome.org/projects/f-spot/
Summary     : GNOME Photo Management Application
Description :
F-Spot is an application designed to provide personal photo management
to the GNOME desktop. Features include import, export, printing, and
advanced sorting of digital images.
Comment 2 Larry Ewing 2007-08-28 19:36:05 UTC
Fix in svn, will be in b3 3319
Comment 3 Larry Ewing 2007-09-03 11:58:52 UTC
fix submitted
Comment 4 Christian Jäger 2007-09-27 11:25:18 UTC
Unfortunately it is not fixed.

Tested versions: all up to build 0.4.0-32

Console output:

Error importing /home/usr01/Pics/Freunde/Suschi-Fotos/2. Dorfdiscoparty (6.12.02)/IMAG0001.JPG
System.NullReferenceException: Object reference not set to an instance of an object
  at FSpot.Xmp.XmpTagsImporter.ProcessStore (FSpot.MetadataStore store, .Photo photo) [0x00000] 
  at FSpot.Xmp.XmpTagsImporter.Import (.Photo photo, System.String path, System.String orig_path) [0x00000] 
  at FileImportBackend.Step (.Photo& photo, Gdk.Pixbuf& thumbnail, System.Int32& count) [0x00000] 
Comment 5 Christian Jäger 2007-09-27 11:27:06 UTC
This happens only when (re-)importing photos that have been tagged (option 'write meta-data to files') with a previous version of f-spot. See attachment.
Comment 6 Christian Jäger 2007-09-27 13:57:37 UTC
Created attachment 175196 [details]
f-spot-tagged file
Comment 7 Christian Jäger 2007-10-07 14:35:24 UTC
OK, I will try to open a new bug-report for it. Closed.
Comment 8 Christian Jäger 2007-10-07 14:40:00 UTC
Upon second thought, no I won't; it is the same bug because I now see that the photos DO get imported although the error is thrown and all tags are lost.

See also this bug-report: http://bugzilla.gnome.org/show_bug.cgi?id=484188

Changed product-information to 10.3 final.
Comment 9 JP Rosevear 2007-10-29 18:09:29 UTC
Christian, can you provide the command line output of this error again?  The 10.3 final builds would have produced some additional output.  I have Mark's photo so I can see his is in 

"processing <http://fakebase.f-spot.org/internal/> <http://ns.adobe.com/exif/1.0/UserComment> _:bnode-1700364288 ."

But I'd like to see which node causes the error you have.
Comment 10 JP Rosevear 2007-10-29 19:33:58 UTC
I think the continuing part of this bug is:
http://bugzilla.gnome.org/show_bug.cgi?id=463789

Please test the f-spot packages at:
http://download.opensuse.org/repositories/home:/jproseve/openSUSE_10.3/

They contain a fix from the upstream bug.
Comment 11 Eric Ward 2007-11-02 20:13:43 UTC
I was able to successfully import the following test files without any issues:

(Attachment in summary of this bug)
https://bugzilla.novell.com/attachment.cgi?id=159600

(Attachment in comment #6 of this bug)
https://bugzilla.novell.com/attachment.cgi?id=175196

I tested with the build provided in comment #10. I was not able to regress the upstream issue since the test file URL is no longer valid. But from my POV it appears to have been resolved with the test files I did import.
Comment 12 Christian Jäger 2007-11-09 16:01:30 UTC
Sorry, I forgot:

Before I test the new build, here is the error-output of the stock build (openSUSE 10.3):

Error importing /home/usr01/Desktop/bug-304124_IMAG0001.JPG
System.NullReferenceException: Object reference not set to an instance of an object
  at FSpot.Xmp.XmpTagsImporter.ProcessStore (FSpot.MetadataStore store, .Photo photo) [0x00000] 
  at FSpot.Xmp.XmpTagsImporter.Import (.Photo photo, System.String path, System.String orig_path) [0x00000] 
  at FileImportBackend.Step (.Photo& photo, Gdk.Pixbuf& thumbnail, System.Int32& count) [0x00000] 
Could not import file
Stopping
Comment 13 Christian Jäger 2007-11-09 16:14:06 UTC
Tested the new build - and what can I say? "It works, it works, hurray!" :)
Comment 14 JP Rosevear 2007-12-12 19:38:09 UTC
*** Bug 328281 has been marked as a duplicate of this bug. ***
Comment 15 JP Rosevear 2007-12-12 19:45:51 UTC
Fix submitted to Factory.
Comment 16 Magnus Boman 2008-03-22 04:19:07 UTC
Closing as per Comment#11, Comment#13 and Comment#15
Comment 17 JP Rosevear 2008-03-25 18:47:10 UTC
Released for 10.3 a few weeks ago.