[DGD] enigmatic bug

chris . psych_mayo at hotmail.com
Wed Apr 30 15:28:58 CEST 2008


I've been working on this one for awhile.  I am creating a bit of a variation on Phantasmal's
mudclient connection object.  I have my user objects inherit a /system/open/lib/ TELNET library,
which in turn inherits both LIB_CONN and LIB_USER.
I was recently fortunate to find a 'bug fix', even though i know it doesnt quite amount to that.
What has been happening up until recently has been a disconnection as soon as i enter any input.
There is no error message generated.
I could put an error just about anyplace to make sure the right values were there, and things seem
ironed out.  What i found that may make it easy to identify the bug...I can add an error in my user
object, where a value should be returned to determine the mode after input.  When i do this, there
is no disconnection, i can pass input to user object and i can get messages sent back to me.
I'll include a couple suspect functions below...but i hope this is an error that can be identified by its
odd behavior.  Any support is greatly appreciated...been headbanging over this for months.  Thanks.

Inside of TELNET lib:

static int user_input(string str) { /*this is called by process_input, same as in phantasmal */
  int mode;
  mode = this_object()->client_message(str); /* this_object() is the user object */
  if(mode == this_object()->query_mode() || mode == 4)
    return MODE_NOCHANGE;
  else
    return mode;
  }

Inside of login user object:

int client_message(string str) {
	if(previous_program() == LIB_CONN  || previous_program() == BINARYD ||
	previous_program() == TELNET) {
	string cmd;
	int i, sz;
	  previous_object(1)->message(str);
         error("horrible bug fix");
       /*  ...omitted rest of this function */

My error messages in dgd after forcing error:

/*when no user defined yet*/
Apr 30 09:27:37 ** horrible bug fix
  89 receive_message   /kernel/obj/binary (#28)
 195 receive_message   /kernel/lib/connection (/kernel/obj/binary#28)
  53 login             /usr/System/obj/login (#31)
  62 login             /usr/System/open/lib/telnet (/usr/System/obj/login#31)
 210 process_input     /usr/System/open/lib/telnet (/usr/System/obj/login#31)
 118 user_input        /usr/System/open/lib/telnet (/usr/System/obj/login#31)
  67 client_message    /usr/System/obj/login (#31)

/*after user is defined*/
Apr 30 09:28:23 ** horrible bug fix
  89 receive_message   /kernel/obj/binary (#28)
 197 receive_message   /kernel/lib/connection (/kernel/obj/binary#28)
 229 receive_message   /usr/System/open/lib/telnet (/usr/System/obj/login#31)
 210 process_input     /usr/System/open/lib/telnet (/usr/System/obj/login#31)
 118 user_input        /usr/System/open/lib/telnet (/usr/System/obj/login#31)
  67 client_message    /usr/System/obj/login (#31)


_________________________________________________________________
In a rush? Get real-time answers with Windows Live Messenger.
http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_realtime_042008



More information about the DGD mailing list