Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Running the server
➜ Strange crash with missing data
Strange crash with missing data
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Wed 25 Jun 2008 06:04 PM (UTC) Amended on Wed 25 Jun 2008 06:10 PM (UTC) by Zeno
|
Message
| I haven't seen this in years. I thought it was fixed.
(gdb) bt
#0 0x00000000004d86a6 in get_trust (ch=0x20b8070) at handler.c:142
#1 0x0000000000404c86 in to_channel (argument=0x7fff92ed5af0 "Kyoshiro dropped &RA broken piece of ruby&d in room 4484.",
channel=14, verb=0x5fc8ea "Surveillance", level=101) at act_comm.c:770
#2 0x0000000000436cf6 in do_drop (ch=0x20b91e0, argument=0x7fff92ed8078 "") at act_obj.c:1295
#3 0x00000000004ecd48 in interpret (ch=0x20b91e0, argument=0x7fff92ed8075 "all") at interp.c:598
#4 0x000000000049f49f in game_loop () at comm.c:1278
#5 0x000000000049e0ba in main (argc=2, argv=0x7fff92eda648) at comm.c:626
(gdb) f 3
#3 0x00000000004ecd48 in interpret (ch=0x20b91e0, argument=0x7fff92ed8075 "all") at interp.c:598
598 (*cmd->do_fun) ( ch, argument );
(gdb) p ch->name
$18 = 0x1fed960 "Kyoshiro"
(gdb) p ch->pcdata
$19 = (PC_DATA *) 0x20bf320
(gdb) f 2
#2 0x0000000000436cf6 in do_drop (ch=0x20b91e0, argument=0x7fff92ed8078 "") at act_obj.c:1295
1295 to_channel( buf, CHANNEL_SURVEILLANCE, "Surveillance", LEVEL_IMMORTAL );
(gdb) p ch->name
$20 = 0x1fed960 "Kyoshiro"
(gdb) p ch->pcdata
$21 = (PC_DATA *) 0x20bf320
(gdb) f 1
#1 0x0000000000404c86 in to_channel (argument=0x7fff92ed5af0 "Kyoshiro dropped &RA broken piece of ruby&d in room 4484.",
channel=14, verb=0x5fc8ea "Surveillance", level=101) at act_comm.c:770
770 if ( !IS_IMMORTAL(vch)
(gdb) list
765 och = d->original ? d->original : d->character;
766 vch = d->character;
767
768 if ( !och || !vch )
769 continue;
770 if ( !IS_IMMORTAL(vch)
771 || ( get_trust(vch) < sysdata.build_level && channel == CHANNEL_BUILD )
772 || ( get_trust(vch) < sysdata.log_level
773 && ( channel == CHANNEL_LOG || channel == CHANNEL_CONTACT ||channel == CHANNEL_COMM) ) )
774 continue;
(gdb) p vch->name
$22 = 0x0
(gdb) p d->character->name
$27 = 0x0
(gdb) p vch->pcdata
$23 = (PC_DATA *) 0x0
So it looks like here is where we had issues. What happened to the character data?
(gdb) f 0
#0 0x00000000004d86a6 in get_trust (ch=0x20b8070) at handler.c:142
142 if ( ch->desc && ch->desc->original )
(gdb) p ch
$24 = (CHAR_DATA *) 0x20b8070
(gdb) p ch->desc
$25 = (DESCRIPTOR_DATA *) 0x697261762065726f
(gdb) p ch->desc->original
Cannot access memory at address 0x697261762065728f
(gdb)
The crash was obviously due to the issue with original.
But the question is, how was it corrupted?
[EDIT] Oh, it doesn't look like Kyoshiro was the issue. It was looping through the descs in f1. So we had a corrupt desc...
Valgrind won't be catching this seeing as how it rarely happens.
Can I print all the desc's in gdb? I can do first_descriptor->next but I hit a null one at the 3rd one and can't do another ->next |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Thu 26 Jun 2008 01:05 AM (UTC) |
Message
| Well my gdb post showed how you can iterate through a list (I did inventory I think) but if the list is corrupted, there isn't much you can do. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
10,755 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top