Re: SEGV on xterm resizing
- From: Pavel Roskin <proski gnu org>
- To: Paweł Sakowski <pawel sakowski eu org>
- Cc: mc-devel gnome org
- Subject: Re: SEGV on xterm resizing
- Date: Tue, 22 Jan 2002 18:35:23 -0500 (EST)
Hi, Paweł!
> When I resize my xterm (or gnome-terminal) running mc and resize it to a
> very small size (like 1x1), MC 4.5.55 dies:
>
> #0 0x002435f9 in memset () from /lib/libc.so.6
> #1 0xbffffbb4 in ?? ()
> #2 0x08050e2f in format_file (dest=0xbfffe610 ' ' <repeats 200
> times>...,
> panel=0x8106318, file_index=0, width=-1, attr=5, isstatus=1)
> at screen.c:547
> #3 0x080511e1 in repaint_file (panel=0x20202020, file_index=538976288,
> mv=538976288, attr=538976288, isstatus=538976288) at screen.c:618
> #4 0x20202020 in ?? ()
> Cannot access memory at address 0x20202020
Thanks! I'm applying the following patch:
========================
--- ChangeLog
+++ ChangeLog
@@ -2,2 +2,5 @@
+ * screen.c: Don't try to paint anything if width is 0 or less.
+ Reported by Pawel Sakowski <pawel sakowski eu org>
+
* screen.c: Make functions static whenever possible. Remove
--- screen.c
+++ screen.c
@@ -583,6 +583,10 @@ repaint_file (WPanel *panel, int file_in
} else
width = (panel->widget.cols - 2);
+ /* Nothing to paint */
+ if (width <= 0)
+ return;
+
if (mv){
if (!isstatus && panel->split){
widget_move (&panel->widget,
========================
Sorry, I cannot use "hard l" in ChangeLog, it's in iso-8859-1.
Now MC survives "compessing" to 1x1. The editor still crashes, I'll have
a look.
--
Regards,
Pavel Roskin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]