Subject: FVWM: FvwmTaskBar crashes

From: "Viktor Vislobokov" <[email-masked]>
Date: Tue, 23 Mar 2004 10:18:09 +0500

Hello All.

If anybody has interest.
I have ru_RU.UTF-8 locale. FvwmTaskBar is crashes when windows title has
Russian letters and long (For example while read mail in Mozilla). May
be, some peaple have same problem with Unicode locales.

I fix it for me, but it is VERY bad solve. I'm not fvwm developer and
not specialist by fvwm. I can't understand "why", but I found "how".

In file modules/FvwmTaskBar/ButtonArray.c and ButtonNew routine, I
truncated window title length to 40 characters. After this, FvwmTaskBar
works fine.

-- 
With best wishes,
Victor Vislobokov
Perm, Russia

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Olivier Chapuis <[email-masked]>
Date: Sun, 28 Mar 2004 23:22:02 +0200

> If anybody has interest.

Yes we are interested. Thanks for the bug report.

> be, some peaple have same problem with Unicode locales.

I can reproduce this with a non UTF-8 local (I use fr_FR):

*FvwmTaskBar: Font "StringEncoding=UTF-8:-*-fixed-*-iso10646-1"

xterm -T "ééééééééééééééééééééééééééééééééééééééééééééééééééééééééé" \
	-e sleep 10000

Of course this xterm Title may do not give a valid UTF-8 string.
Any way even with a valid UTF-8 string some code in FvwmTaskBar
(ButtonArray.c (ButtonDraw)) can pass invalid UTF-8 strings to
Flocale.c by testing the width (in pixel) and rendering a string
truncated at any "byte" position (FvwmWinList, FvwmScript and
FvwmForm also use such code). I think (strongly) that this is
the origin of the core dump. 

This should be fixed in Flocale.c.  However, it seems that
CombineChar does not support at all this situation. If I disable
CombineChar I cannot reproduce the core dump (which gives no
interesting gdb output).

Marcus, can you take a look?

Regards, Olivier