GNOME Bugzilla – Bug 320245
EOG crashes when loading a picture.
Last modified: 2005-11-13 18:27:02 UTC
1. Launch eog 2. Select a picture to view. 3. eog crashes Output: $ eog setting window size: 960/805 setting window size: 960/805 setting window size: 960/805 Instantiate job with id 1. Starting thread with id 0. eog-image_load.c load success: 1 n_images: 1/1 1 /home/develop/Desktop/IMG_1131.JPG.jpg (2048/1536) Instantiate job with id 2. Show exif data The application 'eog' lost its connection to the display :0.0; most likely the X server was shut down or you killed/destroyed the application. Starting thread with id 1.
I can reproduce the same bug with some images in eog HEAD. For instance, with: http://www.gnome.org/~csaavedr/images/eog-crasher.jpg The respective backtrace is:
+ Trace 63863
Commenting the calls to gtk_window_set_icon () (eog-window.c: 939, 2914) evitates eog to crash. I think that the crash must be related to big images being used as icons in the main window.
Created attachment 54254 [details] reproducing the bug only in GTK+ I think this is a GTK+ bug. The attached program produces a crash when the loaded image is too big. The backtrace is the same, so I guess this bug can be moved to gtk+.
Created attachment 54311 [details] [review] Proposed patch (or workaround?). This will prevent EOG to crash. If the image is too big, scale the image to a safe size and use the new pixbuf for the icon. Probably it is just a workaround, as I think that GTK+ shouldn't crash if an image given to gtk_window_set_icon_* is too big, but works.
Commited with little style modifications. 2005-11-07 Claudio Saavedra <csaavedra@alumnos.utalca.cl> * shell/eog-window.c: (job_save_image_finished), (set_window_icon), (display_image_data): Resize image before using it as window icon if it is too big (Workaround that fixes bug #320245. See related gtk+ bug #320909).
Reopening bug because even with the applied patch, gtk_window_set_icon is generating a warning: (eog:12702): Gdk-WARNING **: gdk_window_set_icon_list: icons too large A possible solution would be using image thumbnail as the window icon.
Lucas, can you specify the size of the image that gave you that warning? I tried to reproduce it with the eog-crasher.jpg (960x1280) and it is clean.
Did you update gtk+? I'm viewing eog-crasher.jpg too. The solution for bug #320909 was to ignore large pixbufs as window icons and show this warning message. EOG doesn't crash but the window icon is not set. Maybe a better approach could be using the image thumbnail as window icon instead of the image itself.
Well, I cant reproduce it. I think that probably it is related to the fact of the solution to bug #320909 implies getting GDK_SELECTION_MAX_SIZE(display) on the fly. Does the image thumbnail exists always? Surely in collection view we can get every thumbnail, but I am not sure about it in single mode. I will check the code about it. I'll try to see how nautilus work on that, but as nautilus does have the thumbnails always, probably it uses them for the icon.
Created attachment 54611 [details] [review] partial patch I've extended EogImage API and added a eog_image_get_thumbnail() method to retrieve the thumbnail and use it as icon. But, it currently works only in collection mode, because in single mode the image doesn't have an icon. To complete the patch, we should create the thumbnail even when eog is in single image mode.
Created attachment 54648 [details] [review] updated patch Forget the previous patch. I neglected the existence of a method to do exactly the same.
Applied in HEAD. Works with the new UI. Thanks!