Subject: Crashing Bug (w/prospective fix)

From: Suzanne Skinner <[email-masked]>
Date: Sat, 7 Sep 2002 23:21:42 -0400

Fvwm has a habit of crashing on me right after I exit full-screen gqview. I'm
using the 2002/08/25 CVS snapshot (right before Dominik's codefest) but I
think the problem probably still exists in current CVS. The bug is difficult
to reproduce (except when I'm not trying to reproduce it ;-P).

I took the core file into gdb and it pointed at a line in Flocale.c:

   void FlocaleFreeNameProperty(FlocaleNameString *ptext)
   {
           if (ptext->name_list != NULL)
           {
>>                 if (ptext->name != NULL && ptext->name != *ptext->name_list)

It seems that, at some point, ptext->name_list is not NULL, but does not point
anywhere valid either. I was able to find two spots, both in events.c, where
name_list might not be properly initialized. The attached patch fixes that.

I'm not positive that this is the fix for the core dump, but no more crashes
as yet!

Suzanne

-- 
[email-masked] - http://www.igs.net/~tril/
--- events.c.orig	Sat Sep  7 15:29:29 2002
+++ events.c	Sat Sep  7 15:29:38 2002
@@ -2596,6 +2596,8 @@
 		{
 			return;
 		}
+		new_name.name = NULL;
+		new_name.name_list = NULL;
 		FlocaleGetNameProperty(XGetWMName, dpy, FW_W(Fw), &new_name);
 		if (new_name.name == NULL)
 		{
@@ -2642,6 +2644,8 @@
 		{
 			return;
 		}
+		new_name.name = NULL;
+		new_name.name_list = NULL;
 		FlocaleGetNameProperty(
 			XGetWMIconName, dpy, FW_W(Fw), &new_name);
 		if (new_name.name == NULL)

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 15 Sep 2002 22:42:03 +0200

> I'm not positive that this is the fix for the core dump, but no more crashes

Maybe it's not the fix for that particular core dump, but it's
definitely a fix for *some* core dump.  The new_name variable is
not initialised anywhere and FlocaleGetNameProperty() may not
initialise it either.

> +++ events.c	Sat Sep  7 15:29:38 2002

Bye

Dominik ^_^  ^_^

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