Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Yandex, Bing

Members: 0
Guests: 14
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
Evoru (32)
Related Links
» SmaugMuds.org » General » Coding » Anyone know why this is crash...
Forum Rules | Mark all | Recent Posts

Anyone know why this is crashing?
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Aug 13, 2006, 6:35 pm   Last edited Aug 13, 2006, 6:59 pm by Zeno
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

To sum it up... Player A starts to cast a spell (it takes a few seconds) on mob A. Player B kills mob A while Player A is still casting. When Player A finishes spell, there's a crash.

This is the bt:
#0  number_argument (argument=0x0,
    arg=0xbf97118c "\034\017\f\b¼\021\227¿pî\b\nÈ!\227¿#¨\004\b¸\002\t\n\210¾\b\n\034Ã\036\b8\"\227¿";) at interp.c:852
#1  0x080f46e0 in get_char_room (ch=0xa0902b8, argument=0x0) at handler.c:1981
#2  0x0814a49b in do_chant (ch=0xa0902b8, argument=0x81d5178 "";) at skills.c:7489
#3  0x080e9810 in violence_update () at fight.c:347
#4  0x081734cd in update_handler () at update.c:2615
#5  0x080cb0b7 in game_loop () at comm.c:1276
#6  0x080ccc95 in main (argc=0, argv=0xa08be88) at comm.c:606


Now, I already had an ifcheck to make sure the target was still in the room. Here's the check:
if ( get_char_room( ch, ch->using_spell->target->name ) == NULL || char_died(ch->using_spell->target) )

The above aborts if true.

using_spell->target is CHAR_DATA. If I print using_spell->target I get 0xa091eb8.
using_spell->target->name is 0x0.

Why is using_spell->target becoming corrupt? Spells work fine if the target is not killed. When a target is killed, it shouldn't mess with ch->using_spell... right?

If anything, you'd think that the char_died ifcheck would work.
       
Post is unread #2 Aug 13, 2006, 6:50 pm   Last edited Aug 13, 2006, 8:13 pm by kiasyn
Go to the top of the page
Go to the bottom of the page

kiasyn
Magician
GroupMembers
Posts121
JoinedJun 30, 2006

if ( get_char_room( ch, ch->using_spell->target->name ) == NULL || char_died(ch->using_spell->target) )

should at least be:

if ( char_died(ch->using_spell->target) || get_char_room( ch, ch->using_spell->target->name ) == NULL )

but thats probably not the cause? :P

edit: forgot the !
double edit: stupid ! wasnt needed anyway X_X
       
Post is unread #3 Aug 13, 2006, 7:27 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Yeah it's not the cause. :P It's crashing on the call to get_char_room due to ch->using_spell being corrupt.
       
Pages:<< prev 1 next >>