Ah, and yes, here's xprop of gvim window causing the crash:
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
_AWESOME_PROPERTIES(STRING) = "00010000003"
XdndAware(ATOM) = ARC
_MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x32, 0x8, 0x10, 0x0, 0x0, 0x0
Vim(STRING) = "7.1"
WM_CLASS(STRING) = "gvim", "Gvim"
WM_LOCALE_NAME(STRING) = "ru_RU.KOI8-R"
WM_CLIENT_MACHINE(STRING) = "knote"
WM_ICON_NAME(COMPOUND_TEXT) = "ÔÒÅÂÏ×ÁÎÉÑ Ë ÍÅÎÅÄÖÅÒÕ ÉÚÏÂÒÁÖÅÎÉÊ.txt (~) -
GVIM"
WM_NAME(COMPOUND_TEXT) = "ÔÒÅÂÏ×ÁÎÉÑ Ë ÍÅÎÅÄÖÅÒÕ ÉÚÏÂÒÁÖÅÎÉÊ.txt (~) - GVIM"
WM_CLIENT_LEADER(WINDOW): window id # 0x1000001
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
bitmap id # to use for icon: 0x1000084
bitmap id # of mask for icon: 0x1000082
window id # of group leader: 0x1000001
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified minimum size: 116 by 85
program specified resize increment: 8 by 14
program specified base size: 20 by 57
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, WM_SAVE_YOURSELF
Note WM_LOCALE_NAME and WM_NAME (it is koi8-r encoded string).
Konstantin wrote:
I guess the problem is here:
if(!xutil_text_prop_get(globalconf.connection, c->win, _NET_WM_NAME,
&name, &len))
if(!xutil_text_prop_get(globalconf.connection, c->win, WM_NAME,
&name, &len))
return false;
According to this line:
#3 0x0806a29b in draw_iso2utf8 (iso=0xbfbfe8c8 "Ð&H\baa\v(",
len=671889664)
xutil_text_prop_get returns true, but left len unchanged, thus equal to
garbage,
as it is not set during initialization.
I stoped at the following fix:
diff --git a/client.c b/client.c
index 2d1991c..288b139 100644
--- a/client.c
+++ b/client.c
@@ -168,7 +168,7 @@ bool
client_updatetitle(client_t *c)
{
char *name, *utf8;
- ssize_t len;
+ ssize_t len = 0;
if(!xutil_text_prop_get(globalconf.connection, c->win,
_NET_WM_NAME, &name, &len))
if(!xutil_text_prop_get(globalconf.connection, c->win, WM_NAME,
&name, &len))
After this fix the crash is no more.
Konstantin wrote:
Ok, I found a bug in my rc.lua.
I set locale to ru_RU.UTF-8 at some point
to display some info on widgets.
I updated my config to make locale consistent,
always set to ru_RU.KOI8-R, so codeset is correct
for my machine all the time.
But awesome crushed anyway under the same circumstances.
Here's backtrace.
Konstantin wrote:
I investigated the problem a little more
and found out that nl_langinfo(CODESET)
in my awesome installation returns UTF-8,
so no conversion is made at all.
But all my locales are KOI8-R!
How could it be? And what should I do about it?
Julien Danjou wrote:
Please, follow on -devel.
At 1220111489 time_t, Konstantin wrote:
What happened:
- Vim tried to put file name into window title.
- The file name was in KOI8-R.
- GMarkupParser thought it is UTF-8.
Quick patch to avoid such crushes is applied.
A better solution may be check system locale and recode string from
locale encoding
to UTF-8 as a fallback in case normal parse is failed.
If it crash, can you get me a full backtrace from gdb?
The windows titles are already converted tu UTF-8, if possible, see
client_updatetitle().
Cheers,
--
Konstantin Stepanov
Web Developer
--
To unsubscribe, send mail to [EMAIL PROTECTED]