Invalid UTF-8 in ~/.gtk-bookmarks breaks gnome-shell

Bug #797929 reported by Anders Kaseorg
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: gnome-shell

For reasons I can’t explain, I had some invalid UTF-8 characters in my ~/.gtk-bookmarks file. This completely breaks logging in with gnome-shell. I get nothing but my desktop wallpaper. (I used to get the “fail whale” before that was disabled in gnome-session 3.0.2-0ubuntu5.)

Relevant errors from ~/.xsession-errors:

    JS ERROR: !!! Exception was: Error: Failed to convert UTF-8 string to JS string: Invalid byte sequence in conversion input
    JS ERROR: !!! lineNumber = '0'
    JS ERROR: !!! fileName = 'gjs_throw'
    JS ERROR: !!! stack = '("Failed to convert UTF-8 string to JS string: Invalid byte sequence in conversion input")@gjs_throw:0
()@/usr/share/gnome-shell/js/ui/placeDisplay.js:273
()@/usr/share/gnome-shell/js/ui/placeDisplay.js:213
PlacesManager()@/usr/share/gnome-shell/js/ui/placeDisplay.js:131
start()@/usr/share/gnome-shell/js/ui/main.js:144
@<main>:1
'
    JS ERROR: !!! message = 'Failed to convert UTF-8 string to JS string: Invalid byte sequence in conversion input'
Window manager warning: Log level 32: Execution of main.js threw exception: Error: Failed to convert UTF-8 string to JS string: Invalid byte sequence in conversion input

gnome-session[17444]: WARNING: App 'gnome-shell.desktop' respawning too quickly
gnome-session[17444]: CRITICAL: We failed, but the fail whale is dead. Sorry....

You can reproduce this with
  echo $'\xff' > ~/.gtk-bookmarks
The problem goes away when ~/.gtk-bookmarks is deleted.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gnome-shell 3.0.2-1
ProcVersionSignature: Ubuntu 3.0-0.1-generic 3.0.0-rc2
Uname: Linux 3.0-0-generic x86_64
NonfreeKernelModules: openafs
Architecture: amd64
Date: Wed Jun 15 17:15:05 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20101202)
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Anders Kaseorg (andersk) wrote :
Revision history for this message
smauleon (smauleon) wrote :

I'm trying Ubuntu 11.10 AMD64 and I can only log in with the guest user. On the upper right corner, instead of the name, I see [Invalid UTF-8].

When I try other users I get only the wallpaper, as Anders, and I have to reboot.

I can login with my main user on the Ctrl-Alt-F2 console. I see that non-English characters (ñ, ç, é...) are not recognized. Maybe is the ca_ES UTF-8 causing these problems. There is no .gtk-bookmarks file in my home directory.

I changed the directory names of my main user, to get rid of the accents (i changed Públic with Public and so on), and I modified .config/user-dirs.dirs accordingly. No results.

Revision history for this message
Anders Kaseorg (andersk) wrote :

smauleon: This bug report is specifically about problems caused by invalid UTF-8 in the ~/.gtk-bookmarks file. It is 100% reproducible from a clean account in that way, and results in an error message that clearly indicates that invalid UTF-8 is the problem. If you do not have a ~/.gtk-bookmarks file, your problem must be different, so please file a separate bug report.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Revision history for this message
Bernardo Donadio (bcdonadio) wrote :

It also affects me, but with a slightly different output (the error occurs in other .js script). I recommend changing the importance to Critical, as it breaks completely the user interface.

    JS ERROR: !!! Exception was: Error: Failed to convert UTF-8 string to JS string: Sequência de bytes inválida na entrada de conversão
    JS ERROR: !!! lineNumber = '0'
    JS ERROR: !!! fileName = '"gjs_throw"'
    JS ERROR: !!! stack = '"("Failed to convert UTF-8 string to JS string: Sequ\xEAncia de bytes inv\xE1lida na entrada de convers\xE3o")@gjs_throw:0
("%a, %e de %b, %R:%S")@/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:948
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: Sequência de bytes inválida na entrada de conversão"'
Aviso do gerenciador de janelas: Log level 32: Execution of main.js threw exception: Error: Failed to convert UTF-8 string to JS string: Sequência de bytes inválida na entrada de conversão
Dropbox isn't running!
Done!
/usr/share/themes/Adwaita Dark/gtk-2.0/gtkrc:51: Murrine configuration option "scrollbar_color" is no longer supported and will be ignored.
/usr/share/themes/Adwaita Dark/gtk-2.0/gtkrc:61: Murrine configuration option "gradients" is no longer supported and will be ignored.
/usr/share/themes/Adwaita Dark/gtk-2.0/gtkrc:61: Murrine configuration option "hilight_ratio" will be deprecated in future releases. Please use "highlight_shade" instead.
gnome-session[4028]: WARNING: App 'gnome-shell.desktop' respawning too quickly
gnome-session[4028]: CRITICAL: We failed, but the fail whale is dead. Sorry....

Revision history for this message
Icaro Clever (icaroclever) wrote :

I had the same problem. The interesting thing is in my laptop I've never had that problem and I had in my work desktop. Well, looking for informations I discovered that if I set the enviroment variable LC_ALL to my "pt_BR.UTF-8", the problem is solved.
I guess the method "toLocaleFormat(dateFormat)" is taking the wrong locale. Previously my LANGUAGE enviroment variables were:

LANG=pt_BR
LANGUAGE=pt_BR:pt:en
LC_CTYPE="pt_BR.UTF-8"
LC_NUMERIC="pt_BR.UTF-8"
LC_TIME="pt_BR.UTF-8"
LC_COLLATE="pt_BR.UTF-8"
LC_MONETARY="pt_BR.UTF-8"
LC_MESSAGES="pt_BR.UTF-8"
LC_PAPER="pt_BR.UTF-8"
LC_NAME="pt_BR.UTF-8"
LC_ADDRESS="pt_BR.UTF-8"
LC_TELEPHONE="pt_BR.UTF-8"
LC_MEASUREMENT="pt_BR.UTF-8"
LC_IDENTIFICATION="pt_BR.UTF-8"
LC_ALL=

The variable LC_ALL has the effects: "This variable determines the values for all locale categories. The value of the LC_ALL environment variable has precedence over any of the other environment variables starting with LC_ (LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) and the LANG environment variable".

Well, I hope this helps all.

Revision history for this message
dino99 (9d9) wrote :

EOL reached for that serie https://wiki.ubuntu.com/Releases

Changed in gnome-shell (Ubuntu):
status: Confirmed → Invalid
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

Remote bug watches

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