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 498568 - prevent f-spot from crashing on gallery2 communication errors
prevent f-spot from crashing on gallery2 communication errors
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
0.4.x
Other Linux
: Normal normal
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-20 18:30 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2008-09-03 07:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
catch-some-g2-exception-instead-of-crashing.patch (5.14 KB, patch)
2007-11-22 19:50 UTC, Maxxer
none Details | Review
catch-some-g2-exception-instead-of-crashing.patch (5.06 KB, patch)
2007-12-17 22:13 UTC, Maxxer
none Details | Review
catch-some-g2-exception-instead-of-crashing.patch (6.41 KB, patch)
2008-09-03 07:29 UTC, Maxxer
committed Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2007-11-20 18:30:06 UTC
I select picture, the choose "File/Export/Export to Web Gallery", Click on "Add" (to add a folder), enter the details and press okay. The f-spot dies. This worked fine in the pat (older f-spot versions).

Gallery created: GalleryRemote.Gallery2
Gallery2: Attempting to login
StatusText : Login successful.
StatusText : Fetch-albums successful.
Error: Unable to parse server response
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
GalleryRemote.GalleryCommandException: Error: Unable to parse server response
  at GalleryRemote.Gallery.ParseBasic (System.Net.HttpWebResponse response) [0x00000] 
  at GalleryRemote.Gallery.ParseNewAlbum (System.Net.HttpWebResponse response) [0x00000] 
  at GalleryRemote.Gallery2.NewAlbum (System.String parent_name, System.String name, System.String title, System.String description) [0x00000] 
  at FSpot.GalleryAddAlbum.HandleAddResponse (System.Object sender, Gtk.ResponseArgs args) [0x00000] 
  at Gtk.Dialog.ResponseSignalCallback (IntPtr arg0, Int32 arg1, IntPtr gch) [0x00000] 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at Gtk.Dialog.ResponseSignalCallback(IntPtr arg0, Int32 arg1, IntPtr gch)
   at Gtk.Dialog.ResponseSignalCallback(IntPtr , Int32 , 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 1 Maxxer 2007-11-20 20:22:42 UTC
Does it happen every time? 

I tried it locally and working fine. I also use it on a remote host without problems.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2007-11-20 21:11:22 UTC
Yes everytime.
I've tried different locations too.

Its Gallery 2.1.
Comment 3 Maxxer 2007-11-20 21:47:20 UTC
I've just downloaded G2.1. The standard remote plugin shipped with that version is 1.0.6. F-Spot requires 1.0.8. Please check your installation.
Comment 4 Maxxer 2007-11-20 23:12:38 UTC
(In reply to comment #3)
> I've just downloaded G2.1. The standard remote plugin shipped with that version
> is 1.0.6. F-Spot requires 1.0.8. Please check your installation.

I don't even think the problem is this one. Having a deeper look into the code, it seems that there's a negative response from the server which is sadly not printed to console (working on this). 

Do you have any problem in creating the album from the web interface?
Thanks

Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2007-11-21 07:22:20 UTC
Thanks for looking into this. Creating albums on the web works. Thats the workaround we're using now :)
Comment 6 Maxxer 2007-11-21 07:57:11 UTC
Would you please tell us the details of your installation, so that we can try to replicate the problem?

Btw I'm working on catching those errors and print something useful.
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2007-11-21 08:16:24 UTC
in gallery admin view under modules I see:
remote 1.0.6 1.0.6 Implementation for the remote control protocol

so ths is too old. I'll see if I can update it.
Comment 8 Maxxer 2007-11-21 08:59:56 UTC
Reverting the bug from "crash when creating a new folder on php gallery" to "prevent f-spot from crashing on gallery2 communication errors"

I'll attach a patch soon.
Comment 9 Maxxer 2007-11-22 19:50:54 UTC
Created attachment 99496 [details] [review]
catch-some-g2-exception-instead-of-crashing.patch

this patch should improve error reporting by Gallery export. far from being perfect but better than now! ;)
Comment 10 Stefan Sauer (gstreamer, gtkdoc dev) 2007-12-02 16:02:08 UTC
I've upgraded my whole php-gallery and remote plugin is now 1.0.9. But still I get:


Error: Unable to parse server response
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
GalleryRemote.GalleryCommandException: Error: Unable to parse server response
  at GalleryRemote.Gallery.ParseBasic (System.Net.HttpWebResponse response) [0x00000] 
  at GalleryRemote.Gallery.ParseNewAlbum (System.Net.HttpWebResponse response) [0x00000] 
  at GalleryRemote.Gallery2.NewAlbum (System.String parent_name, System.String name, System.String title, System.String description) [0x00000] 
  at FSpot.GalleryAddAlbum.HandleAddResponse (System.Object sender, Gtk.ResponseArgs args) [0x00000] 
  at Gtk.Dialog.ResponseSignalCallback (IntPtr arg0, Int32 arg1, IntPtr gch) [0x00000] 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at Gtk.Dialog.ResponseSignalCallback(IntPtr arg0, Int32 arg1, IntPtr gch)
   at Gtk.Dialog.ResponseSignalCallback(IntPtr , Int32 , 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 11 Maxxer 2007-12-02 17:01:15 UTC
(In reply to comment #10)
> I've upgraded my whole php-gallery and remote plugin is now 1.0.9. But still I
> get:
> 
> 
> Error: Unable to parse server response

if you have a chance to give a try at the above patch, maybe we can see if it provides better error handling/reporting.
Comment 12 Stefan Sauer (gstreamer, gtkdoc dev) 2007-12-03 19:49:18 UTC
Unlikely. I am already loaded with development tasks and I am not sure how easy it is to give it a try.
Comment 13 Maxxer 2007-12-17 22:13:20 UTC
Created attachment 101147 [details] [review]
catch-some-g2-exception-instead-of-crashing.patch

updated to apply to latest SVN.

Stefan could successfully identify what made f-spot crash: creating a toplevel album is not allowed by a non-admin user. 

this patch provides an enhancement, as catches the error and f-spot doesn't crash. maybe error reporting could be improved, as right now just says "unable to parse server response".
now that i can reproduce the bug i'll try to provide better feedback to the user.
Comment 14 Maxxer 2007-12-18 00:04:07 UTC
(In reply to comment #13)

> now that i can reproduce the bug i'll try to provide better feedback to the
> user.

it seems this is the best the actual ParseBasic can return.
Comment 15 emway 2008-05-03 22:44:07 UTC
Same problem over here with Ubuntu 8.04 and the latest F-Spot.
Tried it with Mandriva 2008.1 and there where no problems. 

Gallery created: GalleryRemote.Gallery2
Gallery2: Attempting to login
StatusText : Login successful.
StatusText : No viewable albums.
Error: Unable to parse server response
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
GalleryRemote.GalleryCommandException: Error: Unable to parse server response
  at GalleryRemote.Gallery.ParseBasic (System.Net.HttpWebResponse response) [0x00000] 
  at GalleryRemote.Gallery.ParseNewAlbum (System.Net.HttpWebResponse response) [0x00000] 
  at GalleryRemote.Gallery2.NewAlbum (System.String parent_name, System.String name, System.String title, System.String description) [0x00000] 
  at G2Export.GalleryAddAlbum.HandleAddResponse (System.Object sender, Gtk.ResponseArgs args) [0x00000] 
  at Gtk.Dialog.ResponseSignalCallback (IntPtr arg0, Int32 arg1, IntPtr gch) [0x00000] 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at Gtk.Dialog.ResponseSignalCallback(IntPtr arg0, Int32 arg1, IntPtr gch)
   at Gtk.Dialog.ResponseSignalCallback(IntPtr , Int32 , 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 16 Ulf Rompe 2008-09-02 20:43:35 UTC
Maybe the probability of getting this crash would be lower if the default parent folder you get when creating a new folder would be the same that was chosen in the main dialog.

At the moment (r4304), F-Spot behaves like this:

1. When exporting, a User uses the folder selector to select
   "Top Level Gallery"->"UserName"->"Subfolder".

2. He decides to add another subfolder called "Subsubfolder".
   So he clicks "Add".

3. In the new dialog, the default parent folder isn't "Subfolder".
   It is "Top Level Gallery", which might not match the user's expectations.
   At least it didn't match mine, that's why I just saw the crash a few times.

Regarding the patch attacked to this bug, I would suggest a commit. While the feedback might not be optimal, everything is better than just crashing.
Comment 17 Maxxer 2008-09-03 07:29:46 UTC
Created attachment 117903 [details] [review]
catch-some-g2-exception-instead-of-crashing.patch

updated patch, going to be committed
Comment 18 Maxxer 2008-09-03 07:31:11 UTC
fixed in r4308