Hello again,

I think you (and the previous poster) were correct in the NULL desc
problem.  I found it just a minute ago and threw in a couple of checks
against it, so I should be good to go.  The ch_check's desc was in fact
NULL, and the log file confirmed that he went linkdead moments before.  

I guess what threw me off was that the gdb line was telling me that the
IS_NPC(ch and ch_check) line crashed us, when that wasn't the case at
all.  I'll try updating my gdb (I'm running an older version of Mandrake
that is otherwise kept pretty up to date), and hopefully that'll never
throw me for a loop again.

On second thought though, this is going to throw a small monkey wrench in
my plans.. if someone goes linkdead rather than quits, then logs on
another character, that will circumvent the check.  I think I'm going to
have to throw in an if check to check against ch->pcdata->host rather than
ch->desc->host2 if desc is null.  Just a heads up, if anyone wants to use
my humble and somewhat flawed code.


> 
>     One slight oddity about gdb (at least the cygwin version) is that if
> a
> multi-line if statement causes a SIGSEGV, then gdb reports the *first*
> line
> of the if statement, even tho the Signal could have been generated on
> another line in the if statement...
>     I'd check out the data inside ch and ch_check, notably their ->desc
> members and the desc->host2 of each.  My guess is one or both has a NULL
> desc.
> 
> Tony
> 
> 
> 


Reply via email to