[mint-x] gtk+2.0-2.22.0 Error Gedit and Gnome panels crashing

Bug #665725 reported by notrock
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linux Mint
Fix Released
High
Clement Lefebvre

Bug Description

Using Mint 10 this started yesterday

Running Gedit without sudo starts and closes instantly with this error

**
Gtk:ERROR:/build/buildd/gtk+2.0-2.22.0/gtk/gtkrecentmanager.c:1942:get_icon_fallback: assertion failed: (retval != NULL)
Aborted

With sudo it works fine.

Also clicking the standard Gnome menu, does the same thing. Gnome-panels seem to be crashing and restarting. I'm not sure where Gnome logs the error I don't see it in the logs.

When I switch themes it fixes the problem. Going back to Mint-X the problem doesn't start right away either.

Revision history for this message
Maug Lee (mauglee) wrote :

Same here.

$ gedit
**
Gtk:ERROR:/build/buildd/gtk+2.0-2.18.3/gtk/gtkrecentmanager.c:1934:get_icon_fallback: assertion failed: (retval != NULL)
Aborted

Sudo doesn't help:

$ sudo gedit
[sudo] password for mauglee:
**
Gtk:ERROR:/build/buildd/gtk+2.0-2.18.3/gtk/gtkrecentmanager.c:1934:get_icon_fallback: assertion failed: (retval != NULL)
Aborted

Revision history for this message
notrock (kicelo) wrote :

For science sake and to rule out level 3 updates, I reinstalled Mint 10 and it happens right away. But not while in the live CD

Revision history for this message
Maug Lee (mauglee) wrote :

I am running LinuxMint 8 (helena). Problem started when I have installed package „mint-x-icons_1.0.3_all.deb“ on it.
I think it's a problem with „Mint-X“ icon package. If I change icon theme to another one, the problem goes out.

Revision history for this message
Clement Lefebvre (clementlefebvre) wrote :

Hi,

Can you guys confirm whether it's related to the GTK theme? or the Icon theme? To find out, customize the theme, and change the GTK theme while keeping the icons... see if it fails, then do the opposite: use Mint-X for GTK theme, and switch to a different icon theme.

It's definitely something to do with either the GTK theme or the icon theme, I'd just like to know which one.

Changed in linuxmint:
assignee: nobody → Clement Lefebvre (clementlefebvre)
milestone: none → julia-stable
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Maug Lee (mauglee) wrote :

As I said earlier it is related to Icon theme „Mint-X“. (Also to „Mint-X Dark“).
The problem exist only if this icon theme is selected. Changing GTK themes has no impact. Error *appears* in any GTK theme if this icon theme is selected. And error doesn't appear if there is other icon theme selected.

summary: - gtk+2.0-2.22.0 Error Gedit and Gnome panels crashing
+ [mint-x] gtk+2.0-2.22.0 Error Gedit and Gnome panels crashing
description: updated
Revision history for this message
Clement Lefebvre (clementlefebvre) wrote :

Can you check whether gnome-icon-theme is installed?

Revision history for this message
Clement Lefebvre (clementlefebvre) wrote :
Revision history for this message
Maug Lee (mauglee) wrote :

Yes, gnome-icon-theme is installed.

But problem goes from installed mint-x-icons package.

mint-x-icons Version: 1.0.3
Linux 2.6.31-14-generic
Linux Mint 8 Helena - Main Edition
GNOME Version: 2.28.1

Revision history for this message
notrock (kicelo) wrote :

Yup, Gnome icon theme is installed. For whatever reason, it hasn't happened again since yesterday.

Revision history for this message
Clement Lefebvre (clementlefebvre) wrote :

Ok... this is turning out to be a ridiculous bug. I think I'm getting close to finding out the cause and the solution of this, so I'm going to put as much information as possible in this bug report to help other devs from Gnome, Ubuntu, Arch and other projects, as well as theme artists avoid this problem in the future...

If what I write doesn't speak to you, just ignore it and know that a fix is on its way.

Revision history for this message
Clement Lefebvre (clementlefebvre) wrote :

Ok, so first.. looking at the error message, the basic problem is that Gnome (or its gtkrecentmanager to be precise) is looking for an icon and cannot find it. You'd like to think Gnome would use no icon or a generic one, but no... it prefers to crash.

Anyway, after downloading the source code for GTK+ and looking in gtkrecentmanager.c, it appears that the icon_fallback, is only looking for two different icons: GTK_STOCK_DIRECTORY and GTK_STOCK_FILE.

Gnome devs: It'd be great if you could output the path of the icon you're missing in the error msg.... and even if you could make it so it outputs a warning instead of crashing altogether.

Everyone else: The solution is to test your theme and see if it can find GTK_STOCK_DIRECTORY and GTK_STOCK_FILE in all traditional sizes (22, 24, 32, 48...). So for this, I wrote a script in Python which I'm attaching here.

Revision history for this message
Clement Lefebvre (clementlefebvre) wrote :

So, you need to execute this testheme.py:

chmod a+rx testtheme.py
./testheme.py

And if you're in the same situation as us, it should give you something like this (using Mint-X):

clem@gateway:~$ ./testtheme.py
Testing STOCK_DIRECTORY in 16px
<gtk.gdk.Pixbuf object at 0x28fe5f0 (GdkPixbuf at 0x2a11800)>
Testing STOCK_DIRECTORY in 22px
<gtk.gdk.Pixbuf object at 0x28fe640 (GdkPixbuf at 0x2a11850)>
Testing STOCK_DIRECTORY in 24px
<gtk.gdk.Pixbuf object at 0x28fe5f0 (GdkPixbuf at 0x2a118a0)>
Testing STOCK_DIRECTORY in 32px
<gtk.gdk.Pixbuf object at 0x28fe640 (GdkPixbuf at 0x2a118f0)>
Testing STOCK_DIRECTORY in 48px
<gtk.gdk.Pixbuf object at 0x28fe5f0 (GdkPixbuf at 0x2a11940)>
Testing STOCK_FILE in 16px
Error opening file: No such file or directory
Testing STOCK_FILE in 22px
Error opening file: No such file or directory
Testing STOCK_FILE in 24px
Error opening file: No such file or directory
Testing STOCK_FILE in 32px
Error opening file: No such file or directory
Testing STOCK_FILE in 48px
Error opening file: No such file or directory

Notice how it finds the GTK_STOCK_DIRECTORY but fails to load the GTK_STOCK_FILE icon?

You can switch your icon theme to another one and see that it all works (using New Wave):

clem@gateway:~$ ./testtheme.py
Testing STOCK_DIRECTORY in 16px
<gtk.gdk.Pixbuf object at 0x17e95f0 (GdkPixbuf at 0x1948cf0)>
Testing STOCK_DIRECTORY in 22px
<gtk.gdk.Pixbuf object at 0x17e9640 (GdkPixbuf at 0x191a8a0)>
Testing STOCK_DIRECTORY in 24px
<gtk.gdk.Pixbuf object at 0x17e95f0 (GdkPixbuf at 0x1944de0)>
Testing STOCK_DIRECTORY in 32px
<gtk.gdk.Pixbuf object at 0x17e9640 (GdkPixbuf at 0x192bc50)>
Testing STOCK_DIRECTORY in 48px
<gtk.gdk.Pixbuf object at 0x17e95f0 (GdkPixbuf at 0x19489e0)>
Testing STOCK_FILE in 16px
<gtk.gdk.Pixbuf object at 0x17e9640 (GdkPixbuf at 0x191ae30)>
Testing STOCK_FILE in 22px
<gtk.gdk.Pixbuf object at 0x17e95f0 (GdkPixbuf at 0x192bc50)>
Testing STOCK_FILE in 24px
<gtk.gdk.Pixbuf object at 0x17e9640 (GdkPixbuf at 0x1937a30)>
Testing STOCK_FILE in 32px
<gtk.gdk.Pixbuf object at 0x17e95f0 (GdkPixbuf at 0x19341e0)>
Testing STOCK_FILE in 48px
<gtk.gdk.Pixbuf object at 0x17e9640 (GdkPixbuf at 0x1937450)>

And here it finds everything....

... so let's see what's different between these two themes (in our case Mint-X and New Wave)...

Revision history for this message
Clement Lefebvre (clementlefebvre) wrote :

Correction above... we're not talking about the GTK theme, but the icon theme... so it's not New Wave but Humanity Dark we're actually interested in ;)

Revision history for this message
Clement Lefebvre (clementlefebvre) wrote :

The value of gtk.STOCK_FILE is "gtk-file", so this is the icon we're looking for. After a quick look in Mint-X, we can see that the index.theme file is correct, but that mimetypes/*/gtk-file.png are broken link...

Note to Faenza users: Mint-X is built on top of Faenza, so it's likely this problem is in Faenza as well.

Solution: Fix the broken link and update mint-x-icon in the repository.

Revision history for this message
Clement Lefebvre (clementlefebvre) wrote :

Fixed in 1.0.4

Changed in linuxmint:
status: Confirmed → Fix Released
Revision history for this message
Maug Lee (mauglee) wrote :

yes, I confirm that with mint-x-icons update to v.1.0.4 the problem doesn't exist. Thank you!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.