GNOME Bugzilla – Bug 498568
prevent f-spot from crashing on gallery2 communication errors
Last modified: 2008-09-03 07:31:11 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)
Does it happen every time? I tried it locally and working fine. I also use it on a remote host without problems.
Yes everytime. I've tried different locations too. Its Gallery 2.1.
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.
(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
Thanks for looking into this. Creating albums on the web works. Thats the workaround we're using now :)
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.
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.
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.
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! ;)
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)
(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.
Unlikely. I am already loaded with development tasks and I am not sure how easy it is to give it a try.
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.
(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.
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)
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.
Created attachment 117903 [details] [review] catch-some-g2-exception-instead-of-crashing.patch updated patch, going to be committed
fixed in r4308