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

Crash on session disconnect.

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



Joined: 10 Jul 2007
Posts: 14

PostPosted: Sat Jun 28, 2008 11:54 pm    Post subject: Crash on session disconnect. Reply with quote

Version 1.98.2 on Centos 5
Built from source.

Works great except everything I quit my game, tintin starts throwing errors. A sample of errors are here:
This is right after the game disconnects me from typing 'quit' in the game.
Code:


#OK: WRITING BUFFER TO '/home/six/ttbuffer/lsw_buffer.log'

#SESSION 'lsw' DIED.

--------------------------------------------------------------------------------


#THERE'S NO ACTIVE SESSION NOW.
#UNLINK ERROR in file strhash.c on line 90
################################# DEBUG STACK ##################################
DEBUG_STACK[000] = cleanup_session(0x8359060) (free)
DEBUG_STACK[001] = init_buffer(0x8359060,(nil))
################################################################################
*** glibc detected *** tt++: corrupted double-linked list: 0x08384728 ***
======= Backtrace: =========
/lib/libc.so.6[0xb989be]
/lib/libc.so.6(cfree+0x90)[0xb9bfc0]
tt++[0x804b960]
tt++[0x806276d]
tt++[0x8055ce8]
tt++[0x80528ca]
tt++[0x805254c]
tt++[0x804eb09]
/lib/libc.so.6(__libc_start_main+0xdc)[0xb47dec]
tt++[0x80496a1]


Here is my config file for that session. Its mostly normal stuff, or stuff I asked for help with here on the fourms.

Code:

#EVENT            {SESSION CONNECTED}     {#scan /home/six/ttbuffer/lsw_buffer.log}
#EVENT            {SESSION DISCONNECTED}  {#buffer write /home/six/ttbuffer/lsw_buffer.log}
#MACRO            {\e[11~}                {#ses lsw <host and port> ;usn;pass;l;l;#split}  {^[[11~}

#alias {log}
{
        #if {"%0" == "on"}
        {
                #if {"$logging" != "on"}
                {
                        #format {time} {%T};
                        #format {logfile} {/home/six/ttlogs/lsw/%d.html} {$time};
                        #log append $logfile;
                        #var logging on
                }
                {
                        #showme You are already logging.
                }
        };
        #if {"%0" == "off"}
        {
                #if {"$logging" == "on"}
                {
                        #log;
                        #var logging off
                }
                {
                        #showme You are not logging.
                }
        };
        #if {"%0" != "off" && "%0" != "on"}
        {
                #showme Turn log on or off?
        }
}
#script echo "#var HOME $HOME"
#history read $HOME/.lsw.tt_history
#event {PROGRAM TERMINATION} {#history write $HOME/.lsw.tt_history}


Version 1.97.5 (? don't remember) never had any errors on session disconnect.

Most of the time, it does come from strhash.c on line 90. I'll watch it and see if I can get diffrent errors.
If you want any more information I'll gladly provide it.

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


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Sun Jun 29, 2008 10:38 am    Post subject: Reply with quote

I have no idea what could be causing this.

Make sure you do a clean compile however, type: make clean, then make again, and see if that helps.
Back to top
View user's profile Send private message Send e-mail
ayuri



Joined: 10 Jul 2007
Posts: 14

PostPosted: Sun Jun 29, 2008 12:17 pm    Post subject: Reply with quote

Ok, did as you suggested make clean and rebuild no problems.

Fired it up again, and under the normal in game 'quit' it blew up with same error. So, I started to nuke items from my config file.

After removing:
Code:

#EVENT            {SESSION CONNECTED}     {#scan /home/six/ttbuffer/lsw_buffer.log}


I can quit the game with no problems. What is the max buffer size supported by tintin in the #CONFIG {BUFFER SIZE} option? I think I may be going over it and that could be where the problem is coming from. I like to have a huge scroll back buffer in case there is something I need to look for that happned a few days in the past.

In further testing, only in that config file do I get the errors above. I have another config thats similar; does not do any actual logging. Just saves and scans the scroll back buffers on connect/disconnect. In both cases the buffer limit is set to 900000 (I know I could dig into the source to check but I'd likely end up looking at the wrong spot) but instead of going to /home/six/ttbuffer/ it goes directly in to /home/six
Code:

#event {SESSION DISCONNECTED} {#buffer write lsw_2_buffer.log}
#event {SESSION CONNECTED} {#scan lsw_2_buffer.log}


Thanks for the help.
Back to top
View user's profile Send private message
ayuri



Joined: 10 Jul 2007
Posts: 14

PostPosted: Sun Jun 29, 2008 12:38 pm    Post subject: Reply with quote

Ok, so just for fun I dropped my buffer down to 10000 lines. Also note my log format is in html. Does that effect the type of output that gets wrote via #buffer write? Reason why I'm asking, after dumping it down to 10000 lines, I looked into the scrollback and it seems to be all html formatting. Grrr!

Thanks again - and I'll keep looking into things as best as I can.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Sun Jun 29, 2008 2:24 pm    Post subject: Reply with quote

999999 lines is the maximum, and you'd want to use the default 'raw' logging format if you use #scan.

Can you try the following:

Edit tintin.h and go to somewhere around row 703, and change 'unsigned short count;' to: 'unsigned int cnt' in the str_hash_data struct.

Do a clean compile after that and it might stop crashing. If you set the buffer size to 100.000 lines or lower tintin should be alright as well.
Back to top
View user's profile Send private message Send e-mail
ayuri



Joined: 10 Jul 2007
Posts: 14

PostPosted: Sun Jun 29, 2008 2:34 pm    Post subject: Reply with quote

Thanks for the tip - I'll adjust my buffer to about 40k lines or so, I think that should be fine.

Also, would there be an easy way to have the output buffer being wrote as raw while the log buffer is html?

Its just easier for me to review logs/submit them for points if they are in html. I can just fire off the entire log in an email rather than having to actually "work" at editing it. Or should I make a new topic under Feature Requests? (Don't know how many people would actually use that however.)

Thanks for the help.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Sun Jun 29, 2008 7:24 pm    Post subject: Reply with quote

The following should work:

#alias {logbuffer %0} {#config log html;#buffer write %0;#config log raw}


I've updated the buffer write command so it won't show a message when used in an alias or action, but for now you could add: #gag {^#OK: WRITING BUFFER TO '%s'}
Back to top
View user's profile Send private message Send e-mail
ayuri



Joined: 10 Jul 2007
Posts: 14

PostPosted: Sun Jul 06, 2008 3:02 am    Post subject: Reply with quote

Sorry for the late reply:

So, I basically gave up for the history buffer in between sessions for an actual log of actions. Not really a problem, but sometimes its just easier to look back and see what was going on.

Thanks for the help!
Back to top
View user's profile Send private message
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