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 566377 - Opening by right-clicking on the thumbnail crashes gthumb
Opening by right-clicking on the thumbnail crashes gthumb
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2009-01-02 23:33 UTC by Christophe Bisière
Modified: 2009-01-05 16:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix a crash when right-clicking on a thumbnail and selecting "Open" (626 bytes, patch)
2009-01-02 23:40 UTC, Christophe Bisière
committed Details | Review

Description Christophe Bisière 2009-01-02 23:33:01 UTC
Launch gthumb trunk (rev 2486), right-click on a thumbnail, select "Open", and Gthumb will crash.

This is due to an uninitialized variable 'file' in image_viewer.c:load_image__step2 (line 1228).

Christophe
Comment 1 Christophe Bisière 2009-01-02 23:40:59 UTC
Created attachment 125671 [details] [review]
Fix a crash when right-clicking on a thumbnail and selecting "Open"

Hello Mike, 

Since I never worked on the image loading code, could you please review this quick fix carefully?

Thanks!

Christophe
Comment 2 Michael Chudobiak 2009-01-05 15:04:50 UTC
Ughh, that bug was introduced here:

http://svn.gnome.org/viewvc/gthumb/trunk/libgthumb/image-viewer.c?r1=1954&r2=2367#l1543

as part of the image-viewer refactoring in bug 501512.

Committed! Thanks!

- Mike
Comment 3 Michael Chudobiak 2009-01-05 15:13:33 UTC
Whoops, why are we making a new FileData when one already exists? The reference to "file" should simply have been changed to "lidata->file".

Simplified version of the patch:

http://svn.gnome.org/viewvc/gthumb/trunk/libgthumb/image-viewer.c?r1=2489&r2=2487&pathrev=2489

- Mike
Comment 4 Christophe Bisière 2009-01-05 16:17:50 UTC
Oops.

Actually I spotted the orphaned declaration:

  FileData *file;

in the refactoring patch you mentioned above. I (incorrectly) took it as a hint that it was necessary to make a copy of the FileData member. I did not went further.

So it was a quick and lazy fix!

Thanks for correcting me.

--Christophe