Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 289346

Summary: gdk_pixbuf_new_from_file() fails on Gtk+ 2.14 and 2.16
Product: Gentoo Linux Reporter: Joël <world.root>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED DUPLICATE    
Severity: normal CC: truedfx
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Here's frame_top.png (for those who don't have gkrellm installed)

Description Joël 2009-10-16 17:01:25 UTC
I noticed a lack of pixmaps in gkrellm. After some investigation, I came up with the following testcase:

#include <gtk/gtk.h>
int main()
{
    gdk_init(NULL, NULL);
    gchar *fname = "/usr/share/gkrellm2/themes/BlueMask/frame_top.png";
    GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(fname, NULL);
    printf(pixbuf ? "OK !\n" : "FAILED !\n");
    return 0;
}

The testcase succeeds on gtk+ 2.12.12, but fails on gtk+ 2.14.7-r2 or gtk+-2.16.6 (even with CFLAGS/CXXFLAGS="-O2").

I tried adding debugging code to gtk+ but compilation fails as soon as I add a single printf() to "gdk-pixbuf-io.c".
Comment 1 Joël 2009-10-16 17:03:56 UTC
Created attachment 207330 [details]
 Here's frame_top.png (for those who don't have gkrellm installed)
Comment 2 Joël 2009-10-16 17:14:41 UTC
To run the testcase:
gcc -Wall -o test test.c `pkg-config --cflags --libs gtk+-2.0` && ./test

My test system is not a fresh install of Gentoo: it's a mix of x86 and ~x86 packages, and has been continually upgraded since about 2004. So perhaps there might be something lying around, that confuses gtk+ ?

So far I only tried rebuilding glib and gtk+.
Comment 3 Harald van Dijk (RETIRED) gentoo-dev 2009-10-16 17:20:44 UTC
Just to rule out one possibility: does this happen for all users on your system, or only the one you log in as? I'm asking because I've had the same problem, and it took a couple of hours to figure out I had corrupted files in my home directory.
Comment 4 Joël 2009-10-16 17:29:19 UTC
Hi Harald,

Good idea, I didn't think of it. But no, unfortunately it's the same problem for a newly-created user.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2009-10-16 17:47:55 UTC
Pretty sure this is a dupe of bug #288312
Comment 6 Joël 2009-10-16 17:52:02 UTC
Sorry, my Comment #4 was wrong: With a newly created user, gkrellm works perfectly ! And the testcase succeeds too.

What should I try removing from my user dir ?
Comment 7 Joël 2009-10-16 18:17:58 UTC
Yes Samuli, you're right: removing ~/.local/share/mime solves the problem completely.

No offense intended here, but it looks like the upstream gtk+ team did a _very_ bad design choice here. Did they assume that every user of gtk+ 2.4 will re-create their home directory from scratch ??
Comment 8 Harald van Dijk (RETIRED) gentoo-dev 2009-10-16 18:32:21 UTC
(In reply to comment #5 and comment #7)

Closing as such. I wish the bug was there when I ran into this... didn't link it to the upgrade. :) Good that there's a warning for it now.

(Personal opinion: mostly agreed, it wasn't necessarily a bad decision to change the format, but it was carried out horribly.)

*** This bug has been marked as a duplicate of bug 288312 ***
Comment 9 Joël 2009-10-16 20:31:06 UTC
Agreed, Harald.  And many thanks to you all :-)