Odd crashes, all of a sudden.

From: Mike Stilson (mstilson@home.com)
Date: 06/19/00


Without any major new code being added or any other such things, suddenly I started
crashing during boot. (or when I removed the fn call to see if it was local to that,
it crashed when the first person logged in.)

The crash occurs in sort_spells(), when I removed it (to test somethng) it crashed later
in list_obj_to_room

Now.. I've got the sneaking suspicion it's somewhere else, but would like another opinion
or two before I go ripping my system apart.

bt from gdb:
#0  0x1869420 in str_cmp (arg1=0x206e756d <Address 0x206e756d out of bounds>, arg2=0x7374616e <Address 0x7374616e out of bounds>) at utils.c:123
                    ^-- changed from strcmp() again, for testing.  same results.
#1  0x1862910 in compare_spells (x=0x206e756d, y=0x7374616e) at spec_procs.c:72
#2  0x160dd30 in msort_with_tmp (b=0x19320a0, n=2, s=4, cmp=0x18628cc <compare_spells>, t=0x7ffff7e0 "") at msort.c:58
#3  0x160dcf0 in msort_with_tmp (b=0x193209c, n=3, s=4, cmp=0x18628cc <compare_spells>, t=0x7ffff7e0 "") at msort.c:50
#4  0x160dcd4 in msort_with_tmp (b=0x193209c, n=6, s=4, cmp=0x18628cc <compare_spells>, t=0x7ffff7e0 "") at msort.c:49
#5  0x160dcd4 in msort_with_tmp (b=0x193209c, n=12, s=4, cmp=0x18628cc <compare_spells>, t=0x7ffff7e0 "") at msort.c:49
#6  0x160dcd4 in msort_with_tmp (b=0x193209c, n=25, s=4, cmp=0x18628cc <compare_spells>, t=0x7ffff7e0 "") at msort.c:49
#7  0x160dcd4 in msort_with_tmp (b=0x193209c, n=50, s=4, cmp=0x18628cc <compare_spells>, t=0x7ffff7e0 "") at msort.c:49
#8  0x160dcd4 in msort_with_tmp (b=0x193209c, n=100, s=4, cmp=0x18628cc <compare_spells>, t=0x7ffff7e0 "") at msort.c:49
#9  0x160dcd4 in msort_with_tmp (b=0x193209c, n=200, s=4, cmp=0x18628cc <compare_spells>, t=0x7ffff7e0 "") at msort.c:49
#10 0x160debc in qsort () at msort.c:88
#11 0x186296c in sort_spells () at spec_procs.c:83
#12 0x1837f10 in boot_db () at db.c:388
#13 0x1830cb8 in init_game (port=7) at comm.c:421
#14 0x1830c14 in main (argc=1, argv=0x7ffffbf4) at comm.c:395
#15 0x16047d4 in __libc_start_main () at ../sysdeps/powerpc/elf/libc-start.c:106

then suddenly, looking at the structure in gdb, I get (a small sample)

(gdb) print spell_info
$3 = {{min_position = 115 's', mana_min = 1953701928, mana_max = 1702391909, mana_change = 1668573550, min_level = {1730168111, 595097720, 690757729, 1718904178,
      544109933, 1701996899}, routines = 543387502, violent = 115 's', targets = 1953701928, name = 0x65787065 <Address 0x65787065 out of bounds>}, {
    min_position = 99 'c', mana_min = 1730168111, mana_max = 595097720, mana_change = 690757729, min_level = {4, 1, 1701996899, 543387502, 1937006958, 1953701928},
    routines = 1702391909, violent = 99 'c', targets = 1730168111, name = 0x23787878 <Address 0x23787878 out of bounds>}, {min_position = 41 ')',
    mana_min = 1718904178, mana_max = 544109933, mana_change = 1701996899, min_level = {543387502, 1937006958, 1953701928, 1702391909, 1668573550, 1730168111},
    routines = 595097720, violent = 41 ')', targets = 1718904178, name = 0x206e756d <Address 0x206e756d out of bounds>}, {min_position = 101 'e',
    mana_min = 543387502, mana_max = 1937006958, mana_change = 1953701928, min_level = {1702391909, 7, 1730168111, 595097720, 690757729, 1718904178},
(etc.. all are basically the same)

Obviously, it's deciding to crash because "name" is out of bounds, which is pretty hard to sort by.

Anyone think of any little things it could be, lemme know.  it's possible me or my other coder changed one thing somewhere and forgot to mention it, but
for now, it's managing to completely elude me.

Thanks..
-me


     +------------------------------------------------------------+
     | 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 : 04/10/01 PDT