non-UTF locale causes crash

Bug #599947 reported by Михаїл Т.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cairo-Dock Core
Won't Fix
Undecided
Fabounet

Bug Description

A user I support is struggling with an application (cairo-dock + plugins), that crashes inside gtk/glib (stack below), when the LANG environment variable is set to something like ru_RU.KOI8-R.

Using ru_RU.UTF-8 works fine and the application speaks Russian in both GUI and (rather chatty) stderr/stdout.

   (gdb) where
   #0 0x2938be24 in strcmp () from /lib/libc.so.7
   #1 0x28e07b2a in g_utf8_collate () from /opt/lib/libglib-2.0.so.0
   #2 0x287cf135 in gtk_tooltip_trigger_tooltip_query () from
   /opt/lib/libgtk-x11-2.0.so.0
   #3 0x286e3027 in gtk_link_button_new_with_label () from
   /opt/lib/libgtk-x11-2.0.so.0
   #4 0x286e3486 in gtk_link_button_new_with_label () from
   /opt/lib/libgtk-x11-2.0.so.0
   #5 0x286e521c in gtk_list_store_set_valist () from
   /opt/lib/libgtk-x11-2.0.so.0
   #6 0x286e5282 in gtk_list_store_set () from
   /opt/lib/libgtk-x11-2.0.so.0
   #7 0x080ce3c0 in _cairo_dock_add_one_renderer_item
   (cName=0x2bc2c308 "Rainbow", pRenderer=0x2e772490,
        pModele=0x2e16e700) at cairo-dock-gui-factory.c:844
   #8 0x28dc8434 in g_hash_table_foreach () from /opt/lib/libglib-2.0.so.0
   #9 0x080ce4c5 in cairo_dock_build_renderer_list_for_gui
   (pHashTable=0x2ba34cc0) at cairo-dock-gui-factory.c:852
   #10 0x080a0e93 in cairo_dock_update_renderer_list_for_gui () at
   cairo-dock-renderer-manager.c:398
   #11 0x080722d7 in cairo_dock_read_conf_file (
        cConfFilePath=0x2bc2e200
   "/home/s/.config/cairo-dock/current_theme/cairo-dock.conf",
   pDock=0x2ba81c00)
        at cairo-dock-config.c:734
   #12 0x0809586f in cairo_dock_load_current_theme () at
   cairo-dock-themes-manager.c:1194
   #13 0x08069fba in main (argc=1, argv=0xbfbfec60) at cairo-dock.c:688

Tags: locale
Revision history for this message
Михаїл Т. (mi+launchpad) wrote :

Sorry, forgot some details:
OS: FreeBSD-8.1
Arch: i386 (32-bit)
OpenGL: NVidia
GTK: 2.20
GLib: 2.24
Cairo-dock and plugins: 2.1.3-9

Revision history for this message
Matthieu Baerts (matttbe) wrote :

Thank you for this bug report!
I assign this bug to fab because I really don't know how to confirm it :-/

With the latest beta release of Cairo-Dock (2.2.0) and after having installed the Russian locale, all is ok with "ru_RU.UTF-8" but I don't know how to install this locale with KOI8 charset. If I try with "ru_RU.KOI8-R", I just have this warning but it's normal...
    warning : (/opt/cairo-dock_bzr/cairo-dock-core/src/gldit/cairo-dock-icon-loader.c:cairo_dock_cut_string:331)
      Invalid byte sequence in conversion input

Is it the default charset for Russian locale on FreeBSD?

Changed in cairo-dock-core:
assignee: nobody → Fabounet (fabounet03)
milestone: none → 2.1.3
Revision history for this message
Михаїл Т. (mi+launchpad) wrote :

KOI8 in general is the first charset in the USSR. There are several standards now. KOI8-R and KOI8-U (the latter adds non-Russian Cyrillics to the former are the most common).

Similar problems with other Gnome-using applications are being discussed here:

http://defect.opensolaris.org/bz/show_bug.cgi?id=11936
http://defect.opensolaris.org/bz/show_bug.cgi?id=11363

but I can't figure out, what the resolution is/was...

Revision history for this message
Fabounet (fabounet03) wrote : Re: [Bug 599947] Re: non-UTF locale causes crash

I think it's more a problem in GTK, because the crash occurs when we build
the list of views (more precisely, a GtkListStore).
The views are translated, and probably GTK can't deal with non UTF8 locale.
I think we should link this bug to GTK.

2010/6/30 Міхаіл Т.
<<email address hidden><mi%<email address hidden>>
>

> KOI8 in general is the first charset in the USSR. There are several
> standards now. KOI8-R and KOI8-U (the latter adds non-Russian Cyrillics
> to the former are the most common).
>
> Similar problems with other Gnome-using applications are being discussed
> here:
>
> http://defect.opensolaris.org/bz/show_bug.cgi?id=11936
> http://defect.opensolaris.org/bz/show_bug.cgi?id=11363
>
> but I can't figure out, what the resolution is/was...
>
> ** Bug watch added: defect.opensolaris.org/bz/ #11936
> http://defect.opensolaris.org/bz/show_bug.cgi?id=11936
>
> ** Bug watch added: defect.opensolaris.org/bz/ #11363
> http://defect.opensolaris.org/bz/show_bug.cgi?id=11363
>
> --
> non-UTF locale causes crash
> https://bugs.launchpad.net/bugs/599947
> You received this bug notification because you are a bug assignee.
>
> Status in Cairo-Dock : Core: New
>
> Bug description:
> A user I support is struggling with an application (cairo-dock + plugins),
> that crashes inside gtk/glib (stack below), when the LANG environment
> variable is set to something like ru_RU.KOI8-R.
>
> Using ru_RU.UTF-8 works fine and the application speaks Russian in both GUI
> and (rather chatty) stderr/stdout.
>
> (gdb) where
> #0 0x2938be24 in strcmp () from /lib/libc.so.7
> #1 0x28e07b2a in g_utf8_collate () from /opt/lib/libglib-2.0.so.0
> #2 0x287cf135 in gtk_tooltip_trigger_tooltip_query () from
> /opt/lib/libgtk-x11-2.0.so.0
> #3 0x286e3027 in gtk_link_button_new_with_label () from
> /opt/lib/libgtk-x11-2.0.so.0
> #4 0x286e3486 in gtk_link_button_new_with_label () from
> /opt/lib/libgtk-x11-2.0.so.0
> #5 0x286e521c in gtk_list_store_set_valist () from
> /opt/lib/libgtk-x11-2.0.so.0
> #6 0x286e5282 in gtk_list_store_set () from
> /opt/lib/libgtk-x11-2.0.so.0
> #7 0x080ce3c0 in _cairo_dock_add_one_renderer_item
> (cName=0x2bc2c308 "Rainbow", pRenderer=0x2e772490,
> pModele=0x2e16e700) at cairo-dock-gui-factory.c:844
> #8 0x28dc8434 in g_hash_table_foreach () from /opt/lib/libglib-2.0.so.0
> #9 0x080ce4c5 in cairo_dock_build_renderer_list_for_gui
> (pHashTable=0x2ba34cc0) at cairo-dock-gui-factory.c:852
> #10 0x080a0e93 in cairo_dock_update_renderer_list_for_gui () at
> cairo-dock-renderer-manager.c:398
> #11 0x080722d7 in cairo_dock_read_conf_file (
> cConfFilePath=0x2bc2e200
> "/home/s/.config/cairo-dock/current_theme/cairo-dock.conf",
> pDock=0x2ba81c00)
> at cairo-dock-config.c:734
> #12 0x0809586f in cairo_dock_load_current_theme () at
> cairo-dock-themes-manager.c:1194
> #13 0x08069fba in main (argc=1, argv=0xbfbfec60) at cairo-dock.c:688
>
>
>

Revision history for this message
Fabounet (fabounet03) wrote :

I invalidate this bug, since the glib (and gtk) is supposed to work with UTF-8 strings.
a workaround would be in your case to set a correct LANG when launching the dock (can be put inside a script).

Changed in cairo-dock-core:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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