Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, DotBot

Members: 0
Guests: 5
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » General Discussions » Corrupt player files; freezes...
Forum Rules | Mark all | Recent Posts

Corrupt player files; freezes MUD?
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Mar 3, 2006, 2:59 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

If a player file doesn't contain #END (due to unable to write the file, IE quota is reached), the MUD freezes or something weird.
#0  0x00b9d402 in ?? ()
#1  0x00a0ca83 in __read_nocancel () from /lib/libc.so.6
#2  0x009b0731 in _IO_file_read_internal () from /lib/libc.so.6
#3  0x009af57c in _IO_new_file_underflow () from /lib/libc.so.6
#4  0x009b17a3 in _IO_default_uflow_internal () from /lib/libc.so.6
#5  0x009b15d6 in __uflow () from /lib/libc.so.6
#6  0x009acc56 in getc () from /lib/libc.so.6
#7  0x080d0e55 in bug (str=0x81af638 "fread_word: EOF encountered on read.\n\r";) at db.c:4273
#8  0x080d03a9 in fread_word (fp=0x8b93318) at db.c:3721
#9  0x0812ec4c in fread_obj (ch=0x8b43f60, fp=0x8b93318, os_type=0) at save.c:2114
#10 0x0812a9d9 in load_char_obj (d=0x8d15308, name=0xbf9fe4cc "Hobson", preload=0 '\0', copyover=0 '\0') at save.c:1008
#11 0x080c183c in nanny (d=0x8d15308, argument=0xbf9ff514 "nicksteph4e";) at comm.c:2539
#12 0x080bf6e0 in game_loop () at comm.c:1230
#13 0x080bea97 in main (argc=5, argv=0xbfa00a74) at comm.c:597


This is a problem because I don't know what player files are going to do this. Is there anyway to fix this so it doesn't freeze the MUD, and maybe just aborts the player loadup?
       
Post is unread #2 Mar 3, 2006, 4:04 pm   Last edited Mar 3, 2006, 4:05 pm by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

Well I created a pfile named Test, with nothing in it everything worked fine.
Just to be a little annoying opened it and put nothing more then Name Test~ into it and then slowly worked on adding in some logs to find out where it was going bad.
Fri Mar  3 18:55:57 2006 :: Sock.sinaddr:  127.0.0.1, port 2451.
Fri Mar  3 18:55:59 2006 :: Preloading player data for: Test (0K)
Fri Mar  3 18:55:59 2006 :: load_char_obj: Char Test before fread_letter
Fri Mar  3 18:55:59 2006 :: load_char_obj: Char Test after fread_letter
Fri Mar  3 18:55:59 2006 :: load_char_obj: Char Test after * and before #
Fri Mar  3 18:55:59 2006 :: load_char_obj: Char Test in !# before bug message

Program received signal SIGINT, Interrupt.
[Switching to thread 1260.0x90c]
0x7c874fed in KERNEL32!GetConsoleCharType () from /cygdrive/i/WINDOWS/system32/kernel32.dll
(gdb) quit
The program is running.  Exit anyway? (y or n) y

Fri Mar  3 18:57:08 2006 :: Sock.sinaddr:  127.0.0.1, port 2452.
Fri Mar  3 18:57:09 2006 :: Preloading player data for: Test (0K)
Fri Mar  3 18:57:09 2006 :: load_char_obj: Char Test before fread_letter
Fri Mar  3 18:57:09 2006 :: load_char_obj: Char Test after fread_letter
Fri Mar  3 18:57:09 2006 :: load_char_obj: Char Test after * and before #
Fri Mar  3 18:57:09 2006 :: load_char_obj: Char Test in !# before bug message
Fri Mar  3 18:57:09 2006 :: load_char_obj: # not found in (Test).
Fri Mar  3 18:57:09 2006 :: load_char_obj: Char Test in !# after bug message
Fri Mar  3 18:57:09 2006 :: load_char_obj: Char Test in !found
Fri Mar  3 18:57:09 2006 :: load_char_obj: Char Test before update_aris
Fri Mar  3 18:57:09 2006 :: load_char_obj: Char Test after update_aris

I Found that it normaly stopped at the bug message there
when I changed the bug message to a log_printf it went past it fine.
And that was the only thing that changed between the two log parts I am showing here.
lol its a wierd little thing, im open to suggestions on it all. :)
It went fine after I changed it, even told me that no such pfile exist :)
       
Post is unread #3 Mar 3, 2006, 4:08 pm   Last edited Mar 3, 2006, 4:23 pm by Zeno
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

To be specific, this would happen when the file was cut off in the middle of their item list in the pfile. Here's the end of a pfile that does it:
#OBJECT
Vnum         2182
Level        1
Values       60 0 0 50 0 0
End

#OBJECT
Nest         1
Count
       
Post is unread #4 Mar 3, 2006, 7:42 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

Yea, I have been testing it a good bit. All of the stuff needs to be set to correctly handle '\0' as well as theres something to do with the bug function that loops it up. When the end isn't found. Mine will now handle it correctly if it has the problem, but ive done so much changing its hard to say which worked. Im going to work in the changes one by one etc... on a stock smaug and see exactly which one you have to fix for it to work right :)
       
Post is unread #5 Mar 3, 2006, 9:18 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

Try the fix I posted for the bug function, it took alot of the old fashioned add a log here and there and see where it was and wasn't getting but finaly found at least one major issue that had to be fixed. Hopefully that will help it stop from looping your mud because of bad pfiles. If not at least its one problem down.
       
Pages:<< prev 1 next >>