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
➜ SMAUG coding
➜ Nanny Problem?
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #15 on Thu 08 Jan 2004 11:49 PM (UTC) |
Message
| Did you run it through GDB? Not analyze the core, but actually run the program with GDB? (as Nick Gammon said to do)
What exact line did you comment out? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #16 on Fri 09 Jan 2004 02:09 AM (UTC) Amended on Fri 09 Jan 2004 02:10 AM (UTC) by Nick Cash
|
Message
| Yes, both the core and running through the program gave that EXACT error. This is the line I ended up commenting out:
Line and surround lines included:
signal( SIGPIPE, SIG_IGN );
signal( SIGALRM, caught_alarm );
/* signal( SIGSEGV, SegVio ); */
signal( SIGTERM, SigTerm ); /* Catch kill signals */
|
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #17 on Fri 09 Jan 2004 02:35 AM (UTC) |
Message
| Did you recompile? (dumb question but I have to ask)
What is the code below the last successful log?
Did you type in "bt" in GDB to get the full backtrace, not just the last function call?
Are you compiling with debug information enabled? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #18 on Fri 09 Jan 2004 04:58 AM (UTC) Amended on Fri 09 Jan 2004 05:04 AM (UTC) by Nick Cash
|
Message
| Yes, I recompiled. (I'm not that new :P)
Yes, I typed bt to get the full back trace. It was the only thing in the stack.
And no, I am not compiling with debug enabled, I've never used it.
Code containing the last successful bug statement:
case CON_PRESS_ENTER:
send_to_pager( "\014", ch );
bug("Enter Has Been Pressed");
if ( IS_IMMORTAL(ch) )
{
send_to_pager( "&WImmortal Message of the Day&w\n\r", ch );
do_help( ch, "imotd" );
}
if ( ch->top_level > 0 )
{
send_to_pager( "\n\r&WMessage of the Day&w\n\r", ch );
do_help( ch, "motd" );
}
if ( ch->top_level >= 600)
{
send_to_pager( "\n\r&WAvatar Message of the Day&w\n\r\n\r", ch );
do_help( ch, "amotd" );
}
if ( ch->top_level == 0 )
do_help( ch, "nmotd" );
send_to_pager( "\n\r&WPress [ENTER] &Y", ch );
d->connected = CON_READ_MOTD;
break;
Like I said before, maybe its a problem with do_help?
Thanks for the help. |
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #19 on Fri 09 Jan 2004 06:13 AM (UTC) |
Message
| It seems odd you don't get a backtrace, but maybe the bug is wiping out the stack.
Compile with debug, I don't recall the option, but it is something like -G 3 (do a man gcc to find it).
Then run under gdb, setting a breakpoint at the last point where you think it works (eg. the last successful message). Then step a line at a time until it crashes. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #20 on Fri 09 Jan 2004 06:40 AM (UTC) |
Message
| I think it's -g3, but as Nick said go check man gcc.
If you're not compiling with debug info, that may be why you don't have any. :P
If you still can't get the stack trace or gdb to work, you can just do this the brute force method. After every function call (every single one, I'm not kidding) in CON_GET_ENTER, add a new log... "Got here #1", "Got here #2" for instance. Look for the last "Got here" and then see what is called immediately after that.
Also put those in CON_GET_MOTD if you make it that far.
This is very similar to the "printf" method. Primitive, but effective. :)
Here's something else you might need to do. Did you make clean and then remake from scratch? If you modified a header file, but did not do a full recompile, it can get broken somewhere. This is not likely to be the case, but it's something to check.
(What happens is that the compiler stores memory address of the struct members. If you change the order of the members but don't recompile all files that access these members, you'll be accessing the wrong ones. This is a pretty complicated concept, though, so the safest rule is to always recompile everything if you change a structure in mud.h) |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #21 on Fri 09 Jan 2004 10:54 PM (UTC) |
Message
| Does the log get flushed to disk after every write?
I think the gdb method should work. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #22 on Sat 10 Jan 2004 03:57 AM (UTC) Amended on Sat 10 Jan 2004 05:59 AM (UTC) by Nick Cash
|
Message
| Hmm. I'll get right to your way Ksilyan here in a bit, trying some other stuff. I just wanted to note something. I just removed all relevent code and support code to the new thing I installed and there was absolutely no change. Just thought I'd note that fact so you don't send me scouring through my asteroid code that I have not yet had the chance to test looking for a bug I wouldn't know of yet. Anyways, on to logging each case. Post back in a few. |
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #23 on Sat 10 Jan 2004 05:36 AM (UTC) |
Message
| I actually think I found the problem, having to do with a notify snippet I installed. If this is really the problem I'm going to kick myself in the face...seriously... |
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #24 on Sat 10 Jan 2004 05:51 AM (UTC) Amended on Sat 10 Jan 2004 05:54 AM (UTC) by Nick Cash
|
Message
| Alright, well, I've at least cleared the notify code of blame. I replaced the entire nanny function with a copy of one from a backup I made just a little under a month ago, with no changes, and it worked fine for the backup. However...for some reason I think I may have corrupted my code or something.
The backup I unzipped and tested works perfectly. Going to transfer some of the source files to the backup and see what happens. |
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #25 on Sat 10 Jan 2004 06:08 AM (UTC) |
Message
| Ok, sorry for so much trouble, and to my standards this is by no means a fix. As to a failure to perform correctly (due to corrupt files or something similar) I transfered the import files that had the changes in them to a backup that was just taken before it started messing up. Now, at least for the moment, the login seems to be working correctly and the mud is responding well to the new installation. Sorry to waste your time. If it does it again I'll spend more time finding the real issue, however, I do think that some of my files were corrupted some how.
Thanks for your effort, lets hope I don't need to renew this post. |
~Nick Cash
http://www.nick-cash.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.
47,435 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top