nmlorg / naim

naim is a console client for AOL Instant Messenger (AIM), AOL I Seek You (ICQ), Internet Relay Chat (IRC), and The lily CMC.
http://naim.n.ml.org/
1 stars 0 forks source link

/resize assertion failure #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
> What steps will reproduce the problem?

1. /resize

> What is the expected output? What do you see instead?
naim/ncurses to notice the new size of my connected screen.

When I issue a /resize, naim crashes and I get a core dump.
/resize assertion "bwin->nwin.logfile != NULL" failed: file "buddy.c", line 784

    Abort trap (core dumped)
$ gdb `which naim` naim.core
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd3.5"...
Core was generated by `naim'.
Program terminated with signal 6, Abort trap.
Reading symbols from /usr/lib/libncurses.so.9.0...done.
Reading symbols from /usr/lib/libc.so.30.3...done.
Reading symbols from /usr/libexec/ld.so...done.
#0  0xc5d73ad in _thread_sys_kill ()
(gdb) bt
#0  0xc5d73ad in _thread_sys_kill ()
#1  0xc605c65 in abort ()
#2  0xc5bdbdf in __assert ()
#3  0x1c009394 in playback (conn=0x0, bwin=0x3c04c680, lines=74) at buddy.c:784
#4  0x1c02d894 in do_resize (conn=0x3c04c780, bwin=0x3c04c680) at win.c:62
#5  0x1c02d90a in statrefresh () at win.c:74
#6  0x1c02b154 in main (argc=1, args=0xcfbf1064) at main.c:493
#7  0x1c006ab1 in ___start ()
#8  0x1c006a27 in __start ()
#9  0xcfbf11cc in ?? ()

> What version of naim are you using? On what operating system?
> % naim --version
naim 0.11.8.3.1

> % uname -a
$ uname -a
OpenBSD [hostname hidden] 3.5 GENERIC#34 i386
Yes it's old -- likely irrelevant

> Please provide any additional information below.
It may be relevant that I've got logdir set to /dev/null.  I don't care
about logging for the most part and naim is VERY chatty.

The context of the assert is as follows (buddy.c):
        assert(bwin->nwin.logfile != NULL);
        fflush(bwin->nwin.logfile);
        bwin->nwin.dirty = 0;

It appeared to me that the assert was unnecessary and the man page for
fflush shows:
If the stream argument is NULL, fflush() flushes all open output streams.

That seemed pretty harmless to me, so I commented the line out and /resize
appears to work properly.

Original issue reported on code.google.com by goo...@rpaisley.com on 31 Jul 2008 at 1:21