Bug 728889 - crash when locale is arabic
Summary: crash when locale is arabic
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-shell
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Owen Taylor
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-08 10:02 UTC by Muayyad Alsadi
Modified: 2012-01-09 18:25 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-09 18:25:04 UTC


Attachments (Terms of Use)
remove the buggy fix (700 bytes, patch)
2011-08-08 10:37 UTC, Muayyad Alsadi
no flags Details | Diff
remove locale formats not supported by glib (483 bytes, patch)
2011-08-09 07:59 UTC, Muayyad Alsadi
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
GNOME Bugzilla 656198 None None None Never

Description Muayyad Alsadi 2011-08-08 10:02:30 UTC
Description of problem:
gnome-shell crashes and does not offer fallback in locale is arabic

Version-Release number of selected component (if applicable):
gnome-shell-3.0.2-4

How reproducible:
always

Steps to Reproduce:
1. edit /etc/sysconfig/i18n and set it to ar_SA.UTF-8
2. reboot on a hardware that support gnome-shell
  
Actual results:
crash and no fallback mode is offered
and logout is offered

Expected results:
gnome shell works normal

Additional info:
this is due to js/ui/environment.js

actually is bug happens due to a fix of
    // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=508783
    Date.prototype.toLocaleFormat = function(format) {
        return Shell.util_format_date(format, this.getTime());
    };

it seems util_format_date does not offer one of the %XYZ used by arabic locale

Comment 1 Muayyad Alsadi 2011-08-08 10:37:54 UTC
Created attachment 517162 [details]
remove the buggy fix

remove overloading of Date.toLocaleFormat

Comment 2 Muayyad Alsadi 2011-08-09 07:59:14 UTC
Created attachment 517356 [details]
remove locale formats not supported by glib

glib does not support locale's alternative numeric symbols like %OI %OM

Comment 3 Terje Røsten 2012-01-08 21:10:11 UTC
Related issue: when using

LANG="nb_NO.ISO-8859-1"

in /etc/sysconfig/i180n

the overloading breaks gnome-shell. Now I have lots of broken desktops...

This is with Fedora 16, all updates.

Might be that the special ø, included in Sat (Lør) and Sun (Søn), that breaks
gnome-shell. So systems are in non working state during weekends :-)

Please fix asap as this breaks people desktops.

Error msg is:

gnome-session[2504]: DEBUG(+): GsmDBusClient: obj_path=/org/gnome/SessionManager/Presence interface=org.freedesktop.DBus.Properties method=GetAl
l
    JS ERROR: !!!   Exception was: Error: Failed to convert UTF-8 string to JS string: Ugyldig bytesekvens i inndata for konvertering
    JS ERROR: !!!     lineNumber = '0'
    JS ERROR: !!!     fileName = '"gjs_throw"'
    JS ERROR: !!!     stack = '"("Failed to convert UTF-8 string to JS string: Ugyldig bytesekvens i inndata for konvertering")@gjs_throw:0
("%a %R")@/usr/share/gnome-shell/js/ui/environment.js:75()@/usr/share/gnome-shell/js/ui/dateMenu.js:208
([object Object])@/usr/share/gnome-shell/js/ui/dateMenu.js:167
DateMenuButton([object Object])@/usr/share/gnome-shell/js/ui/dateMenu.js:44
()@/usr/share/gnome-shell/js/ui/panel.js:950
Panel()@/usr/share/gnome-shell/js/ui/panel.js:887
start()@/usr/share/gnome-shell/js/ui/main.js:213
@<main>:1
"'
    JS ERROR: !!!     message = '"Failed to convert UTF-8 string to JS string: Ugyldig bytesekvens i inndata for konvertering"'Advarsel fra vindush?ndterer: Log level 32: Execution of main.js threw exception: Error: Failed to convert UTF-8 string to JS string: Ugyldig bytesekvens i inndata for konvertering

Comment 4 Owen Taylor 2012-01-09 16:15:59 UTC
(In reply to comment #3)
> Related issue: when using

Actually, not a related issue.

> LANG="nb_NO.ISO-8859-1"

This is not a supported or supportable configuration. Only UTF-8 locales are supported in Fedora.
 
> in /etc/sysconfig/i180n
> 
> the overloading breaks gnome-shell. Now I have lots of broken desktops...
> 
> This is with Fedora 16, all updates.
> 
> Might be that the special ø, included in Sat (Lør) and Sun (Søn), that breaks
> gnome-shell. So systems are in non working state during weekends :-)
> 
> Please fix asap as this breaks people desktops.

This particular issue is likely fixable, and I'd commit a patch for it if a correct patch was provided upstream, but I'm not intending to investigate or come up with a fix myself.

Comment 5 Terje Røsten 2012-01-09 17:25:58 UTC
> Actually, not a related issue.

Okay, so when things works when the overloading hack is removed is pure luck?

> > LANG="nb_NO.ISO-8859-1"
> 
> This is not a supported or supportable configuration. Only UTF-8 locales are
> supported in Fedora.

This locale has been used on RHL, RHEL and Fedora since 1998 (and is included in "locale -a" output in Fedora 16), could you please provide a document which
describe the transition to UTF-8 as only supported encoding?


> > Please fix asap as this breaks people desktops.
> 
> This particular issue is likely fixable, and I'd commit a patch for it if a
> correct patch was provided upstream, but I'm not intending to investigate or
> come up with a fix myself.

Sorry for noise, mea culpa.

Comment 6 Owen Taylor 2012-01-09 18:25:04 UTC
(In reply to comment #5)
> > Actually, not a related issue.
> 
> Okay, so when things works when the overloading hack is removed is pure luck?

The problem may occur in the same portion of the code and the same workaround may work, but this particular bug is about something very specific - the lack of support in GLib for particular time format specifiers - which was resolved in GLib 2.30 (you can follow the upstream bug link to https://bugzilla.gnome.org/show_bug.cgi?id=656196), so this bug in fact should be closed CURRENTRELEASE.

> > > LANG="nb_NO.ISO-8859-1"
> > 
> > This is not a supported or supportable configuration. Only UTF-8 locales are
> > supported in Fedora.
> 
> This locale has been used on RHL, RHEL and Fedora since 1998 (and is included
> in "locale -a" output in Fedora 16), could you please provide a document which
> describe the transition to UTF-8 as only supported encoding?

I did the work to switch the GNOME desktop over to UTF-8 internally in the time period 1999-2002.

The situation where the internals of GNOME are UTF-8 but the system encoding only supports a tiny 256 character subset is essentially broken - e.g. what do you do if the user enters a filename that you can't save to disk?

I did write some compatibility code, but there's been basically no testing of that code, and I don't see at all reasonable to add more testing and try to fix that code up when we really want to just get users to make the move.

(In a quick look, I can't spot the problem here, but it's likely in code in GLib that was added just a few years ago, so much later than the general translations.)


Note You need to log in before you can comment on or make changes to this bug.