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
➜ This is probably a stupid question....
|
This is probably a stupid question....
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Videl
(2 posts) Bio
|
| Date
| Sun 04 Jun 2006 06:39 AM (UTC) |
| 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
| | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #1 on Sun 04 Jun 2006 10:32 AM (UTC) |
| 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 | | Top |
|
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Reply #2 on Sun 04 Jun 2006 01:08 PM (UTC) |
| 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 | | Top |
|
| Posted by
| Conner
USA (381 posts) Bio
|
| Date
| Reply #3 on Mon 05 Jun 2006 01:50 AM (UTC) |
| 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 | | Top |
|
| Posted by
| Samson
USA (683 posts) Bio
|
| Date
| Reply #4 on Mon 05 Jun 2006 02:20 AM (UTC) |
| 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. | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #5 on Mon 05 Jun 2006 02:26 AM (UTC) |
| 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 | | Top |
|
| Posted by
| Videl
(2 posts) Bio
|
| Date
| Reply #6 on Tue 20 Jun 2006 06:07 AM (UTC) |
| 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. | | Top |
|
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Reply #7 on Tue 20 Jun 2006 02:50 PM (UTC) |
| 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 | | Top |
|
| Posted by
| Samson
USA (683 posts) Bio
|
| Date
| Reply #8 on Tue 20 Jun 2006 05:37 PM (UTC) |
| 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. | | 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.
27,792 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top