Simon Kuhnle schrieb:
On Tue, Mar 18, 2008 at 10:02:52PM +0100, Markus Hennecke wrote:
[...]
You could manually enable it for your system in that file, but I don't know
what else could break. Another solution would be to handle SIGWINCH in
mcabber itself. I think I will take a look into that.
How hard would it be to do that?
It would be nice to have a somewhat cleaner approach to this problem
than my patch does it ;-)
Could you take a look at the attached patch file and try the port with the patch applied? For me it will fix the resizing issues. All it does is to act on the SIGWINCH, read the terminal size via ioctl and tell the ncurses lib the new terminal size. Keycodes for KEY_RESIZE and ctrl-l are injected so that the screen is redrawn. I don't think that this hack will make it upstream, but it is something to start with.

I tried that patch and mcabber built and installed fine for me.

The resizing works too, but only if I resize my terminal a little bit.
But if I shrink and maximize it really fast many times,
I get a segmentation fault.

I rebuilt mcabber with "-O0 -g" again. Here's the backtrace:

Core was generated by `mcabber'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/libglib-2.0.so.1400.3...done.
Loaded symbols for /usr/local/lib/libglib-2.0.so.1400.3
Reading symbols from /usr/local/lib/libintl.so.4.0...done.
Loaded symbols for /usr/local/lib/libintl.so.4.0
Reading symbols from /usr/local/lib/libiconv.so.4.0...done.
Loaded symbols for /usr/local/lib/libiconv.so.4.0
Reading symbols from /usr/local/lib/libgpgme.so.17.0...done.
Loaded symbols for /usr/local/lib/libgpgme.so.17.0
Reading symbols from /usr/local/lib/libgpg-error.so.2.0...done.
Loaded symbols for /usr/local/lib/libgpg-error.so.2.0
Reading symbols from /usr/local/lib/libotr.so.3.1...done.
Loaded symbols for /usr/local/lib/libotr.so.3.1
Reading symbols from /usr/lib/libssl.so.11.0...done.
Loaded symbols for /usr/lib/libssl.so.11.0
Reading symbols from /usr/lib/libcrypto.so.13.0...done.
Loaded symbols for /usr/lib/libcrypto.so.13.0
Reading symbols from /usr/lib/libpanel.so.3.0...done.
Loaded symbols for /usr/lib/libpanel.so.3.0
Reading symbols from /usr/lib/libncurses.so.10.0...done.
Loaded symbols for /usr/lib/libncurses.so.10.0
Reading symbols from /usr/lib/libc.so.43.0...done.
Loaded symbols for /usr/lib/libc.so.43.0
Reading symbols from /usr/local/lib/libpcre.so.2.1...done.
Loaded symbols for /usr/local/lib/libpcre.so.2.1
Reading symbols from /usr/local/lib/libgcrypt.so.13.0...done.
Loaded symbols for /usr/local/lib/libgcrypt.so.13.0
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
#0  0x000000004ee325d4 in TransformLine (lineno=18) at 
/usr/src/lib/libcurses/tty/tty_update.c:1244
1244            memcpy(oldLine + firstChar,
(gdb) bt
#0  0x000000004ee325d4 in TransformLine (lineno=18) at 
/usr/src/lib/libcurses/tty/tty_update.c:1244
#1  0x000000004ee31c95 in doupdate () at 
/usr/src/lib/libcurses/tty/tty_update.c:746
#2  0x00000000004240ef in scr_DoUpdate () at screen.c:3681
#3  0x000000000040a19e in jb_main () at jabglue.c:278
#4  0x000000000040703b in main (argc=1, argv=0x7f7ffffe5320) at main.c:511

I'm running mcabber on amd64, in screen (problem happens without screen, too) 
in rxvt
on OpenBSD 4.3-beta (GENERIC) #1346: Thu Feb 21 15:40:59 MST 2008 machine.

Can you reproduce this?

I will look into that. After considering the information from viq I would do the whole thing in another way, so expect a new patch soon.

Kind regards,
  Markus

Reply via email to