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 351395 - keyboard indicator segfaults
keyboard indicator segfaults
Status: RESOLVED DUPLICATE of bug 370038
Product: gnome-applets
Classification: Other
Component: keyboard indicator (gswitchit)
2.15.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
: 357500 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-08-15 04:16 UTC by Matthias Clasen
Modified: 2006-11-04 11:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2006-08-15 04:16:18 UTC
in 2.15.3.

Backtrace was generated from '/usr/libexec/gswitchit'

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1208567584 (LWP 31945)]
0xb7f8f410 in __kernel_vsyscall ()
  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/libpthread.so.0
  • #2 libgnomeui_segv_handle
    at gnome-ui-init.c line 867
  • #3 <signal handler called>
  • #4 gnome_kbd_indicator_fill
    at gnome-kbd-indicator.c line 266
  • #5 gnome_kbd_indicator_init
    at gnome-kbd-indicator.c line 595
  • #6 IA__g_type_create_instance
    at gtype.c line 1567
  • #7 g_object_constructor
    at gobject.c line 1015
  • #8 IA__g_object_newv
  • #9 IA__g_object_new_valist
    at gobject.c line 955
  • #10 IA__g_object_new
    at gobject.c line 793
  • #11 gnome_kbd_indicator_new
    at gnome-kbd-indicator.c line 746
  • #12 GSwitchItAppletNew
    at gswitchit-applet.c line 552
  • #13 panel_applet_marshal_BOOLEAN__STRING
    at panel-applet-marshal.c line 128
  • #14 IA__g_closure_invoke
    at gclosure.c line 490
  • #15 bonobo_closure_invoke_va_list
    at bonobo-types.c line 404
  • #16 bonobo_closure_invoke
    at bonobo-types.c line 467
  • #17 panel_applet_control_bound
    at panel-applet.c line 1364

[...]

This only happens if the applet is added via the add-to-panel dialog. 
It does not happen when the applet is manually started.
Comment 1 Sergey V. Udaltsov 2006-08-15 09:07:31 UTC
Something is odd here. The line  gnome-kbd-indicator.c:266 is empty (in cvs.gnome.org). Could you please attach the sources you used? Also, what is your XKB configuration and which version of xkeyboard-config do you use?
Comment 2 Matthias Clasen 2006-08-15 14:41:43 UTC
Is it possible that this was due to temporary version skew between control-center and gnome-applets ?

It works fine on my two test machines today, with gnome-applets 2.15.3 and
control-center 2.15.91.

Dunno, maybe best to close this for now, if nobody else sees this.
Comment 3 Sergey V. Udaltsov 2006-08-15 17:53:34 UTC
Yes, it looks like a skew...
Comment 4 Karsten Bräckelmann 2006-09-24 19:46:47 UTC
*** Bug 357500 has been marked as a duplicate of this bug. ***
Comment 5 JP Rosevear 2006-10-30 19:35:29 UTC
The duplicate indicates this is likely not just version skew, and we also have a report in openSUSE 10.2 with gnome 2.16.1 now:

https://bugzilla.novell.com/show_bug.cgi?id=216201

With a bit better trace.

Comment 6 JP Rosevear 2006-10-30 19:50:29 UTC
The crash is because in the code below if gswitchit_config_get_remote_lv_descriptions_utf8 fails, short_group_names is never allocated, would would set globals.short_group_names to a valid pointer.  globals.short_group_names is latter dereff'ed and *boom*.  Allocation short and group names of length 0 plus NULL terminator in the stringv should prevent the crash at least.  I'll poke to see gswitchit_config_get_remote_lv_descriptions_utf8 fails on openSUSE.

gboolean
gswitchit_config_load_remote_group_descriptions_utf8 (GSwitchItConfig *
                              config,
                              gchar ***
                              short_group_names,
                              gchar ***
                              full_group_names)
{
    gchar **sld, **lld, **svd, **lvd;
    gchar **psld, **plld, **plvd;
    gchar **psgn, **pfgn;
    gint total_descriptions;

    if (!gswitchit_config_get_remote_lv_descriptions_utf8
        (&sld, &lld, &svd, &lvd)) {
        return False;
    }

    total_descriptions = g_strv_length (sld);

    *short_group_names = psgn =
        g_new0 (gchar *, total_descriptions + 1);
    *full_group_names = pfgn =
        g_new0 (gchar *, total_descriptions + 1);
Comment 7 Sergey V. Udaltsov 2006-10-30 20:48:40 UTC
It seems your diagnistics is right.

But there are several questions here:
1. Why get_remote_lv_descriptions fail? what's wrong with DBUS/g-s-d or smth?
2. Wouldn't it be better to keep short_group_names NULL and process this situation correctly.

I am going to think about #2 - but do you have any idea about #1?
Comment 8 Sergey V. Udaltsov 2006-10-30 22:29:52 UTC
I committed the code (to gnome-2-16 branch) which should make processing of NULL in short_group_names correct. JP, could you please check?
Comment 9 Jon Lapham 2006-11-01 18:06:40 UTC
This bug (I think it is the same) also appears in Fedora Core 6.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=213419

Using gnome-applets-2.16.0.1-10.fc6.i386

Sergey, could you post (or link to) your patch? 
Comment 10 Sergey V. Udaltsov 2006-11-01 22:09:24 UTC
Jon, if you just take the latest version of gnome-kbd-indicator.c (according to http://cvs.gnome.org/viewcvs/libgswitchit/?only_with_tag=gnome-2-16 , it is 1.14.2.4) - you'll have it.
Comment 11 Jon Lapham 2006-11-03 20:48:24 UTC
Sergey-

No luck, I recompiled using v1.14.2.4 of gnome-kbd-indicator.c and I still get a seg fault upon adding a second keyboard.

Could it be that your fix is not related to the bug I reported here: ?

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=213419

Let me tell you what I did, let me know if I did something wrong.  I am willing to keep testing in any way you want to find the solution to this problem.

1) I downloaded the source RPM from Red Hat's current FC6 gnome-applets (gnome-applets-2.16.0.1-10.fc6.i386).

2) I installed using "rpm -Uvh gnome-apple..."

3) I went over to /usr/src/redhat/SOURCES and untarred the appropriate tar.bz2 file

4) I downloaded the v1.14.2.4 of gnome-kbd-indicator.c as per your instructions and replaced the file of the same name in 
/usr/src/redhat/SOURCES/gnome-applet... then I re-tarred the directory overwriting the old gnome-applets....rar.bz2 file

5) I recompiled the by issueing a "rpmbuild -ba /usr/src/redhat/SPEC/gnome-applets.spec" (had to edit out patch #25, which applies to gnome-kbd-indicator.c) which should rebuild using the new code.

6) Reinstall the newly created RPM 

Suggestions?
Comment 12 Sergey V. Udaltsov 2006-11-03 22:17:39 UTC
Well, may be you just hit the second bug on your way;)

About xkl_config_rec_dump - there is another open bug here. But the problem is that the stack trace as it is - does not make any real sense... So I am trying to understand why and how it may happen... So, your current situation looks like DUPLICATE...
Comment 13 Jon Lapham 2006-11-04 02:20:21 UTC
OKay, so does that mean you need to reopen this bug (#351395), or is there another I should be tracking?
Comment 14 Sergey V. Udaltsov 2006-11-04 11:51:39 UTC

*** This bug has been marked as a duplicate of 370038 ***