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 534902 - SmugMug Export: Object reference not set to an instance of an object
SmugMug Export: Object reference not set to an instance of an object
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
0.4.x
Other All
: Normal normal
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-26 12:59 UTC by rankin.james
Modified: 2008-06-16 07:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
smugmug popup error (7.08 KB, image/png)
2008-05-26 13:00 UTC, rankin.james
  Details
smugmug-fix-noimageid.patch (2.89 KB, patch)
2008-06-05 07:26 UTC, Maxxer
none Details | Review
Different fix, using json response instead of reset (1.72 KB, patch)
2008-06-05 10:14 UTC, Thomas Van Machelen
none Details | Review
smugmug-fix-noimageid.patch (3.82 KB, patch)
2008-06-05 15:23 UTC, Maxxer
committed Details | Review

Description rankin.james 2008-05-26 12:59:33 UTC
Please describe the problem:
Using SmugMug Exporter 1.1 AND 1.2, I'm unable to export multiple photos due to an error popup box.

When selecting one or more photos in F-Spot, I begin exporting to my SmugMug account. The first photo begins transferring; once the transfer appears to be complete, I get a popup box that says: "Error Uploading to Gallery: Object reference not set to an instance of an object". (see attached)

If I choose "Skip", then the next file transfers with the same error. Going to smugmug on a browser reveals that these photos ARE being sent properly... but this error box makes batch uploads slow, since I have to click "Skip" after the error after each photo.

Console output is pasted below.

Thanks!




james@biggins:~$ f-spot
Starting new FSpot server
Reloading
item changed

(f-spot:24634): 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.
SmugMug.Connect() rankin.james@gmail.com
Starting Upload to Smugmug, album Indy500 2008 - 5022055
uploading 0
System.NullReferenceException: Object reference not set to an instance of an object
  at SmugMugNet.SmugMugException..ctor (System.String message, System.Exception innerException) [0x00000] 
  at SmugMugNet.SmugMugApi.Upload (System.String path, Int32 album_id) [0x00000] 
  at FSpotSmugMugExport.SmugMugExport.Upload () [0x00000] 
james@biggins:~$ 



Steps to reproduce:
1. export to smugmug and observe error popup
2. 
3. 


Actual results:


Expected results:


Does this happen every time?
YES

Other information:
Comment 1 rankin.james 2008-05-26 13:00:13 UTC
Created attachment 111555 [details]
smugmug popup error
Comment 2 Maxxer 2008-05-29 07:01:15 UTC
are you using f-spot packaged or compiled? 0.4.4 is out, could you try with that?
Comment 3 rankin.james 2008-05-31 03:23:30 UTC
I was using the packaged version of f-spot with Ubuntu 8.04 Hardy (0.4.3.1). I just now downloaded and compiled version 0.4.4, but it crashes when I select Export > SmugMug. Console output here:




[Info  22:19:29.829] Initializing DBus
[Info  22:19:29.918] Initializing Mono.Addins
[Info  22:19:30.081] Starting new FSpot server

(f-spot:4334): 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.
Can not connect to SmugMug. Bad username ? password ? network connection ?
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.NullReferenceException: Object reference not set to an instance of an object
  at FSpotSmugMugExport.SmugMugExport.Connect (FSpotSmugMugExport.SmugMugAccount selected, System.String text) [0x00000] 
  at FSpotSmugMugExport.SmugMugExport.Connect (FSpotSmugMugExport.SmugMugAccount selected) [0x00000] 
  at FSpotSmugMugExport.SmugMugExport.Connect () [0x00000] 
  at FSpotSmugMugExport.SmugMugExport.Run (IBrowsableCollection selection) [0x00000] 
  at FSpot.Extensions.ExportMenuItemNode.OnActivated (System.Object o, System.EventArgs e) [0x00000] 
  at GLib.Signal.voidObjectCallback (IntPtr handle, IntPtr data) [0x00000] 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at GLib.Signal.voidObjectCallback(IntPtr handle, IntPtr data)
   at GLib.Signal.voidObjectCallback(IntPtr , IntPtr )
   at Gtk.Application.gtk_main()
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at Gnome.Program.Run()
   at FSpot.Driver.Main(System.String[] args)
Comment 4 Maxxer 2008-05-31 08:50:59 UTC
please go to extension manager, install, refresh remote repos. you should get an available update to smugmug 0.4.4.2. 
After install, in case you still see smugmug 0.4.4.1 in the extension manager please disable it.
then retry.
Comment 5 rankin.james 2008-05-31 21:35:56 UTC
I updated to smugmug extension 0.4.4.2, then disabled 0.4.4.1. After doing that, I selected Export > SmugMug, but f-spot crashed as before.

I then restarted f-spot, but the SmugMug option is not no longer present. I am able to disable 0.4.4.2, then re-enable 0.4.4.1; doing this, the option to export to SmugMug is again present, but results in a program crash if I select it. 

Disabling 0.4.4.1 and re-enabling 0.4.4.2 now causes the SmugMug export option to no longer be listed as an option in the Export menu.
Comment 6 rankin.james 2008-05-31 21:38:47 UTC
Correction - important grammar error in my last message; sorry! Please use this instead:
**************************************************************************

I updated to smugmug extension 0.4.4.2, then disabled 0.4.4.1. After doing
that, I selected Export > SmugMug, but f-spot crashed as before.

I then restarted f-spot, but the SmugMug option is no longer present. I am
able to disable 0.4.4.2, then re-enable 0.4.4.1; doing this, the option to
export to SmugMug is again present, but results in a program crash if I select
it. 

Disabling 0.4.4.1 and re-enabling 0.4.4.2 now causes the SmugMug export option
to no longer be listed as an option in the Export menu.
Comment 7 Maxxer 2008-06-05 06:51:03 UTC
there's a problem with the infos returned by smugmug to f-spot. it doesn't return the photo-id anymore, causing f-spot to get angry. 
we're investigating, and will upload a patch soon.
Comment 8 Maxxer 2008-06-05 07:26:38 UTC
Created attachment 112191 [details] [review]
smugmug-fix-noimageid.patch

this patch ignores the missing image_id response from server, and fixes some other minor issues.

thomas is going to contact smugmug to ask if the not returned id is ok.
Comment 9 Thomas Van Machelen 2008-06-05 07:26:59 UTC
Apparently, we're not the only ones having problems:

http://www.dgrin.com/showthread.php?t=94961
Comment 10 Thomas Van Machelen 2008-06-05 10:14:36 UTC
Created attachment 112201 [details] [review]
Different fix, using json response instead of reset

Apparently the JSON repsonse still returns the id.  This patch changes the upload implementation to use the JSON response and to get the id out using a regex.

Only changes the SmugMugApi.cs file
Comment 11 Maxxer 2008-06-05 10:26:15 UTC
(In reply to comment #10)
> Only changes the SmugMugApi.cs file

nice! 
i still believe a check over the returned value is needed... in case another situation like this happens!
Comment 12 Maxxer 2008-06-05 15:23:16 UTC
Created attachment 112219 [details] [review]
smugmug-fix-noimageid.patch

updated patch, a merge of the two. includes some minor fixes and the JSON interface from Thomas.
Comment 13 Stephane Delcroix 2008-06-05 15:58:26 UTC
fixed in r4047
Comment 14 Maxxer 2008-06-16 07:25:13 UTC
*** Bug 538460 has been marked as a duplicate of this bug. ***