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

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  This is probably a stupid question....

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

This is probably a stupid question....

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Videl   (2 posts)  [Biography] bio
Date Sun 04 Jun 2006 06:39 AM (UTC)  quote  ]
Message
I am just learning to code because I resently started my own mud and got tired of waiting on my coder...So...I was wondering a good place to find Smaug based snippets...the main one i need is an anti crash snippet. Heard there was one floating out there SOMEWHERE...

Thanks
Videl
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Reply #1 on Sun 04 Jun 2006 10:32 AM (UTC)  quote  ]
Message
What does an anti-crash snippet do? Prevent your MUD from crashing? Sounds like magic to me... :-P

Could you maybe provide more details on what exactly this snippet is supposed to do?

Here are two good snippet sites:

http://www.afkmud.com/downloads.php
http://www.mudconnect.com/resources/Mud_Resources:Mud_Code_and_Snippets.html

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Reply #2 on Sun 04 Jun 2006 01:08 PM (UTC)  quote  ]
Message
I get around a lot, and I've never heard of this.

If you're getting crashes, we'll be happy to help fix them.

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

Posted by Conner   USA  (381 posts)  [Biography] bio
Date Reply #3 on Mon 05 Jun 2006 01:50 AM (UTC)  quote  ]
Message
You forgot the best snippet site, www.mudbytes.net :)

Samson had one that lets you send your mud a shutdown signal if the server is going down, but I don't know of any snippets that do anti-crash.. though I know ResortMUD has some sort of crash protection in it, I think it basically just saves the world in the event of a crash like doing a hotboot would.

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
[Go to top] top

Posted by Samson   USA  (683 posts)  [Biography] bio
Date Reply #4 on Mon 05 Jun 2006 02:20 AM (UTC)  quote  ]
Message
Snippet sites:

www.mudbytes.net
www.afkmud.com/downloads.php

Anti-crash? No such animal. There is only code which can manage what happens when one comes up. The sane ones take the form of code that does a controlled save of player data and nothing more. The insane ones try to do stupid stuff like save EVERYTHING before then causing a hotboot. However, the sanity in trusting that much data once the memory has been corrupted is questionable.

If a "no-crash" system is really what you want, then you may as well find one that will handle SIGSEGV and restart the game_loop without rebooting, hotbooting, or whatever. But even that's not entirely reliable.

Best bet? Let it crash and diagnose the cause. Masking bugs is not the way to go.

SmaugMuds.org: http://www.smaugmuds.org - The Smaug MUDs Community Center

"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Reply #5 on Mon 05 Jun 2006 02:26 AM (UTC)  quote  ]
Message
I would tend to agree with Samson. Leaving bugs and feeling "safe" because of an "anti-crash" handler will just create bugs that will bite you in the behind later on. It's better to find and fix them early.

Don't forget that a crash-handler can only detect when a crash occurs after the bug that caused that crash. So whatever screwed up your memory, program stack or whatever will still be around. As Samson pointed out it's not necessarily a good idea to trust the data in memory after a crash signal is received.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Videl   (2 posts)  [Biography] bio
Date Reply #6 on Tue 20 Jun 2006 06:07 AM (UTC)  quote  ]
Message
What I was talking about is a system a friend's mud had. It hotbooted whenever the mud was about to crash and he simply fixed the error when he got on. It also logged what caused the crash so he knew what to fix.
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Reply #7 on Tue 20 Jun 2006 02:50 PM (UTC)  quote  ]
Message
That's still a crash. The MUD just doesn't go down. You still lose world data if not saved.

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

Posted by Samson   USA  (683 posts)  [Biography] bio
Date Reply #8 on Tue 20 Jun 2006 05:37 PM (UTC)  quote  ]
Message
I don't know how much harder it can be stressed that any kind of copyover to handle a crash situation is just plain crazy. There is no way in hell I would ever recommend doing such a thing because you can seriously corrupt data by relying on it under those conditions.

Frankly I think your friend was playing with fire by doing that. There's just no other way around it. Let the mud crash. As long as your startup script is functioning, it will reboot. It may be a minor pain for the players, but they'll thank you later for not letting their data get corrupted.

SmaugMuds.org: http://www.smaugmuds.org - The Smaug MUDs Community Center

"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984
[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.


1,864 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]