Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: core dump



> From: joe@unipress.com
> Also, forgot to mention that I get core dumps;
> 
> () at 0x35004
> add_string(str = (nil)), line 111 in "shstr.c"
> attack_ob(op = 0xbf598, hitter = 0xc4574), line 310 in "main.c"
> move_monster(op = 0xc4574), line 475 in "main.c"
> process_events(), line 1776 in "main.c"
> main(argc = 1, argv = 0xf7fffab4, env = 0xf7fffabc), line 2018 in "main.c"
> 
> Obviously, add_string isn't prepared to deal with null pointers.  Perhaps all
> this needs is an if (!str) return;.
> 
> --joe

We have had exactly the same problem. Detailed investigation showed that
a corrupted object somehow got onto the friendly_object_list and when a
monster searched for a friendly object to hit, it barfed on the null name.
A quick peek at the 0.88 beta code shows that there is a check in there
for null names. I still don't know how the corrupt object gets onto the list
though 8( 
[sidebar: xups is a _great_ debugger for exploring data structures in 
your code, if you haven't used it, it is well worth having a look at]


-Rupert