[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Source of null ch, perhaps

Source of null ch, perhaps

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Mon 31 May 2004 06:41 AM (UTC)
Message
Finally, after a night of testing, I think I may have found the source of my null ch problem. I got this first bug:

#0  flush_buffer (d=0x8356b90, fPrompt=1 '\001') at comm.c:1281
1281            if ( xIS_SET(ch->act, PLR_BLANK) )
(gdb) bt
#0  flush_buffer (d=0x8356b90, fPrompt=1 '\001') at comm.c:1281
#1  0x080aa083 in game_loop () at comm.c:714
#2  0x080a991d in main (argc=8, argv=0xbfffda30) at comm.c:304
#3  0x42015967 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) print ch
$1 = (struct char_data *) 0x0
(gdb) print ch->act
Cannot access memory at address 0xf0


This was after a hotboot, so I thought thats what it was. But after the reboot, it happened again after I attempted to re-create the issue.

Its still hard to determine the issue. Its either poison, or eating. The second crash:


#0  flush_buffer (d=0x8378c58, fPrompt=1 '\001') at comm.c:1281
1281            if ( xIS_SET(ch->act, PLR_BLANK) )
(gdb) bt
#0  flush_buffer (d=0x8378c58, fPrompt=1 '\001') at comm.c:1281
#1  0x080aa083 in game_loop () at comm.c:714
#2  0x080a991d in main (argc=2, argv=0xbfffe9d0) at comm.c:304
#3  0x42015967 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) print ch
$1 = (struct char_data *) 0x0
(gdb) print d
$2 = (struct descriptor_data *) 0x8378c58


Same thing, null ch.

The full HTML color log can be found at:
http://www.dbsaga.com/zeno/nullch.html

The second time, no hotboot, so I can't be hotboot. Maybe its prompt? But I doubt it. Anyways, does it seem like its eat, or poison? Or neither? I'm finally close to solving this.

The other relating topics I had, are:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4255

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4240

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4134

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #1 on Mon 31 May 2004 07:19 AM (UTC)
Message
Say, out of curiosity, what is the 'character update' at the beginning, there?

As far as I can tell, here are the commands you used:
who, chat, look, save, north, say, east, kill, get, eat, aff, aff by.

Also worth your time would be to look at other people's commands that may look at all people.

I'd give a careful look to the who command since that goes over the descriptors. Also look at save, even though that should be so frequent that it would be causing more problems.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #2 on Mon 31 May 2004 07:35 AM (UTC)

Amended on Mon 31 May 2004 07:40 AM (UTC) by Meerclar

Message
Is there anything special that happens to characters at 5th lvl? I'd also take a close look at that plr_blank flag that seems to keep poping up in your crashes.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #3 on Mon 31 May 2004 05:01 PM (UTC)
Message
In the last topic I had, I posted my character update function: http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4255

And I'm pretty sure it was the commands I did, since I got it to crash twice the exact same way. Eating a body part.

Hmm, the who command. I doubt that would make it null though.


And about the plr_blank flag, thats not very important. Its just a flag to check if they have a blank line before the prompt. Since its checking null, it crashes.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #4 on Mon 31 May 2004 05:43 PM (UTC)
Message
I don't see eating a body part at the end of the log before the crash... I don't even see the command to eat a body part at the end of the log. Last command I see is get head then you get your crash message. If the act of eating a body part were the direct cause, your eating of the tongue well before the crash should have dropped the mud. I still wonder if there isn't something attempting to be done to the char at 5th level or if there isn't something with that flag that isn't referencing correctly. As for a problem with poison, unless it's a problem with poisons wearing off I'd say no since you didnt crash the first tick after you got poisoned.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #5 on Mon 31 May 2004 05:49 PM (UTC)
Message
Do you have a *nix system available? Couldn't remember what you were compiling with. If you are using a proper *nix, you might consider running it through valgrind. I have had great success finding memory leaks and overflows with this, it might help you out in this circumstance

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #6 on Mon 31 May 2004 06:03 PM (UTC)
Message
5th level, no, as I said before, I can re-create this crash. The first time, I wasn't level 5, I was 4.

Yeah, this is Redhat I'm using. Valgrind eh? Hmm, I don't know if that would find the problem. but I'll try.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #7 on Mon 31 May 2004 08:30 PM (UTC)
Message
Try recreating the crash, narrowing down onto the bare minimum required commands each time. And you'll have to kick off the other players so that you can be sure to have a 'clean' environment. :)

If you have a memory error that's causing an overflow or something, then chances are Valgrind will find it. And regardless, chances are that it'll find all sorts of other things that you never expected but that are good to have fixed.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #8 on Tue 01 Jun 2004 03:44 AM (UTC)
Message
How true. I found countless leaks. I even at one point put in some code that when the mud is manually shut down, it clears out all the memory of everything. Worked pretty good, found some things like I was writing email to pfiles twice, stuff like that.

There are alot of option availbe for how to use it. I beleive that if you search for valgrind on these forums, you will be able to find a good sequence to use for how to boot with it.

If you got questions on how it works, or how to use it, just ask on here, I'm sure people can help.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #9 on Tue 01 Jun 2004 03:46 AM (UTC)
Message
Nope, I know perfectly well how to use valgrind. Got a file in the area dir that runs it. First I'll try to re-create the crash, with the little amount of cmds possible, with no one on. Then, valgrind.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] 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.


19,580 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]