Today, Lord of Chaos spake to the list: > Probably.. :) Now to figure out what it is, I'm usually pretty > carefull about not creating non-endable loops. Well, if you ever catch the problem in action, get its process id (PID) from 'ps' and do, "kill -s 11 <pid>" filling in for <pid> as appropriate. This will cause your MUD to crash, reporting that it experienced a segmentation fault and do a core dump. Now you can see exactly where you were when the problem was occuring. If you are having difficulty catching the problem, you can probably write a small program to periodically test the MUD and automatically perform the kill. Since we aren't quite sure exactly what your problem is yet, YMMV. If all this seems too much work, begin inserting logging statements into game_loop and various activity functions. Check the additions you've made since you can first remember the problem. Some near-infinite loops are difficult to see at first glance. The idea is not to find it exactly with the logging statements, but your choices down so you can more closely inspect individual blocks of code. If this last step seems like too much work, you're not using a revision control system (RCS, CVS, etc.) and you should begin to do so now. The ability to back out, review, and keep extensive information on your changes is a vital part of any ongoing project. The failure to use these tools is ultimately the reason for so many muds failing. While not every pocket of amateur software developers need such tools, mud programmers need them just as much, if not more than, most professional software developers. Erwin S. Adreasen, I believe, wrote a treatise on the use of RCS for mud programmers that should be available on Ceramic Mouse. As you're undoubtedly already aware, we use CVS for official development of CircleMUD. Learn it, love it, live it. Good luck. -dak +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST