[83] in bug-owl
segfault when rapidly resizing window, owl 1.1.3
daemon@ATHENA.MIT.EDU (Edwin Olson)
Thu Aug 29 11:14:10 2002
Message-ID: <011501c24f6e$943c6ca0$84018e0a@edlaptop>
From: "Edwin Olson" <eolson@MIT.EDU>
To: <bug-owl@MIT.EDU>
Date: Thu, 29 Aug 2002 11:13:06 -0400
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
I use a window manager that resizes window contents in real time as I resize
the window. If I resize rapidly, this causes owl to crash.
I am using 1.1.3, built from sources.
The patch below seems to fix the problem. Note: I didn't take the time to
see what was going on, I just added the null pointer checks.
Cheers!
-Ed
diff -u owl-1.1.3/fmtext.c owl-1.1.3-fixed/fmtext.c
--- owl-1.1.3/fmtext.c Tue Jun 25 15:51:50 2002
+++ owl-1.1.3-fixed/fmtext.c Thu Aug 29 10:57:17 2002
@@ -297,6 +297,9 @@
char *tmpbuff;
int position, trans1, trans2, len, lastsame;
+ if (w==NULL)
+ return;
+
tmpbuff=owl_malloc(f->textlen+10);
position=0;
diff -u owl-1.1.3/mainwin.c owl-1.1.3-fixed/mainwin.c
--- owl-1.1.3/mainwin.c Tue Jun 25 15:51:50 2002
+++ owl-1.1.3-fixed/mainwin.c Thu Aug 29 11:00:29 2002
@@ -20,6 +20,9 @@
curmsg=owl_global_get_curmsg(&g);
v=owl_global_get_current_view(&g);
+ if (recwin==NULL)
+ return;
+
werase(recwin);
recwinlines=owl_global_get_recwin_lines(&g);