Register forum user name Search FAQ

Gammon Forum

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 ➜ WEIRD buffer/score bug

WEIRD buffer/score bug

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


Posted by Marowi   (65 posts)  Bio
Date Sat 06 Mar 2004 05:38 PM (UTC)
Message
I was messing around with removing/changing languages - EXACTLY to how some other post here suggested. Anyway, now the third time I type 'score', it crashes. I was getting really frustrated thinking that it was the languages so I restored a backup and did it again.. a few times.

I noticed that the second time I typed 'score', it displayed the last line of text from the room in it.. like so.

"Score for Marowi: The UnknownThe Monitoring Terminal has been installed here.."
"Score for Marowi: The UnknownA message disk has been discarded here.."

Also, if I save, and then type 'score'

"Score for Marowi: The Unknown(null)."

I kept logging on and typing it twice, and doing other stuff, and seeing what would happen the third time. Anyway, I noticed I had a grenade in my inventory, got annoyed, armed it and this came up:

"Log: [*****] BUG: Freeing null pointer
You arm a grenade."

I then threw it, let it blow up, typed 'score' once more, and it crashed. So, I loaded it back up again, but the problem remains. I've also just noticed that if I type 'score' twice in quick succession the same thing happens.

I'll give gdb a quick go, but PLEASE help if you can.
Top

Posted by Marowi   (65 posts)  Bio
Date Reply #1 on Sat 06 Mar 2004 06:00 PM (UTC)
Message
GDB run, here goes:

Program received signal SIGSEGV, Segmentation fault.
0x610cbd11 in strlen () from /home/Marowi/toth/area/cygwin1.dll

Then I did a backtrace and got:

#0 0x610cbd11 in strlen () from /home/Marowi/toth/area/cygwin1.dll

#1 0x610cfadc in wmemset () from /home/Marowi/toth/area/cygwin1.dll

#2 0x610e089e in wmemset ()
from /home/Marowi/toth/area/cygwin1.dll

#3 0x61086211 in ?? ()
in cygwin1!aclcheck () from /home/Marowi/toth/area/cygwin1.dll

#4 0x004d407f in ?? ()

#5 0x0a0c8258 in ?? ()

#6 0x004d34e2 in ?? ()

#7 0x0a0c8b88 in ?? ()

#8 0x00000005 in ?? ()

#9 0x004d5423 in ?? ()

#10 0x004d34e2 in ?? ()

#11 0x00000058 in ?? ()

Now, I have no idea what anything said above means at all, but I'm hoping that you guys have an idea.
Top

Posted by Marowi   (65 posts)  Bio
Date Reply #2 on Sat 06 Mar 2004 06:12 PM (UTC)
Message
I just restored from a backup before I had even touched the languages, or anything in fact. The same problem occurs, I just hadn't realised it because i'd barely used 'score' until I started using it to check out the languages I put in.

AAARGGH!

Marowi
Top

Posted by Marowi   (65 posts)  Bio
Date Reply #3 on Sat 06 Mar 2004 08:20 PM (UTC)
Message
Ok, I am about to demonstrate my inability to read after having not slept in nearly 3 days.

In function 'do_score' in player.c, this is what it read:
ch_printf(ch, "\n\rScore for %s.\n\r", ch->pcdata->title);

As most of you can see, there are two variables called, and only one response. (If you can't see that, come and sit in the corner with me.)

Sorry to waste anyone's time who even read this post.
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #4 on Sat 06 Mar 2004 08:56 PM (UTC)
Message
if this is SWR, then yes, there are indeed two %s in it, what a horroble, horrible bug to be left in. It is usually the very first thing fixed, heh.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #5 on Sat 06 Mar 2004 09:26 PM (UTC)
Message
Is this because there is a %s lurking in ch->pcdata->title? What an evil way to do things...

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #6 on Sun 07 Mar 2004 01:45 AM (UTC)
Message
No, stock SWR usually looks like:

    set_char_color(AT_SCORE, ch);

    ch_printf(ch, "\n\rScore for %s%s.\n\r", ch->pcdata->title);
    set_char_color(AT_SCORE, ch);


Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #7 on Sun 07 Mar 2004 07:50 AM (UTC)
Message
Hah, yeah. I remember that one. It comes with all SWR 1.0 stock distributions. Easily fixed though. I'd still start from SWR 1.0 FUSS, I've found it much much better then stock SWR 1.0.

~Nick Cash
http://www.nick-cash.com
Top

Posted by Typhon   USA  (112 posts)  Bio
Date Reply #8 on Thu 11 Mar 2004 09:04 AM (UTC)
Message
Quote:

No, stock SWR usually looks like:

set_char_color(AT_SCORE, ch);

ch_printf(ch, "\n\rScore for %s%s.\n\r", ch->pcdata->title);
set_char_color(AT_SCORE, ch);

might be stock code and all but someone took out the ch->name before the ch->pcdata->title that was in there
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.


21,830 views.

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

Go to topic:           Search the forum


[Go to top] top

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