And naturally I'm having another issue, this time using do_note_remove, specifically in the free_note function.
This one doesn't happen every time I erase a message, but usually the second time.
gdb has this to say:
Code:
Core was generated by `swic 4050 copyover 4'.
Program terminated with signal 6, Aborted.
#0 0x00ccc402 in __kernel_vsyscall ()
(gdb) bt
#0 0x00ccc402 in __kernel_vsyscall ()
#1 0x002408a0 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2 0x00242271 in abort () at abort.c:88
#3 0x002794db in __libc_message (do_abort=2, fmt=0x344884 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:170
#4 0x00281651 in _int_free (av=0x370120, mem=0x9326ac0) at malloc.c:5891
#5 0x00284cd0 in __libc_free (mem=0x9326ac0) at malloc.c:3626
#6 0x080a141b in free_note (pnote=0x9326ae0) at boards.c:359
#7 0x080a2084 in note_remove (board=0x9225530, pnote=0x9326ae0) at boards.c:560
#8 0x080a5d87 in do_note_remove (ch=0x92f7978, argument=0xbfafc27b "1") at boards.c:1943
#9 0x0812726d in interpret (ch=0x92f7978, argument=0xbfafc27b "1") at interp.c:365
#10 0x080e1109 in game_loop () at comm.c:735
#11 0x080e0623 in main (argc=4, argv=0xbfb0c354) at comm.c:417
And here's the free_note function:
Code:
void free_note( NOTE_DATA * pnote )
{
NOTE_DATA *reply = NULL, *next_reply = NULL;
if( pnote == NULL )
{
bug( "%s: NULL pnote!", __FUNCTION__ );
return;
}
DISPOSE( pnote->text );
DISPOSE( pnote->subject );
STRFREE( pnote->to_list );
STRFREE( pnote->sender );
for( reply = pnote->first_reply; reply; reply = next_reply )
{
next_reply = reply->next;
UNLINK( reply, pnote->first_reply, pnote->last_reply, next, prev );
free_note( reply );
}
/*
* Now dispose of the parent
*/
DISPOSE( pnote );
}
Any ideas?
I'll try and step in gdb up to the point where _int_free is getting called and print out the av and mem stuff and I'll edit this post to add what I can get from that unless someone happens to post a reply before I finish.
And thanks for any help ahead of time. I really appreciate it.
Ok. After putting a break point on free_note and stepping around a bit I get a crash the second time I erase a note without either quiting or doing a copyover or something to that affect beforehand.
Here's one thing that gdb has to say about it:
Code:
*** glibc detected *** /home/mud/cbond/swic/bin/swic: double free or corruption (out): 0x0a2bf4b0 ***
Now I've noticed that if you start to write a note but abort out of it, with /a, and then start writting a new note, I get the following message:
Log: [*****] BUG: note_attach: ch->pnote already exsists!
This happens if you abort out while in the actual note text editing buffer. Could these two things be related?