Crash bug - need assistance with GDB

  • cunning
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 years 8 months ago - 2 years 8 months ago #7338 by cunning
Crash bug - need assistance with GDB was created by cunning
I have been trying to find this issue for week now. Basically when we call dg_misc.c for dg_valid_target() It corrupts the character. It does not happen right away but 12-24 hours into the game. Hoping someone with more skill in GDB can assist.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000456aec in valid_dg_target (ch=ch@entry=0x38148b0, bitvector=bitvector@entry=1) at dg_misc.c:293
293     }
(gdb) back
#0  0x0000000000456aec in valid_dg_target (ch=ch@entry=0x38148b0, bitvector=bitvector@entry=1) at dg_misc.c:293
#1  0x00000000004341a7 in get_char_by_obj (obj=obj@entry=0x3a251f0, name=name@entry=0x3b224d0 "}32387")
    at dg_scripts.c:509
#2  0x000000000041d5aa in find_replacement (go=go@entry=0x3a251f0, sc=sc@entry=0x326bdf0,
    trig=trig@entry=0x3b34f80, type=type@entry=1, var=var@entry=0x7ffd7586ffa1 "actor",
    field=field@entry=0x7ffd7586ffa7 "inventory", subfield=0x7ffd758705a0 "8461", str=0x7ffd758701a0 "", slen=512)
    at dg_variables.c:376
#3  0x0000000000422473 in var_subst (go=0x3a251f0, sc=0x326bdf0, trig=0x3b34f80, type=1, line=<optimized out>,
    buf=<optimized out>) at dg_variables.c:1709
#4  0x0000000000433730 in eval_expr (line=line@entry=0x7ffd75870a60 "%actor.inventory(8461)% ",
    result=result@entry=0x7ffd75870c60 "", go=go@entry=0x3a251f0, sc=sc@entry=0x326bdf0, trig=trig@entry=0x3b34f80,
    type=type@entry=1) at dg_scripts.c:1507
#5  0x0000000000433605 in eval_lhs_op_rhs (
    expr=expr@entry=0x228ac53 "%actor.inventory(8461)% && %actor.inventory(8462)% && %actor.inventory(8463)% && %actor.inventory(8464)% && %actor.inventory(8465)% %actor.inventory(8466)% && %actor.inventory(8467)% && %actor.invento"..., result=result@entry=0x7ffd75872300 "", go=go@entry=0x3a251f0, sc=sc@entry=0x326bdf0, trig=trig@entry=0x3b34f80,
    type=type@entry=1) at dg_scripts.c:1564
#6  0x000000000043370d in eval_expr (
    line=line@entry=0x228ac53 "%actor.inventory(8461)% && %actor.inventory(8462)% && %actor.inventory(8463)% && %actor.inventory(8464)% && %actor.inventory(8465)% %actor.inventory(8466)% && %actor.inventory(8467)% && %actor.invento"..., result=result@entry=0x7ffd75872300 "", go=go@entry=0x3a251f0, sc=sc@entry=0x326bdf0, trig=trig@entry=0x3b34f80,
    type=type@entry=1) at dg_scripts.c:1497
#7  0x00000000004337a1 in process_if (
    cond=cond@entry=0x228ac53 "%actor.inventory(8461)% && %actor.inventory(8462)% && %actor.inventory(8463)% && %actor.inventory(8464)% && %actor.inventory(8465)% %actor.inventory(8466)% && %actor.inventory(8467)% && %actor.invento"..., go=go@entry=0x3a251f0, sc=sc@entry=0x326bdf0, trig=trig@entry=0x3b34f80, type=type@entry=1) at dg_scripts.c:1580
#8  0x0000000000436ad9 in script_driver (go_adress=0x7ffd758733a8, trig=0x3b34f80, type=1, mode=<optimized out>)


(gdb) up
#1 0x00000000004341a7 in get_char_by_obj (obj=obj@entry=0x3a251f0, name=name@entry=0x3b224d0 "}32387")
at dg_scripts.c:509
509 if (ch && valid_dg_target(ch, DG_ALLOW_GODS))
(gdb) info local
ch = <optimized out>
(gdb) up
#2 0x000000000041d5aa in find_replacement (go=go@entry=0x3a251f0, sc=sc@entry=0x326bdf0,
trig=trig@entry=0x3b34f80, type=type@entry=1, var=var@entry=0x7ffd7586ffa1 "actor",
field=field@entry=0x7ffd7586ffa7 "inventory", subfield=0x7ffd758705a0 "8461", str=0x7ffd758701a0 "", slen=512)
at dg_variables.c:376
376 if ((c = get_char_by_obj(obj, name)));
(gdb) info local
vd = 0x3a1be20
ch = <optimized out>
c = 0x0
rndm = <optimized out>
obj = 0x3a251f0
o = 0x0
room = <optimized out>
r = 0x0
name = 0x3b224d0 "}32387"
count = <optimized out>
i = <optimized out>
doors = <optimized out>
send_cmd = {0x584d4f "", 0x584d56 "year", 0x584d5d "ndmob"}
echo_cmd = {0x584d64 "indobj", 0x584d6b "random", 0x584d72 "char"}
echoaround_cmd = {0x584d79 "nbeseen", 0x584d86 "ll", 0x584d93 "ower"}
door = {0x584da0 "", 0x584da7 "ached", 0x584dae "eshe"}
force = {0x584db5 "mher", 0x584dbd "her", 0x584dc5 "oll"}
load = {0x584dcd "er", 0x584dd4 "c", 0x584ddb "ller"}
purge = {0x584de2 "f", 0x584dea "ef", 0x584df2 "tp"}
teleport = {0x584dfa "na", 0x584e05 "next_in_room", 0x584e10 "m"}
xdamage = {0x584e1b "pref", 0x584e24 "tpoints", 0x584e2d "pnts"}
zoneecho = {0x584e36 "tdone", 0x584e41 "g_breath", 0x584e4c "ving_para"}
asound = {0x584e57 "aving_petri", 0x584e60 "ri", 0x584e69 "_rod"}
at = {0x584e72 "ng_spell", 0x584e77 "ell", 0x584e7c "killset"}
transform = {0x584e81 "et", 0x584e8d "d", 0x584d72 "char"}
recho = {0x584e99 "exists", 0x584ea1 "is", 0x584ea9 "per_day"}
omove = {0x584d64 "indobj", 0x584eb1 "carried_by", 0x584eb8 "_by"}
(gdb)


int valid_dg_target(struct char_data *ch, int bitvector)
{
  if (IS_NPC(ch))
    return TRUE;  /* all npcs are allowed as targets */
  else if (ch->desc && (STATE(ch->desc) != CON_PLAYING))   ====> crashes here.
    return FALSE; /* Only PC's who are playing can be targetted */

I can provide much more detail

Thanks in advance.
Last edit: 2 years 8 months ago by cunning. Reason: missing information

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #7345 by thomas
Replied by thomas on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

  • cunning
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 years 8 months ago #7348 by cunning
Replied by cunning on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

  • cunning
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 years 8 months ago #7349 by cunning
Replied by cunning on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

  • cunning
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 years 8 months ago #7350 by cunning
Replied by cunning on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #7353 by Parnassus
Replied by Parnassus on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

  • cunning
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 years 8 months ago #7357 by cunning
Replied by cunning on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #7358 by Fizban
Replied by Fizban on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #7359 by Fizban
Replied by Fizban on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

  • cunning
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 years 8 months ago - 2 years 8 months ago #7361 by cunning
Replied by cunning on topic Crash bug - need assistance with GDB
Please login to view the answers
Last edit: 2 years 8 months ago by cunning.

Please Log in or Create an account to join the conversation.

  • cunning
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 years 8 months ago #7367 by cunning
Replied by cunning on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #7368 by Fizban
Replied by Fizban on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

  • cunning
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 years 8 months ago #7369 by cunning
Replied by cunning on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

  • cunning
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 years 8 months ago #7370 by cunning
Replied by cunning on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #7371 by Fizban
Replied by Fizban on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

  • cunning
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 years 8 months ago #7372 by cunning
Replied by cunning on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

  • cunning
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 years 8 months ago #7373 by cunning
Replied by cunning on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #7374 by thomas
Replied by thomas on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #7375 by thomas
Replied by thomas on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

  • cunning
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 years 8 months ago #7376 by cunning
Replied by cunning on topic Crash bug - need assistance with GDB
Please login to view the answers

Please Log in or Create an account to join the conversation.

Time to create page: 0.256 seconds