Bugs during boot (Planes.dat and IMC-help stuff)

Posted by Zagreus on Thu 08 Feb 2007 10:00 PM — 25 posts, 109,708 views.

#0
Not sure if this falls under compiling or running, but since I compiled without error and am getting these bugs while I try to run, I'm posting here. :)

Anyway, hi all. I haven't fiddled with SMAUG in well over 5 years, but got kinda bored the other day and went ahead and got into it. I'm running SMAUG 1.4a from this website (http://www.gammon.com.au/files/smaug/smaug1.4a.zip and and http://www.gammon.com.au/files/smaug/smaug1.4a.sce.zip, as the first one didn't seem to have a src directory), and have compiled under MSVC++ .NET 2003 without problems.

When I run the smaug executable file from the first .zip file I mentioned, it works just great. However, when I replace it with my own from the second .zip file (Using 100% unmodified source, compiled without errors) I've got a few annoying bugs that I haven't been able to squish yet. I've searched a few websites and found a couple possible solutions, but none of them worked.

Problem 1)
Thu Feb 08 16:45:34 2007 :: Reading in plane file...
Thu Feb 08 16:45:34 2007 :: [*****] BUG: load_planes: can't open plane file for read.

What I tried)
I created a new file named planes.dat in the system folder, opened it in notepad, and made it like so:

#PLANE
END
#END

When I tried this attempted fix, all it did was cause the server to halt at Reading in plane file... Can anyone tell me how to build a working, blank, planes file? I also tried just #END, and just #PLANE and #END without the end in the middle.


Problem 2)
A boatload of bugs about duplicate entries in imc-help.are and ice-help.are. I looked at the .are files in notepad and only saw one entry for each help topic... it confuses me.

Problem 3)
My game.log file in my log directory isn't updating properly. First it was just cutting off stuff at the bottom and not showing the most recent stuff, but after I shutdown my mud and later brought it back up, it hasn't updated at all. I have NO clue what could possibly be causing this. Where should I check?

If anyone would be able to offer some insight on these problems, I'd greatly appreciate it! I feel kinda rusty, as it's really been a long time since I've messed with this kind of stuff.
USA #1
Before anything, why not use SmaugFUSS? I'd highly recommend it.
USA #2
For problem #1, why not just copy planes.dat from the working directory? Are you sure you are running everything from the right places?

To run SMAUG, you should have a directory structure like this:
smaug/
smaug/src (this is where the exe is)
smaug/area
smaug/players
smaug/system
and so forth.

To run it, you normally go into area, and run ../src/smaug.


Problem #2: not sure. Did both files come from the same distribution?

Problem #3: not entirely sure either.


You're running all this under Windows, right? I'd highly recommend getting Cygwin running, since a lot of this is really, really meant to run first and foremost on Cygwin, and all pure-Windows copies are "at your own risk" (even moreso than the Unix-family versions).
#3
Thanks for the info. I'm positive everythings in the right directories though, and the way you explained it is the way that I'm doing it.

I took the planes.dat from SmaugFUSS and that worked... Which is really strange, cause I looked at it and that is EXACTLY how I had mine set up at one time (Like I said, I tried different variations with #END, and that was one of them).

As for IMC and ICE helpfile errors, I just deleted the two .are files and removed any reference from them in the area.lst. All the help topics are still there (no clue where it's getting them from), and no more bugs on boot. So I guess that's okay now.


Thanks for the suggestionm on using SmaugFUSS. I'm sure it's great, but I didn't really see the point in trying to use it when the other one was already set up for visual studio. I hate not having an IDE to work with. :)

Besides, the two are mostly the same, right? Isn't SmaugFUSS just a bunch of bugfixes? I plan on gutting out a pretty large chunk of the stock system, so I'm not sure how many of those fixes will really affect me anyway.

Edit: Finally got the game log working again. Looks like it only writes to the log file if you run it as a service (through smaug /start or the control panel - which is fine by my, I was only running it from the command prompt so I could monitor it in real time.)
Amended on Fri 09 Feb 2007 08:02 AM by Zagreus
USA #4
For planes.dat, you probably didn't have exactly the same file; you might have missed a terminating newline, for instance. Well, in any case, that problem is solved now. :)

Not sure about the area files, but again good that it got fixed.

SMAUGfuss is not just a bunch of bugfixes; it is active support, too. It's why one of the most common replies to people using stock SMAUG is "have you tried FUSS"; it's just that most of us are moving towards it, some people exclusively, and supporting 'legacy code' is extra work. Of course, Windows adds an extra level of headache, because as far as I know, none of the regulars run SMAUG purely on Windows and instead, if they run under Windows at all, use Cygwin or something like that.

Some of the fixes are very far-reaching and affect core architecture. Of course, some fixes might not be relevant depending on what you take out, but you'd have to remove an incredible amount to not get some fairly important fixes.

(This log file problem is an example issue with Windows, by the way.)
#5
I understand what you mean about SmaugFUSS, and I certainly didn't mean to talk it down and hope I didn't offend the people who worked so hard to get it to what it is.

I'll give FUSS another try later today. Even though I'm quite attached to the Visual Studio IDE, I can always do my editing/creating in there and all my compiling in Cygwin. I just won't be able to use certain features, but those are probably the ones I don't use much anyway. :)
USA #6
Oh, it didn't sound like you were putting down SMAUGfuss (not to me, at least). So no offense taken. :)

You know, I worked for a pretty long time in Visual Studio, compiling in Cygwin, before eventually moving to pure Cygwin development. There weren't that many reasons for sticking to Visual Studio, and as I got more and more proficient with vim, getting some of the fairly advanced features working, there were actually reasons to use vim instead of VS.

One big reason to use VS for me was Intellisense, but using a good tags file and a vim plugin lets you have an equivalent in vim. The light shone strong on the day I discovered that. :-)

What you should do, if you care, is to make a list of the VS features that you actually use. Then you can perhaps post them here and ask if anybody knows how to get equivalents in vi or emacs or whatever.

Besides, being comfortable in Cygwin is a good thing anyhow, in case you ever decide to host your MUD on a remote server that will almost invariably be Unix-based. Knowing Cygwin will give you a massive head start, in the sense that you will already be familiar with the shell environment and will be comfortable using the text-only editors like vi and emacs; that will let you edit files on the remote server without having to continuously shuttle files back and forth with ftp.
#7
Got SmaugFUSS 17 up and running, there seems to be a few out of the box bugs.

First, as a thief, when I do an slist:
Fri Feb 9 11:58:33 2007 :: [*****] BUG: do_slist: skill with invalid minpos, skill=aggressive style

Now, like I said earlier, it's been many years since I've messed with SMAUG. I remember that I can do an sset (sn) minpos 0 in order to fix this. But I can't for the life of me remember how to find out what a skills SN is. I looked at skills.dat and it either doesn't say, or I somehow missed it. Isn't there some kind of command to find a skills sn by name?

Along the same lines, I've got some skill bugs during boot. I'm curious if this is related to my aggressive style problem, and how many other of my skills are messed up. Do you think maybe the skills.dat in the download from this website is corrupted or something? I didn't even open it to look at it until after I saw these bugs, so I'm using a completely unmodified version from http://www.gammon.com.au/files/smaug/smaug17fuss.tgz.

Fri Feb 9 11:51:18 2007 :: Loading skill table
Fri Feb 9 11:51:18 2007 :: [*****] BUG: Fread_skill: no match: Author
Fri Feb 9 11:51:18 2007 :: [*****] BUG: Fread_skill: no match: ~
Fri Feb 9 11:51:18 2007 :: [*****] BUG: Fread_skill: no match: ~
Fri Feb 9 11:51:18 2007 :: [*****] BUG: Fread_skill: no match: Author
Fri Feb 9 11:51:18 2007 :: [*****] BUG: Fread_skill: no match: ~
Fri Feb 9 11:51:18 2007 :: [*****] BUG: Fread_skill: no match: ~

I wish those bug messages would mention line numbers or something. How would I go about checking my skills.dat for problems?

And the final problem has to do with IMC, which I'm not planning on using, so I'll worry about that later. :)
Fri Feb 9 11:51:19 2007 :: IMC: imcfread_word: EOF encountered on read.




David, thanks for the info on VIM. To be honest, I haven't used a text-only editor in over 10 years. I have NO clue how to use VIM, but I'll check it out anyway. :) Does it have syntax highlighting? That's pretty big on my preference list. My eyes are kinda bad and I need purdy colors to help me see things easier.
USA #8
Hmm. That is very strange. SMAUGfuss loads perfectly fine out of the box for me. Maybe you should try the version from the FUSS project directly:

http://www.fussproject.org/index.php?a=files&s=viewfile&fid=1

I downloaded that just a few days ago and it all worked without issues.
What you're seeing is actually rather worrisome, it really, really shouldn't be happening if all you did was:

(a) extract the archive
(b) go to src and compile
(c) start the MUD using startup script or going to area and typing ../src/smaug

Anyhow, you can sset with the skill name as well. If it's a several-word name, you need quotes. E.g. sset "aggressive style" minpos 0.

There should also be a command like slookup or something that shows you the skill info. (Have you checked the wiki section on these forums with all the command information? It's pretty helpful stuff. See: http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=115)


As for vim, it most definitely has syntax coloring. :-) (I really, really don't like working without syntax coloring.) vim is an extremely powerful editor; it can do oodles of stuff, including things you might not even know you need! :) Of course, you pay for that by having to spend some time learning it all...
#9
That whole A B and C thing, that's exactly what I did. Well, uncommenting out that cygwin line in the makefile too.

I'll try from the other website, thanks.

And slookup is the command I was looking for. Thanks again! I'll take some time to read through that command list and re-familiarize myself with everything. It's amazing that I used to think myself somewhat proficient at this stuff, and now I feel like a total n00b.
#10
I'm cursed...

I got the file from http://www.fussproject.org/index.php?a=files&s=viewfile&fid=1 and tried extracting it with winrar. Receieved a message stating that it was corrupt, so I thought "Well, maybe winrar just doesn't handle these files well, after all, it wasn't made in windows".


So, I redownloaded it on my server (just to be on the safe side incase winrar messed anything up or that there as something wrong with my workstation), and tried tar -xzf smaug17fuss.tgz under cygwin, and got the following:

gzip: stdin: unexpected enf of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

So my options are either something I can't extract from fussproject.org, or something with a messed up skills table from gammon.com.au. The thing is though... why is this only happening to me? You said you were able to get a fresh copy of smaugfuss 17 up and running a few days ago? There has to be something with my proceedures. I am not above blaming myelf and calling user error. But what frustrates me is I can't tell what it is.

Does cygwin use like a different filesystem or something? Is it bad for me to just download the tgz to a generic downloads directory using firefox, use winrar to extract it to c:\cygwin\home\Owner, then doing the rest through an xterm console?

I thought maybe there was a problem somewhere in those proceedures I just mentioned, so I tried downloading it directly to my c:\cygwin\home\Owner and using tar -xzf isntead of winrar, but it produced the same results (one from this website had bugs during boot, one from fussproject.org wouldn't extract).


On another note, I used vim for my first time... It was the most confusing thing I've ever seen. Fortunately http://vimdoc.sourceforge.net/htmldoc/usr_02.html really cleared it up a lot.
USA #11
Oh, yeah. I did have a problem with the SMAUGfuss download. Apparently it does not report its size correctly, and some download programs trust the reported size, instead of continuing the download until the server stops it.

How did you download the file? I think that I used wget and that caused problems, and Firefox worked, but I could be remembering incorrectly.

But no, this isn't a problem with how you're extracting it, or Cygwin managing files differently. It's an issue with the download.

For vi, Nick also has a great guide here:
http://www.gammon.com.au/smaug/vi.htm
USA #12
Just for giggles, try gunzip -xzf instead of tar. IIRC tar doesnt unpack particularly well if it's a gzip package.
USA #13
I've never, ever had trouble with tar incorrectly unpacking a gzip package. And it's not surprising, either, because the unpacking is handled by talking directly to gunzip.

Besides when I had this same problem, I tried gunzipping it first, and that didn't work; the download really was of the wrong size.
#14
First, I want to thank you so much for your patience and kindness in reading over my posts and responding to them all. I really didn't think this would be such a long and drawn out issue. I just wanted to get a smaug server up and running without any noticable bugs. :)


Now for the latest developments...

To answer your question, I tried downloading the file both with firefox 1.5 and Internet Explorer 7.

I'm not familiar with wget, but I typed it out in my xterm console and figured it out. However, the fuss project's download section hides the path of the files. The download link is pointing to a php file, not the actual file that I want to get, so I don't really have anything to type after the wget (I did manage to successfully download the php file though.) :)

As for the trying gunzip instead, -x and -z are not valid options. I tried gunzip -d smaug17fuss.tgz and got the same thing about an unexpected end of file. If the problem is as David states, then it really won't matter how I try uncompress it, as I only have a partial copy of the file. Thanks for the help though.
USA #15
No problem. :-)

Let's try to isolate the problem first. So, let's check that your download was in fact bad, then we can worry about fixing it. If the download was correct, we have other problems to worry about. :-)

Here is how big my archive is:
[david@thebalrog:~/incoming]$ ls -l smaug17fuss.tgz                               [15:03]
-rw-r--r-- 1 david david 2648997 2007-01-12 15:27 smaug17fuss.tgz


So it's 2.6mb. If I remember correctly, the incorrect download was only getting some 1.something megabytes.


One thing to try is to clear your browser caches before trying to redownload.

If that still doesn't work, try downloading this:
http://binarygoblin.stanford.edu/~david/tmp/smaug17fuss.zip

Once you have it, rename it to a .tgz file and extract as normal. (And please let me know so that I can remove the file.)

The hope is to give you an alternate download of the same file, so that whatever is confusing the download from fussproject.org might not be confusing it from my server.
#16
Yeah, it was definately a bad download. Mine was a megabyte short. I didn't think about trying to clear the cache, but considering I downloaded it from two different computers using two different browsers at two different times, I don't think that'd make such a huge difference. I'll go ahead and do it just for kicks to see what happens though.

Got the zip from your site. It appears to be working great, thanks.

One minor issue is for some reason it's being built as smaug.exe now instead of just smaug, so the startup script doesn't work. But that's just a quick edit to startup to add the .exe to the end.


So, it looks like it's running! No skill bugs whatsoever. Still that EOF on the IMC stuff, but that's probably just cause there are no settings for it to read yet or something. I should have just disabled IMC in the makefile.


Also, The more and the more I use vim, the more and more I love it! Thanks for showing it to me! (using gvim now).
USA #17
I really wonder why it is that the download didn't work right. Samson, if you're reading this, do you have any ideas?

Glad to hear that you were able to get the file from me, though. And I'm very reassured that there were no bugs! (Nick -- any idea what is wrong with your archive?)

I think smaug.exe is an artifact of using Cygwin. I think it does that so that you can double-click the exes and make Windows happy, but I'm not sure.

About IMC: I think you are correct about that. I have never used IMC, though, so I don't really know how to fix it.

I'm glad that you like vim: another convert!! :-P
Seriously though, it's a nice editor. At some point, I'll be uploading my .vimrc file; you might want to take a look. It has lots and lots of settings that, while my personal preference, might be interesting because
(a) you might not have known about the setting
(b) you might not have thought about the setting yet
My .vimrc file was constructed over years and years, mainly be following other people's examples and searching wide and far on the net to figure out how to do a particular feature. So if I can save others a little time, why not? :)
Australia Forum Administrator #18
Quote:

ls -l smaug17fuss.tgz [15:03]
-rw-r--r-- 1 david david 2648997 2007-01-12 15:27 smaug17fuss.tgz

(Nick -- any idea what is wrong with your archive?)


First, let's try to clear up which is the "correct" version. According to the SMAUGfuss web site:


Smaug FUSS 1.7

Description:
The SMAUG 1.7 FUSS Codebase. This is the main distribution for the SMAUG FUSS Project code.

Author: Community Submitted by: Samson
File Size: 1452 KB Date Added: Sep 17, 2006


You can see from that comment, that the official size of the smaug17fuss.tgz download is 1452 Kb, not over 2 Mb.

If I log onto my web server this is what I see:


$ ls -l smaug17fuss.tgz
-rw-r--r--    1 username   groupname   1514674 Jul 20  2006 smaug17fuss.tgz


$ md5sum smaug17fuss.tgz
1fb2022148f2e3876bcc30144c4ab8d1  smaug17fuss.tgz


I tried to unzip this same file (that is, my local copy which has the same md5sum) using Winzip, and it unzipped without any errors.

The interesting thing however is that I re-downloaded smaug17fuss.tgz from www.fussproject.org, and this time the file size was: 1,497,827 bytes.

Also when I try to open that with WinZip I got the error message "Invalid compressed data - unable to inflate".

So it seems to me that the copy on fussproject is actually the corrupt one.

If you download the copy from this site (the www.gammon.com.au site), and get a file size of 1514674 and get an md5sum of 1fb2022148f2e3876bcc30144c4ab8d1, you should have a good copy.

David, I'm not sure what your 2,648,997 byte file is. :)
Amended on Sat 10 Feb 2007 03:25 AM by Nick Gammon
USA #19
The 2.5 mb file is what I got from the FUSS project site. My point is that the site incorrectly reports the size, causing some download managers to fail to download the whole thing, thus giving you only a partial file -- which of course will not extract correctly.

The FUSS project file isn't corrupt, but the reported size is wrong, causing some programs to only download the first 1.5 mb of the file.

Here is what I see when I log onto Arthmoor, and look in the codebases directory:

[darkstone@crondonia codebases]$ ls -la
total 21292
drwx---r-x  2 root root    4096 Jan 30 20:56 .
drwxr-xr-x 30 root root    4096 Feb  9 21:45 ..
-rw-r--r--  1 root root 1441006 Nov 14  2003 1stmud40c.tgz
-rw-r--r--  1 root root  967831 Dec 13 20:41 ack431.tgz
-rw-r--r--  1 root root 1949041 Dec 13 20:41 afkmud177.tgz
-rw-r--r--  1 root root 1674484 Jan 30 20:56 afkmud20.tgz
-rw-r--r--  1 root root 3309864 Jul 15  2006 dsouls21.tgz
-rw-r--r--  1 root root 1077583 May 23  2004 envy22.tgz
-rw-r--r--  1 root root 1523750 May  2  2006 lpuni.tgz
-rw-r--r--  1 root root 1758460 May 23  2004 mcloud2.tgz
-rw-r--r--  1 root root  696248 Jul 14  2006 merc22.tgz
-rw-r--r--  1 root root 1128634 May 23  2004 quickmud.tgz
-rw-r--r--  1 root root 1008309 Sep  4  2004 rom24b6.tgz
-rw-r--r--  1 root root 2649642 Jan 30 20:56 smaug17fuss.tgz

As you can see, the Jan 30 version of SMAUGfuss is indeed 2.6 mb. And that file decompresses without a problem.

One thing of note is that version 1.7a has in fact had several iterations, so you can have several file sizes because the contents are not exactly the same.
Australia Forum Administrator #20
How did you get that listing? Do you have an account on that server?

I have tried again to download the file, from the link given on this page:

http://www.fussproject.org/index.php?a=files

Each time, and this is on different PCs, Mac, and Linux, I get around 1.4 Mb.

Now maybe there is a directory on the server that has a correct copy, but my point is that attempting to download, using the supplied link, and using different operating systems, does not serve up a 2+ Mb file.

In addition to that is the comment on that page: "Submitted by: Samson File Size: 1452 KB Date Added: Sep 17, 2006".

Given that, if you download the file, and it is around 1452 Kb, you believe you have the correct file.

Quote:

My point is that the site incorrectly reports the size, causing some download managers to fail to download the whole thing ...


If the site is misleading download managers, effectively it is serving up a corrupted version of the file. Regardless of what file is actually on the server, if it cannot supply the correct information to programs that request to download it, then it is not "supplying" a good copy.
Amended on Sat 10 Feb 2007 07:48 PM by Nick Gammon
USA #21
Quote:
How did you get that listing? Do you have an account on that server?
Yes, Darkstone is hosted with Arthmoor.

Quote:
If the site is misleading download managers, effectively it is serving up a corrupted version of the file. Regardless of what file is actually on the server, if it cannot supply the correct information to programs that request to download it, then it is not "supplying" a good copy.
Well, yes. :-) I think it's broken. I'm not sure why the comment says it's 1.4mb, and I'm not sure why it doesn't serve the whole thing.

Interestingly enough:

When I download it using Lynx, I get the whole file.
But using Firefox, it only gets 1.4mb -- a corrupted file.

I guess that Lynx chooses to ignore the file size supplied by HTTP headers, and just reads until the server closes the connection.

I'm going to file a bug report of sorts on the FUSS project website, since I think this is a major issue...
Australia Forum Administrator #22
Interestingly, I had a not dissimilar problem a while back:

http://www.gammon.com.au/forum/bbshowpost.php?id=7356

This was not directly to do with downloading files, but conceptually similar. Note the quote at the end:

"Also, see RFC 2616:"


8.1.2.1 Negotiation

...

In order to remain persistent, all messages on the connection MUST have a self-defined message length (i.e., one not defined by closure of the connection), as described in section 4.4.


Thus, the download managers that are using the supplied message length (and not awaiting closure of the connection) are behaving correctly, and those that wait for the connection to close are relying on good luck.
USA #23
Samson has just fixed this:
http://www.fussproject.org/index.php?a=topic&t=1108

And yes, you are right, Lynx is technically not doing the right thing; it should be respecting the headers and not trusting the server to close the connection.

Don't you love it when the "right thing" is wrong. :-)
Australia Forum Administrator #24
I have updated my copy on this page:

http://www.gammon.com.au/downloads/dlsmaug.htm

There is also the MD5 sum from the copy I recently obtained from the www.fussproject.org site, and the exact file size.