GNOME Bugzilla – Bug 399988
Exits without any appropriate error message or exit code if image is not accessible
Last modified: 2007-02-26 22:57:24 UTC
This bug was filed in the Debian BTS. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=391582 "If you start eog with an image file name on the command line and the image is unaccessible for eog e.g. because belonging to another user and having rights set to 600 (as it's the case with screenshots made during the graphical install and you want wo view them afterwards with your freshly created normal user), it exits with exit code zero and without any error message. The same happens if you select such a file from the open dialog and try to open it: eog exits and gives not any hint why it did that nor what caused the exit. Besides that: If you try to open an unreadable file via the open dialog, the program should not exit completely but instead return to the open dialog and showing an appropriate error message."
Confirming. Behavior in trunk is like in bug #326825 and bug #394755, though I can't say yet the problem is the same. I will investigate further.
The reason is that when an image is not correctly loaded, for some reason, somebody thought it would be a good idea to simply call gtk_main_quit (). See the following code fragment: static void job_prepare_model_finished (EogJob *job, gpointer data, GError *error) { LoadContext *ctx = (LoadContext*) data; if (eog_job_get_status (job) == EOG_JOB_STATUS_FINISHED && eog_job_get_success (job)) { g_object_ref (ctx->img_list); assign_model_to_window (ctx->window, ctx->img_list); } else { g_error_free (error); gtk_main_quit (); } } I'll cook a fix for this. I'm really surprised by this.
*** Bug 326825 has been marked as a duplicate of this bug. ***
*** Bug 394755 has been marked as a duplicate of this bug. ***
Created attachment 81038 [details] [review] fix for the trunk With this patch, EOG will show an error message telling the reason why the image couldn't be loaded, and the program will close only if there are no EOG windows already open. I'll commit it to the trunk, but will leave it here in case is useful for Debian or other distros.
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report. 2007-01-24 Claudio Saavedra <csaavedra@alumnos.utalca.cl> * shell/main.c: (job_prepare_model_finished): Show an error message instead of closing the program if the image loading has failed. Fixes bug #399988. (still need to figure out a fix for the eog-ng branch, will leave this bug open in the meantime)
Claudio, I'm already working on those issues in eog-ng. See "Implement new error/warning UI stuff" in the task list. There are other related bugs listed there. Leave bug open != RESOLVED/FIXED, right!?
*** Bug 374155 has been marked as a duplicate of this bug. ***
(In reply to comment #7) > Claudio, I'm already working on those issues in eog-ng. See "Implement new > error/warning UI stuff" in the task list. There are other related bugs listed > there. Great. Then I pass the ball to you. > > Leave bug open != RESOLVED/FIXED, right!? > Heh, I din't close it! The stock message did it for me ;-) ps: please Lucas, assign to you all the bugs you are already working on (at least in the wiki), to avoid duplicating work. Thanks.
> ps: please Lucas, assign to you all the bugs you are already working on (at > least in the wiki), to avoid duplicating work. Thanks. I had assigned my self to this topic in the wiki page. It's just that for some reason I haven't added this specifig bug report to the taslk list. :-)
Fixed in eog-ng branch. Closing as it's already fixed in trunk. 2007-02-26 Lucas Rocha <lucasr@gnome.org> Messages for the most of common error: open a set of locations with no images, open a directory with no images, open a non-image file and open a corrupted/invalid image. Fixes bugs #326199, #399988, and #316175. * src/eog-list-store.c (eog_list_store_add_uris, eog_list_store_class_init, eog_list_store_init): add initial image even if it doesn't pass the mimetype tests. GObject love and code cleanups. * src/eog-application.c: comment unused function to fix build warning. * src/eog-window.c (eog_job_load_cb, eog_window_open_uri_list, eog_window_dispose, eog_job_model_cb): set window title with image caption even in image loading error cases. Set error message area when no images are found in given locations. * src/eog-error-message-area.[ch] (eog_no_images_error_message_area_new): new message area for errors when no images are found in given locations.