Closed Bug 1205741 Opened 9 years ago Closed 9 years ago

Gtk-WARNING **: Error loading theme icon 'folder' for stock: Unrecognized image file format

Categories

(Core :: Widget: Gtk, defect)

43 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: alta88, Assigned: lsalzman)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1203463 +++

With linux and yesterday's nightly, when opening the history sidebar, for example, and viewing by date and site, the folder icon shows a broken page instead.  (The above error was noticed in stdout in a debug build of Tb with the same broken page icons instead of OS folder icons.)

Good: 9ed17db42e3e46f1c712e4dffd62d54e915e0fac
Bad:  3e8dde8f8c174cce2c0b65c951808f88e35d1875
Thanks.  Looking at that checkin log, we have the following change to Linux widget code:

  Bug 1203078 - whitelist gdk-pixbuf image formats. r=dan

See http://hg.mozilla.org/mozilla-central/rev/83969f2fc719

I expect your image format is not one of the whitelisted ones, given the error message.  Should it be in the whitelist?
Component: Bookmarks & History → Widget: Gtk
No longer depends on: 1203463
Flags: needinfo?(lsalzman)
Product: Firefox → Core
Keywords: regression
Version: Trunk → 43 Branch
Can you check what format the folder icon is in, or at least which GTK3 theme you may be running to potentially locate the folder icon within it? We suspect it is XPM, but it would be nice if we could get verification. Otherwise we can supply you with a potential patched build to test out.
Flags: needinfo?(lsalzman) → needinfo?(alta88)
Just a little comment here. I'm facing broken icons for folders with homemade builds of trunk version of both Mozilla Firefox and Mozilla Thunderbird on my archlinux with xfce and gnome-icon-theme. Searching for broken icons give me this bug. 

I looked at gnome-theme package, and all icons are in png format. I've done a search in gnome-icon-theme package searching for folder. Only png are listed.

You can find file list here : https://www.archlinux.org/packages/extra/any/gnome-icon-theme/

Hope it helps. Sorry if not !
This adds XPM to the list of supported gdk-pixbuf formats, as regardless of whether or not it is the source of this particular issue, it looks like it is one of the primary legacy formats used for icons in GNOME, and is used in our gtk widget backend in places.

... Could someone who is affected by this bug try this patch and see if it clears up the issue for them?
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Flags: needinfo?(fredbezies)
Attachment #8662509 - Flags: review?(acomminos)
Try for patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8ac272e11b03

Note that if someone wants to help test, this has builds you can use instead of going through the process of patching yourself.

Here's a link to the linux64/opt build: http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/lsalzman@mozilla.com-8ac272e11b03/try-linux64/

It would be nice if the bug reporter could see if this try build resolves the issue.
(In reply to Lee Salzman [:eihrul] from comment #5)
> Try for patch:
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=8ac272e11b03
> 
> Note that if someone wants to help test, this has builds you can use instead
> of going through the process of patching yourself.
> 
> Here's a link to the linux64/opt build:
> http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/lsalzman@mozilla.
> com-8ac272e11b03/try-linux64/
> 
> It would be nice if the bug reporter could see if this try build resolves
> the issue.

Sorry to say that, but icons are still broken with your build. I removed this bug by reverting patch for bug in comment #1.

Sorry again. Looks like it is not related - at least on my computer with archlinux - to xpm support but to png one. Just an educated guess.

By the way, my libpng version s 1.6.18.
Flags: needinfo?(fredbezies)
(In reply to Frederic Bezies from comment #6)
> (In reply to Lee Salzman [:eihrul] from comment #5)
> > Try for patch:
> > https://treeherder.mozilla.org/#/jobs?repo=try&revision=8ac272e11b03
> > 
> > Note that if someone wants to help test, this has builds you can use instead
> > of going through the process of patching yourself.
> > 
> > Here's a link to the linux64/opt build:
> > http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/lsalzman@mozilla.
> > com-8ac272e11b03/try-linux64/
> > 
> > It would be nice if the bug reporter could see if this try build resolves
> > the issue.
> 
> Sorry to say that, but icons are still broken with your build. I removed
> this bug by reverting patch for bug in comment #1.
> 
> Sorry again. Looks like it is not related - at least on my computer with
> archlinux - to xpm support but to png one. Just an educated guess.
> 
> By the way, my libpng version s 1.6.18.

Can you try making a quick hack to your source for me? Right before or after this line where it calls gdk_pixbuf_format_set_disabled() in widget/gtk/nsAppShell.cpp, can you please insert the following printf():

printf("disabling format %s provided by %s\n", name, gdk_pixbuf_format_get_description(format));

Run, and get the list of disabled format names/descriptions, and let me know what they are, please. If so, that would help immensely.
Flags: needinfo?(fredbezies)
Actually, wait, better plan, there is a "gdk-pixbuf-query-loaders" command. Can you just run that and attach the output here? That would give me the info I need better than the above hack.
The try build didn't fix the problem.  I notice .svg isn't in the list, should it be?
Flags: needinfo?(alta88)
Too late :)

Here is the result of added printf :

disabling format GdkPixdata provided by GdkPixdata
disabling format wbmp provided by WBMP
disabling format qtif provided by QuickTime
disabling format tga provided by Targa
disabling format pcx provided by PCX
disabling format ani provided by Windows animated cursor
disabling format xpm provided by XPM
disabling format tiff provided by TIFF
disabling format svg provided by Scalable Vector Graphics
disabling format pnm provided by PNM/PBM/PGM/PPM
disabling format xbm provided by XBM
disabling format ras provided by Sun raster
disabling format icns provided by MacOS X icon
disabling format jpeg2000 provided by JPEG 2000

(In reply to alta88 from comment #10)

Good guess :D
> The try build didn't fix the problem.  I notice .svg isn't in the list,
> should it be?
Flags: needinfo?(fredbezies)
(In reply to Frederic Bezies from comment #11)
> Too late :)
> 
> Here is the result of added printf :
> 
> disabling format GdkPixdata provided by GdkPixdata
> disabling format wbmp provided by WBMP
> disabling format qtif provided by QuickTime
> disabling format tga provided by Targa
> disabling format pcx provided by PCX
> disabling format ani provided by Windows animated cursor
> disabling format xpm provided by XPM
> disabling format tiff provided by TIFF
> disabling format svg provided by Scalable Vector Graphics
> disabling format pnm provided by PNM/PBM/PGM/PPM
> disabling format xbm provided by XBM
> disabling format ras provided by Sun raster
> disabling format icns provided by MacOS X icon
> disabling format jpeg2000 provided by JPEG 2000
> 
> (In reply to alta88 from comment #10)
> 
> Good guess :D
> > The try build didn't fix the problem.  I notice .svg isn't in the list,
> > should it be?

If you throw in "svg" to the whitelist in place of "xpm" in my patch, does that help at all?
Flags: needinfo?(fredbezies)
(In reply to Lee Salzman [:eihrul] from comment #12)
> (In reply to Frederic Bezies from comment #11)
[...]
> > 
> > Good guess :D
> > > The try build didn't fix the problem.  I notice .svg isn't in the list,
> > > should it be?
> 
> If you throw in "svg" to the whitelist in place of "xpm" in my patch, does
> that help at all?

I will try and report asap !
Flags: needinfo?(fredbezies)
(In reply to Lee Salzman [:eihrul] from comment #12)
[...]
> 
> If you throw in "svg" to the whitelist in place of "xpm" in my patch, does
> that help at all?

Well, yes. At least for me. It fixes broken icons. Maybe a try build is needed with this tweak to confirm it ?
Comment on attachment 8662509 [details] [diff] [review]
add xpm to supported gdk-pixbuf formats

I can reproduce with paper-icon-theme, which uses SVG assets for many of its icons.

Looks like librsvg registers a gdk-pixbuf loader ('svg') that we're blacklisting here.
Attachment #8662509 - Flags: review?(acomminos)
Another try, this time with both XPM and SVG support.

Try results here: https://treeherder.mozilla.org/#/jobs?repo=try&revision=07e82797f730

Linux64/opt build link here: http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/lsalzman@mozilla.com-07e82797f730/try-linux64/

Can people test this build to verify if it fixes the issue, presuming the problem was SVG support?
Attachment #8662509 - Attachment is obsolete: true
Attachment #8662578 - Flags: review?(dveditz)
Attachment #8662578 - Flags: review?(acomminos)
(In reply to Lee Salzman [:eihrul] from comment #16)
> Created attachment 8662578 [details] [diff] [review]
> add xpm and svg to supported gdk-pixbuf formats
> 
> Another try, this time with both XPM and SVG support.
> 
> Try results here:
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=07e82797f730
> 
> Linux64/opt build link here:
> http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/lsalzman@mozilla.
> com-07e82797f730/try-linux64/
> 
> Can people test this build to verify if it fixes the issue, presuming the
> problem was SVG support?

Your build is OK for me. No more missing icons. Looks like svg support was guilty here.
Attachment #8662578 - Flags: review?(acomminos) → review+
Good lord, XPM? In 2015?!

It sounds like SVG was the actual issue here, not XPM. Can we not add support for this ridiculous ancient format unless it's strictly required?

(I killed off Firefox's last explicit usage of XPM nearly a decade ago in bug 412049, and it was already overdue then. My head will asplode if this is actually needed! :)
(In reply to Justin Dolske [:Dolske] from comment #18)
> Good lord, XPM? In 2015?!
> 
> It sounds like SVG was the actual issue here, not XPM. Can we not add
> support for this ridiculous ancient format unless it's strictly required?
> 
> (I killed off Firefox's last explicit usage of XPM nearly a decade ago in
> bug 412049, and it was already overdue then. My head will asplode if this is
> actually needed! :)

This is not about whether Firefox uses it internally but about whether GTK themes possibly use it.
Does the new build with SVG support fix the issue for you?
Flags: needinfo?(alta88)
> Does the new build with SVG support fix the issue for you?

I ran into this as well and your build from comment # 16 definitely fixes the problems:

- the "Open a new tab" image is correctly being displayed
- the image next to the "Nightly automatically sends some data to Mozilla...." message is correctly being displayed
- the "Gtk-WARNING **: Error loading theme icon" error messages are not appearing under the cmd prompt anymore
Attachment #8662578 - Flags: review?(dveditz) → review+
Going to flag this for checkin since we've had several confirmations that SVG support is the cause of related regressions, even though the original reporter has not confirmed yet - as I would rather get this fix in now for others affected than delay it.
Keywords: checkin-needed
Yes, problem fixed with the build in comment 16.
Flags: needinfo?(alta88)
https://hg.mozilla.org/mozilla-central/rev/a29828c4d7be
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Are you sure XPM is actually still used?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: