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
➜ coinduct,induct,cooutcast,outcast problem
coinduct,induct,cooutcast,outcast problem
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Straud
(62 posts) Bio
|
Date
| Thu 26 Jul 2001 02:46 AM (UTC) |
Message
| okay myself and the head of the building council can't seem to be able to use the coinduct command we are 10 levels higher than the lvl requirement given in commands.dat but whenever we try it says huh? this is also the case with induct command but it will get logged then say huh and the person won't get inducted we also meet the lvl requirements for this command any idea what the problem coulbe be recently I increase the amount of levels from 65 to 100 and had changed the level requirements for all the commands and saved them could that have something to do with it? | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Thu 26 Jul 2001 03:12 AM (UTC) |
Message
| There is already a lengthy discussion about "induct" on this forum. Click on the "search the forum" link below and search for "induct".
If that doesn't solve your problem, let us know. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Straud
(62 posts) Bio
|
Date
| Reply #2 on Thu 26 Jul 2001 03:58 AM (UTC) |
Message
| Okay i did what you suggested in the forum discussion you directed me to adding I added Council builders council to my builders player file and now whenever he tries to log on ot crashes the MUD server so I changed it back and he can log in fine | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #3 on Thu 26 Jul 2001 06:31 AM (UTC) |
Message
| It will be faster and easier in the long run if you work out how to debug these problems yourself. One helpful thing to use is gdb (GNU debugger). To demonstrate this I deliberately added a bug to SMAUG, and connected.
The bug I added was in "nanny" in comm.c, like this:
1743 ch = d->character;
1744
1745 d = NULL; // deliberate bug
1746 switch ( d->connected )
1747 {
1748
1749 default:
1750 bug( "Nanny: bad d->connected %d.", d->connected );
The line I added at line 1745 set the pointer "d" to NULL, which I expected to crash the server when a player logged in, because at line 1746 it would have a NULL dereference.
I started the server up:
cd ../area
../src/smaug
... and sure enough, when I connected, I saw this message:
... initialising stuff here ...
Thu Jul 26 16:06:17 2001 :: Done.
Thu Jul 26 16:06:17 2001 :: Loading Colors
Thu Jul 26 16:06:17 2001 :: Initializing socket
Thu Jul 26 16:06:17 2001 :: (Name Not Set) ready at address bacall on port 4000.
Thu Jul 26 16:06:30 2001 :: Sock.sinaddr: 10.0.0.3, port 1148.
Segmentation fault (core dumped)
Time to use the debugger. I typed:
bash-2.04$ gdb ../src/smaug smaug.core
... and saw this ...
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd2.9"...
Core was generated by `smaug'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.so...done.
Reading symbols from /usr/lib/libc.so.26.2...done.
#0 0x7ab60 in nanny (d=0x0, argument=0xdfbfd708 "gandalf") at comm.c:1746
1746 switch ( d->connected )
The important lines are the last two (in bold). They show that the crash was in module comm.c at line 1746 (which is what I expected in this case). You can see the source line in question, and also the arguments to the function (d is NULL, and "argument" is "gandalf").
Next thing is to try a "backtrace" (bt) which shows where this was called from (which could be helpful):
(gdb) bt
#0 0x7ab60 in nanny (d=0x0, argument=0xdfbfd708 "gandalf") at comm.c:1746
#1 0x78165 in game_loop () at comm.c:731
#2 0x77347 in main (argc=1, argv=0xdfbfdc0c) at comm.c:316
This shows that:
main --> game_loop --> nanny
You can type "info local" to see local variables:
(gdb) info local
ch = (CHAR_DATA *) 0x0
pwdnew = 0x5cc000 ""
p = 0x401d83d4 ""
iClass = 0
iRace = 0
fOld = 0 '\000'
chk = 212 'Ô'
You can print the contents of a variable:
(gdb) print argument
$3 = 0xdfbfd708 "gandalf"
You can also do fancy things before the program crashes, such as setting breakpoints and stepping through the code. To do this start the server without a core file, and then type "run" (after setting any wanted breakpoints with "break").
|
- 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.
15,211 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top