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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Looking while fighting = crash?

Looking while fighting = crash?

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


Pages: 1 2  

Posted by DjNiVeK   (48 posts)  [Biography] bio
Date Tue 14 Dec 2004 11:39 AM (UTC)
Message
Ok, I have a strange bug now. When you're fighting a mob, or player, it doesn't really matter, the mud crashes with a stackdump when you try to look. Problem here is I don't know where to start looking.
Looking outside of a battle works fine, but if a fight is going on and someone looks, it crashes.
I also tried that gdb thingie, but it asks you to look at a core, but mine doesn't save it in a core, and gdb doesn't open it.
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #1 on Tue 14 Dec 2004 12:00 PM (UTC)
Message
Attach gdb to the MUD process, and then recreate the crash.

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

Posted by DjNiVeK   (48 posts)  [Biography] bio
Date Reply #2 on Tue 14 Dec 2004 12:30 PM (UTC)
Message
On my own computer, I run it as an .exe, so it doesn't have a PID.
Also, on a temporary server, when I try to run smaug in the area folder, I get a 'permission denied'. Startup does work, but there isn't a smaug running with an ID then.
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #3 on Tue 14 Dec 2004 12:33 PM (UTC)
Message
Well, what are you using to compile? Cygwin? If so, it should have a PID. With the permission denied error, just chmod it to the correct values.

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

Posted by DjNiVeK   (48 posts)  [Biography] bio
Date Reply #4 on Tue 14 Dec 2004 12:36 PM (UTC)
Message
Yea, I use cygwin to compile, but not to run the process.
I'll try the chmod in a few
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #5 on Tue 14 Dec 2004 12:37 PM (UTC)
Message
Oh I see. So you're using Smaug, converted to Windows?

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

Posted by DjNiVeK   (48 posts)  [Biography] bio
Date Reply #6 on Tue 14 Dec 2004 12:38 PM (UTC)
Message
yep, the version done with a little change in the makefile to a .exe
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #7 on Tue 14 Dec 2004 01:03 PM (UTC)
Message
Well I'm going to suggest using Cygwin to run it too, or find a way to attach gdb, because it'll be useful in the future, along with right now.

What I'm guessing is, while fighting, something (perhaps replacing the title of the victim in the room) is being set incorrectly.

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

Posted by DjNiVeK   (48 posts)  [Biography] bio
Date Reply #8 on Tue 14 Dec 2004 01:56 PM (UTC)
Message
lol, you're absolutely right. I have been able to gdb it now, and the crash is caused by a strcat( buf, victim->pcdata->title);

Now lets see how to fix it...thanks :)
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #9 on Tue 14 Dec 2004 02:10 PM (UTC)

Amended on Tue 14 Dec 2004 02:13 PM (UTC) by Zeno

Message
So most likely either buf was never declared or defined, or you somehow lost victim. (Or it could be that the victim is a NPC)

If you can't figure it out, post the gdb here.

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

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #10 on Tue 14 Dec 2004 03:33 PM (UTC)
Message
If your unfamiliar with GDB, I suggest reading through Nick's guide to GDB, its an invaluable piece of information
for anyone unused to the program.

Nobody ever expects the spanish inquisition!

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

Posted by DjNiVeK   (48 posts)  [Biography] bio
Date Reply #11 on Tue 14 Dec 2004 03:36 PM (UTC)
Message
@Greven: Yep, I read it but until Zeno said to run smaug with Cygwin, the GDB tutorial didn't really work for me. Now it works fine :)

I also fixed the bug, so now you can look during battle =)

Thanks =)
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #12 on Tue 14 Dec 2004 03:55 PM (UTC)

Amended on Tue 14 Dec 2004 03:57 PM (UTC) by Greven

Message
Why didn't gdb work with cygwin? You said that you got it to work in one of the above posts.

P.S. If you have fixed the issue, you could post it here so that anyone checking this post in the future with a similiar problem can see how you fixed the issue.

Nobody ever expects the spanish inquisition!

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

Posted by DjNiVeK   (48 posts)  [Biography] bio
Date Reply #13 on Tue 14 Dec 2004 03:59 PM (UTC)
Message
attaching gdb to smaug didn't work because I usually manually start up smaug outside of the windows (as the .exe) and not in cygwin. It doesn't have a PID then. Later I started it up in cygwin, and it got a PID, so attaching gdb could work, so now it worked :)
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #14 on Tue 14 Dec 2004 06:01 PM (UTC)
Message
You can also boot inside of gdb, as this is a very handy feature. I would recommend, as I think most people here would, that you figure out why it you can't boot in the shell, as this is a much better method. There are numerous posts that you could check on how to fix your startup.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[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.


41,135 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

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]