TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Dump when ending session in 1.95.9

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
pfn



Joined: 12 May 2006
Posts: 13

PostPosted: Sat May 13, 2006 6:46 pm    Post subject: Dump when ending session in 1.95.9 Reply with quote

This happens when I try to end a session, it has happened consistently since upgrading to 1.95.9 from 1.95.8:

Code:


Your rent is free!'

Basel Gill stores your belongings and helps you into your private chamber.

#SESSION 'h' DIED.
#THERE'S NO ACTIVE SESSION NOW.

--------------------------------------------------------------------------------
################################# DEBUG STACK ##################################
DEBUG_STACK[000] = main(0x2,0xbfe592a4)
DEBUG_STACK[001] = readmud(0x95c40e0)
DEBUG_STACK[002] = cleanup_session(0x95c40e0)
DEBUG_STACK[003] = kill_all(0x95c40e0,(nil))
DEBUG_STACK[004] = deletenode_list(0x95c40e0,0x95b2de8,0xe)
################################################################################
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Sun May 14, 2006 10:45 am    Post subject: Reply with quote

I'll look into it, I changed some code there. Make sure you did a clean compile though, just in case that's the reason.
Back to top
View user's profile Send private message Send e-mail
pfn



Joined: 12 May 2006
Posts: 13

PostPosted: Sun May 14, 2006 6:44 pm    Post subject: Reply with quote

Scandum wrote:
I'll look into it, I changed some code there. Make sure you did a clean compile though, just in case that's the reason.


Yes, it's a fresh build, I downloaded 1.95.9 source and built it in its own source tree--1.95.8 was in a separate dir tree.
Back to top
View user's profile Send private message
pfn



Joined: 12 May 2006
Posts: 13

PostPosted: Sun May 14, 2006 7:17 pm    Post subject: Reply with quote

So I got rid of the dump handler to get a coredump instead. So here's a better stack of the problem. I don't know what the problem is yet, but if I figure it out, I'll send you a diff.

#0 count_class (ses=0x95aa0a8, class=0x95b2b10) at class.c:146
146 if (node->class == class)

(gdb) bt
#0 count_class (ses=0x95aa0a8, class=0x95b2b10) at class.c:146
#1 0x0804bf3a in deletenode_list (ses=0x95aa0a8, node=0x95b2b10, index=14)
at llist.c:260
#2 0x0804bfa9 in kill_list (ses=0x95aa0a8, index=14) at llist.c:59
#3 0x0804bff7 in do_killall (ses=0x95aa0a8, arg=0x0) at llist.c:75
#4 0x08051f05 in cleanup_session (ses=0x95aa0a8) at session.c:325
#5 0x08050826 in readmud (ses=0x95aa0a8) at rl.c:208
#6 0x080509cd in bait () at rl.c:168
#7 0x009ba2c0 in rl_read_key () from /usr/lib/libreadline.so.5
#8 0x009a9354 in readline_internal_char () from /usr/lib/libreadline.so.5
#9 0x009a943e in readline () from /usr/lib/libreadline.so.5
#10 0x08060431 in commandloop () at input.c:44
#11 0x0804e1c1 in main (argc=2, argv=0xbfb215c4) at main.c:177
Back to top
View user's profile Send private message
pfn



Joined: 12 May 2006
Posts: 13

PostPosted: Sun May 14, 2006 10:20 pm    Post subject: Reply with quote

This seems to take care of the problem for me. I'm not sure if there are any other side effects, but since you free the ses->list[] anyhow, it should never be accessed again anyway...
Code:

diff -ur tt/src/class.c tt-PATCHED/src/class.c
--- tt/src/class.c      2006-04-20 12:08:55.000000000 -0700
+++ tt-PATCHED/src/class.c      2006-05-14 20:17:36.000000000 -0700
@@ -141,13 +141,15 @@

        for (cnt = list = 0 ; list < LIST_MAX ; list++)
        {
-               for (node = ses->list[list]->f_node ; node ; node = node->next)
-               {
-                       if (node->class == class)
-                       {
-                               cnt++;
-                       }
-               }
+                if (ses->list[list] != NULL) {
+                       for (node = ses->list[list]->f_node ; node ; node = node->next)
+                       {
+                               if (node->class == class)
+                               {
+                                       cnt++;
+                               }
+                       }
+                }
        }
        return cnt;
 }
diff -ur tt/src/llist.c tt-PATCHED/src/llist.c
--- tt/src/llist.c      2006-04-21 03:03:30.000000000 -0700
+++ tt-PATCHED/src/llist.c      2006-05-14 20:17:00.000000000 -0700
@@ -77,6 +77,7 @@
                if (arg == NULL)
                {
                        free(ses->list[cnt]);
+                        ses->list[cnt] = NULL;
                }
        }

Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Mon May 15, 2006 12:54 pm    Post subject: Reply with quote

Looks like it's related to the class counter. Thanks for figuring that one out. Smile
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group