Re: [Circle] [Code-Help] Help? Please?

From: Sammy (samedi@clark.net)
Date: 11/12/96


On Mon, 11 Nov 1996, Corey Hoitsma wrote:

- Program received signal SIGSEGV, Segmentation fault.
- 0x802ca8c in hit (ch=0x8540200, victim=0x0, type=-1) at fight.c:971
- 971       if (ch->in_room != victim->in_room) {
- 
- Can anyone think of what would cause this? Maybe the weapon spell?

1. Weapon spell kills victim
2. Dead victim removed from game with extract_char(victim)
3. victim=0x0 (NULL)
4. hit() is called with a valid ch, but invalid victim
5. victim->in_room is an illegal operation since there's no victim
6. segmentaion fault, core dumped
7. Go back to your code and add a check for FIGHTING(ch) to make sure it's
   still valid (non-NULL) after calling the weapon casting function

Sam

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST