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 349471 - Crash on manually changing the icon theme name
Crash on manually changing the icon theme name
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] theme-manager
2.17.x
Other All
: High critical
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 349507 357333 360434 362520 363624 366474 366946 369725 371629 372716 374742 375794 383517 383959 386137 389086 389912 390524 396969 397090 398755 401077 401526 404001 404641 404643 405086 405925 406915 407362 407970 408580 410654 411134 412189 413861 416350 416942 420600 424689 426689 427055 427120 430421 431631 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-07-31 19:18 UTC by no1wantdthisname
Modified: 2008-03-07 23:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Stack trace of the crash. (4.42 KB, text/plain)
2006-11-10 18:12 UTC, blaksaga+ubuntu
  Details
gnome-theme-manager-theme-rename-crashfix.patch (595 bytes, patch)
2007-01-04 14:07 UTC, Priit Laes (IRC: plaes)
none Details | Review
gnome-theme-manager-crasher.patch (719 bytes, patch)
2007-01-04 14:14 UTC, Priit Laes (IRC: plaes)
none Details | Review
gnome-themes-hashtable-syncer.patch (2.19 KB, patch)
2007-01-04 16:31 UTC, Priit Laes (IRC: plaes)
none Details | Review
gnome-theme-manager-hashtable-corrupter.patch (1.84 KB, patch)
2007-01-04 17:09 UTC, Priit Laes (IRC: plaes)
committed Details | Review

Description no1wantdthisname 2006-07-31 19:18:24 UTC
What were you doing when the application crashed?
Changed icon theme name in index.theme file.


Distribution: Ubuntu 6.10 (edgy)
Gnome Release: 2.15.90 2006-07-24 (Ubuntu)
BugBuddy Version: 2.15.90

Memory status: size: 31739904 vsize: 0 resident: 31739904 share: 0 rss: 13533184 rss_rlim: 0
CPU usage: start_time: 1154373351 rtime: 0 utime: 3480 stime: 0 cutime:2118 cstime: 0 timeout: 1362 it_real_value: 0 frequency: 0

Backtrace was generated from '/usr/bin/gnome-theme-manager'

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1210173776 (LWP 18219)]
(no debugging symbols found)
0xffffe410 in __kernel_vsyscall ()

Thread 1 (Thread -1210173776 (LWP 18219))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 gnome_gtk_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 strrchr
    from /lib/tls/i686/cmov/libc.so.6
  • #5 g_path_get_dirname
    from /usr/lib/libglib-2.0.so.0
  • #6 gnome_theme_details_reread_themes_from_disk
  • #7 main
  • #0 __kernel_vsyscall

Comment 1 Sebastien Bacher 2006-08-01 07:42:03 UTC
*** Bug 349507 has been marked as a duplicate of this bug. ***
Comment 2 Thomas Wood 2006-08-09 17:26:57 UTC
I can't reproduce this bug with version 2.14.1. Did you edit the file while the theme was selected, and was it a system or a user installed theme?
Comment 3 no1wantdthisname 2006-08-09 19:59:18 UTC
Steps to reproduce:
1. Set icon theme to user theme.
2. Open theme details in theme preference manager and go to icon tab.
3. Open up the index.theme file in the icon folder.
4. Change the name of the theme under [Icon Theme] and save.
5. Try to switch icon theme.  
6. Crashes.
Comment 4 Thomas Wood 2006-08-09 20:23:03 UTC
Ah, ok, you were changing the name icon theme in the index.theme belonging to the icon theme, not the index.theme belonging to the metatheme.

Confirmed.
Comment 5 Thomas Wood 2006-08-09 20:24:53 UTC
Clarifying the title, and marking down in severity, as I don't think this is something people would be doing on a regular basis.
Comment 6 Karsten Bräckelmann 2006-09-23 14:20:16 UTC
*** Bug 357333 has been marked as a duplicate of this bug. ***
Comment 7 Elijah Newren 2006-10-07 17:30:00 UTC
*** Bug 360434 has been marked as a duplicate of this bug. ***
Comment 8 Elijah Newren 2006-10-16 04:16:53 UTC
*** Bug 362520 has been marked as a duplicate of this bug. ***
Comment 9 Thomas Wood 2006-10-16 13:29:45 UTC
Looks like this may be a wider issue judging by the duplicates. I just tried to duplicate the problem again and got a slightly different backtrace:

  • #0 strcmp
    from /lib/tls/i686/cmov/libc.so.6
  • #1 load_theme_names
    at gnome-theme-details.c line 281
  • #2 gnome_theme_details_reread_themes_from_disk
    at gnome-theme-details.c line 630
  • #3 theme_changed_idle
    at gnome-theme-manager.c line 1100
  • #4 g_idle_dispatch
    at gmain.c line 3926
  • #5 IA__g_main_context_dispatch
    at gmain.c line 2045
  • #6 g_main_context_iterate
    at gmain.c line 2677
  • #7 IA__g_main_loop_run
    at gmain.c line 2881
  • #8 IA__gtk_main
    at gtkmain.c line 1148
  • #9 main
    at gnome-theme-manager.c line 1634

Comment 10 Thomas Wood 2006-10-20 10:23:04 UTC
*** Bug 363624 has been marked as a duplicate of this bug. ***
Comment 11 Karsten Bräckelmann 2006-10-28 20:34:13 UTC
*** Bug 366474 has been marked as a duplicate of this bug. ***
Comment 12 Karsten Bräckelmann 2006-10-28 20:35:21 UTC
Crasher -- Priority High, Severity critical.
Comment 13 André Klapper 2006-10-29 16:21:23 UTC
*** Bug 366946 has been marked as a duplicate of this bug. ***
Comment 14 André Klapper 2006-11-02 23:56:26 UTC
*** Bug 369725 has been marked as a duplicate of this bug. ***
Comment 15 Thomas Wood 2006-11-10 09:51:00 UTC
*** Bug 372716 has been marked as a duplicate of this bug. ***
Comment 16 Thomas Wood 2006-11-10 09:55:44 UTC
*** Bug 371629 has been marked as a duplicate of this bug. ***
Comment 17 Thomas Wood 2006-11-10 10:04:06 UTC
I really need a good stack trace from someone who can reproduce this bug. Without a stack trace from the crash it's very hard to determine what caused it.

Please see http://live.gnome.org/GettingTraces for more information on how to do so.
Comment 18 blaksaga+ubuntu 2006-11-10 18:11:31 UTC
This bug was easy to reproduce.  Here is the stack trace from the crash:

http://hosted.blaksaga.com/themecrashtrace.txt

The steps I used to reproduce this bug were:

1. Open gnome theme preferences.
2. Copy a theme folder in the ~/.icons directory to ~/.icons/newname.
3. Edit the ~/.icons/newname/index.theme file and replace name=oldname with name=newname.
4. Save the file.

Gnome theme manager immediately crashed.

If you need more info, let me know.
Comment 19 blaksaga+ubuntu 2006-11-10 18:12:58 UTC
Created attachment 76337 [details]
Stack trace of the crash.

On second thought, I will attach the stack trace.  It seems better in practice.  You never know when the link I posted will work or not.
Comment 20 Thomas Wood 2006-11-13 17:28:39 UTC
*** Bug 374742 has been marked as a duplicate of this bug. ***
Comment 21 Thomas Wood 2006-11-16 08:40:21 UTC
*** Bug 375794 has been marked as a duplicate of this bug. ***
Comment 22 Bruno Boaventura 2006-12-08 02:32:25 UTC
*** Bug 383517 has been marked as a duplicate of this bug. ***
Comment 23 Thomas Wood 2006-12-14 07:57:04 UTC
*** Bug 383959 has been marked as a duplicate of this bug. ***
Comment 24 Thomas Wood 2006-12-15 09:58:43 UTC
*** Bug 386137 has been marked as a duplicate of this bug. ***
Comment 25 Bruno Boaventura 2006-12-24 04:04:26 UTC
*** Bug 389086 has been marked as a duplicate of this bug. ***
Comment 26 Pascal Terjan 2006-12-27 09:46:45 UTC
*** Bug 389912 has been marked as a duplicate of this bug. ***
Comment 27 Susana 2006-12-29 13:29:27 UTC
*** Bug 390524 has been marked as a duplicate of this bug. ***
Comment 28 Thomas Wood 2007-01-04 12:04:19 UTC
Here is a slightly better stack trace, since it uses a build without optimisations and no-inline:


Backtrace was generated from '/opt/gnome2/bin/gnome-theme-manager'

Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1224141120 (LWP 18799)]
0xb72cf20e in __waitpid_nocancel () from /lib/tls/libpthread.so.0
  • #0 __waitpid_nocancel
    from /lib/tls/libpthread.so.0
  • #1 libgnomeui_segv_handle
    at gnome-ui-init.c line 870
  • #2 <signal handler called>
  • #3 strrchr
    from /lib/tls/libc.so.6
  • #4 IA__g_path_get_dirname
    at gutils.c line 823
  • #5 path_to_theme_id
    at gnome-theme-details.c line 58
  • #6 gnome_theme_details_reread_themes_from_disk
    at gnome-theme-details.c line 713
  • #7 theme_changed_idle
    at gnome-theme-manager.c line 1110
  • #8 g_idle_dispatch
    at gmain.c line 4083
  • #9 IA__g_main_context_dispatch
    at gmain.c line 2049
  • #10 g_main_context_iterate
    at gmain.c line 2681
  • #11 IA__g_main_loop_run
    at gmain.c line 2885
  • #12 IA__gtk_main
    at gtkmain.c line 1135
  • #13 main
    at gnome-theme-manager.c line 1669

Comment 29 Priit Laes (IRC: plaes) 2007-01-04 14:07:00 UTC
Created attachment 79381 [details] [review]
gnome-theme-manager-theme-rename-crashfix.patch

This seems to fix the crash but implementation is awful ;)
Comment 30 Priit Laes (IRC: plaes) 2007-01-04 14:14:25 UTC
Created attachment 79382 [details] [review]
gnome-theme-manager-crasher.patch

Get rid of double assignment, added comments, constification?

Ok to commit?
Comment 31 Priit Laes (IRC: plaes) 2007-01-04 14:23:11 UTC
My previous patches were wrong, they only disabled icon themes (unfortunately I was too late to spot this).

Sorry for the spam :(

But Thomas, could I apply at least the repeated assigment part? ;)
Comment 32 Thomas Wood 2007-01-04 14:53:06 UTC
If there is some problem with "old" entries in the hash table, can't they be removed somehow?
Comment 33 Jean Collonvillé 2007-01-04 14:55:37 UTC
It seems that the problem is caused by the text editor's temporary files. If we monitor only the index.theme file for changes, everything is going fine (almost)

With the diff below, the segfault is gone, the remaining issue is that when you modify the icon theme name, an incorrect entry is added on the head of the list. I'll try to take a look when I'll have more time.



Diff :


--- control-center-2.16.1/capplets/common/gnome-theme-info.c    2005-11-14 16:18:03.000000000 +0100
+++ control-center-2.16.1.debug/capplets/common/gnome-theme-info.c      2007-01-04 15:31:52.000000000 +0100
@@ -1146,15 +1146,15 @@
   /* Add the handle for this directory */
   index_uri = gnome_vfs_uri_append_file_name (theme_dir_uri, "index.theme");
   update_icon_theme_index (index_uri, monitor_data->priority);
-  gnome_vfs_uri_unref (index_uri);
 
-  uri_string = gnome_vfs_uri_to_string (theme_dir_uri, GNOME_VFS_URI_HIDE_NONE);
+  uri_string = gnome_vfs_uri_to_string (index_uri, GNOME_VFS_URI_HIDE_NONE);
   result = gnome_vfs_monitor_add (& (monitor_data->common_icon_theme_dir_handle),
                                  uri_string,
-                                 GNOME_VFS_MONITOR_DIRECTORY,
+                                 GNOME_VFS_MONITOR_FILE,
                                  common_icon_theme_dir_changed,
                                  monitor_data);
   g_free (uri_string);
+  gnome_vfs_uri_unref (index_uri);
 
   if (result == GNOME_VFS_ERROR_NOT_SUPPORTED)
     real_monitor_not_added = TRUE;
Comment 34 Priit Laes (IRC: plaes) 2007-01-04 16:31:16 UTC
Created attachment 79391 [details] [review]
gnome-themes-hashtable-syncer.patch

I took Jean's monitor patch (this fixes at least the segfault) and now non-existing themes are removed from hash table so names table is kept in sync with uri hash table.

Hopefully this helps.
Comment 35 Priit Laes (IRC: plaes) 2007-01-04 17:09:15 UTC
Created attachment 79398 [details] [review]
gnome-theme-manager-hashtable-corrupter.patch

Ok, found the real cause. Apparently the update_common_theme_dir_index() passes wrong theme name to the hash_table item destroyer and the item doesn't get freed.

Also update_common_theme_dir_index() needs a rewrite. Badly ;)
Comment 36 Thomas Wood 2007-01-04 17:50:33 UTC
That looks like about the same place I had got to too.

I'll try out the patch and commit it if it doesn't seem to affect anything else. 

One thing to note is that you're patch is using a different indent style from the original source, and you're using c99 style comments. It's probably good practice to try and avoid these things.
Comment 37 Thomas Wood 2007-01-06 23:36:00 UTC
Patch worked perfectly and now committed. Thanks for your help!
Comment 38 palfrey 2007-01-15 22:27:39 UTC
*** Bug 396969 has been marked as a duplicate of this bug. ***
Comment 39 palfrey 2007-01-16 15:21:30 UTC
*** Bug 397090 has been marked as a duplicate of this bug. ***
Comment 40 palfrey 2007-01-20 16:51:14 UTC
*** Bug 398755 has been marked as a duplicate of this bug. ***
Comment 41 palfrey 2007-01-27 00:14:40 UTC
*** Bug 401077 has been marked as a duplicate of this bug. ***
Comment 42 Jens Granseuer 2007-01-28 11:03:54 UTC
*** Bug 401526 has been marked as a duplicate of this bug. ***
Comment 43 Sebastien Bacher 2007-01-28 11:52:28 UTC
That's still happening with 2.17.90, https://launchpad.net/ubuntu/+source/control-center/+bug/81923 is an Ubuntu bug with a similar backtrace:

  • #0 strrchr
    from /lib/tls/i686/cmov/libc.so.6
  • #1 IA__g_path_get_dirname
    at gutils.c line 845
  • #2 gnome_theme_details_reread_themes_from_disk
    at /build/buildd/control-center-2.17.90/./capplets/theme-switcher/gnome-theme-details.c line 60
  • #3 theme_changed_idle
    at /build/buildd/control-center-2.17.90/./capplets/theme-switcher/gnome-theme-manager.c line 1140
  • #4 g_idle_dispatch
    at gmain.c line 3928
  • #5 IA__g_main_context_dispatch
    at gmain.c line 2045
  • #6 g_main_context_iterate
    at gmain.c line 2677
  • #7 IA__g_main_loop_run
    at gmain.c line 2881
  • #8 IA__gtk_dialog_run
    at gtkdialog.c line 996
  • #9 remove_theme
    at /build/buildd/control-center-2.17.90/./capplets/theme-switcher/gnome-theme-details.c line 486

Reopening
Comment 44 Jens Granseuer 2007-02-03 19:21:55 UTC
*** Bug 404001 has been marked as a duplicate of this bug. ***
Comment 45 Jens Granseuer 2007-02-05 16:47:43 UTC
*** Bug 404641 has been marked as a duplicate of this bug. ***
Comment 46 Jens Granseuer 2007-02-05 16:48:48 UTC
*** Bug 404643 has been marked as a duplicate of this bug. ***
Comment 47 Jens Granseuer 2007-02-06 22:05:00 UTC
*** Bug 405086 has been marked as a duplicate of this bug. ***
Comment 48 Susana 2007-02-09 00:41:04 UTC
*** Bug 405925 has been marked as a duplicate of this bug. ***
Comment 49 Jens Granseuer 2007-02-12 18:01:07 UTC
*** Bug 406915 has been marked as a duplicate of this bug. ***
Comment 50 Jens Granseuer 2007-02-13 21:51:08 UTC
*** Bug 407362 has been marked as a duplicate of this bug. ***
Comment 51 Jens Granseuer 2007-02-14 19:01:59 UTC
*** Bug 407970 has been marked as a duplicate of this bug. ***
Comment 52 Jens Granseuer 2007-02-16 17:50:02 UTC
*** Bug 408580 has been marked as a duplicate of this bug. ***
Comment 53 palfrey 2007-02-22 15:02:22 UTC
*** Bug 410654 has been marked as a duplicate of this bug. ***
Comment 54 Vassilis Pandis 2007-02-22 18:18:18 UTC
Here's another backtrace, debug symbols, no optimisations, 2.17.91

(gdb) run
Starting program: /usr/bin/gnome-theme-manager 
[Thread debugging using libthread_db enabled]
[New Thread -1226090816 (LWP 27187)]

(gnome-theme-manager:27187): Gtk-WARNING **: Error loading theme icon for stock: Failed to open file '/home/pandis/.icons/Lila/scalable/stock/gtk-dialog-info.svg': No such file or directory

Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 27187)

  • #0 strrchr
    from /lib/tls/i686/cmov/libc.so.6
  • #1 IA__g_path_get_dirname
    at gutils.c line 845
  • #2 path_to_theme_id
    at gnome-theme-details.c line 63
  • #3 gnome_theme_details_reread_themes_from_disk
    at gnome-theme-details.c line 770
  • #4 theme_changed_idle
    at gnome-theme-manager.c line 1140
  • #5 g_idle_dispatch
    at gmain.c line 3928
  • #6 IA__g_main_context_dispatch
    at gmain.c line 2045
  • #7 g_main_context_iterate
    at gmain.c line 2677
  • #8 IA__g_main_loop_run
    at gmain.c line 2881
  • #9 gtk_dialog_run
    from /usr/lib/libgtk-x11-2.0.so.0
  • #10 remove_theme
    at gnome-theme-details.c line 509
  • #11 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #12 IA__g_closure_invoke
    at gclosure.c line 490
  • #13 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #14 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #15 IA__g_signal_emit
    at gsignal.c line 2243
  • #16 gtk_button_clicked
    from /usr/lib/libgtk-x11-2.0.so.0
  • #17 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #18 ??
  • #19 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #20 ??
  • #21 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77

Comment 55 Jens Granseuer 2007-02-23 17:38:26 UTC
*** Bug 411134 has been marked as a duplicate of this bug. ***
Comment 56 Jens Granseuer 2007-02-26 17:23:54 UTC
*** Bug 412189 has been marked as a duplicate of this bug. ***
Comment 57 Jens Granseuer 2007-03-02 16:55:12 UTC
*** Bug 413861 has been marked as a duplicate of this bug. ***
Comment 58 Jens Granseuer 2007-03-09 18:07:29 UTC
*** Bug 416350 has been marked as a duplicate of this bug. ***
Comment 59 Pedro Villavicencio 2007-03-11 00:39:56 UTC
*** Bug 416942 has been marked as a duplicate of this bug. ***
Comment 60 Jens Granseuer 2007-03-20 17:54:23 UTC
*** Bug 420600 has been marked as a duplicate of this bug. ***
Comment 61 Pedro Villavicencio 2007-03-31 01:24:04 UTC
*** Bug 424689 has been marked as a duplicate of this bug. ***
Comment 62 Jens Granseuer 2007-04-05 17:47:25 UTC
*** Bug 426689 has been marked as a duplicate of this bug. ***
Comment 63 palfrey 2007-04-07 10:33:24 UTC
*** Bug 427055 has been marked as a duplicate of this bug. ***
Comment 64 Jens Granseuer 2007-04-08 11:59:20 UTC
*** Bug 427120 has been marked as a duplicate of this bug. ***
Comment 65 Jens Granseuer 2007-04-17 17:44:44 UTC
*** Bug 430421 has been marked as a duplicate of this bug. ***
Comment 66 Jens Granseuer 2007-04-20 18:27:38 UTC
*** Bug 431631 has been marked as a duplicate of this bug. ***
Comment 67 Jens Granseuer 2007-11-11 20:11:08 UTC
Has anybody encountered this with >= 2.20?
Comment 68 Jens Granseuer 2008-03-07 23:04:08 UTC
Guess not.