GNU gdb Red Hat Linux (5.2-2)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `anatolia 4555 hotboot 4 -1'.
Program terminated with signal 11, Segmentation fault.
Cannot access memory at address 0x40016afc
#0  do_spellsold (ch=Cannot access memory at address 0xbff799f0
) at skills.c:371
371         bool found = FALSE;
(gdb) where
#0  do_spellsold (ch=Cannot access memory at address 0xbff799f0
) at skills.c:371
Cannot access memory at address 0xbff799e8
(gdb) list
366     void do_spellsold2(CHAR_DATA *ch, char *argument)
367     {
368         char spell_list[LEVEL_IMMORTAL][MAX_STRING_LENGTH];
369         char spell_columns[LEVEL_IMMORTAL];
370         int sn,lev,mana;
371         bool found = FALSE;
372         char buf[MAX_STRING_LENGTH];
373         char output[8*MAX_STRING_LENGTH];
374
375         if (IS_NPC(ch))
(gdb) quit 

>>>>-----Original Message-----
>>>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
>>>>Behalf Of Valnir
>>>>Sent: Thursday, May 12, 2005 4:33 PM
>>>>To: [email protected]
>>>>Subject: Re: Odd problem
>>>>
>>>>Can you include the actual GDB output please? include ALL 
>>>>the info that WHERE shows (as far as the code trace anyway). Thanks!
>>>>
>>>>- Valnir
>>>>
>>>>----- Original Message -----
>>>>From: "KJM" <[EMAIL PROTECTED]>
>>>>To: "'Valnir'" <[EMAIL PROTECTED]>; <[email protected]>
>>>>Sent: Thursday, May 12, 2005 4:04 PM
>>>>Subject: RE: Odd problem
>>>>
>>>>
>>>>> Here is the code.  It works on my test port.  Crashes on 
>>>>the main port.  I
>>>>> have no idea why.
>>>>>
>>>>> The GDB outpur showa that it crashes on the bool found = 
>>>>FALSE; Odd.
>>>>>
>>>>> void do_spells(CHAR_DATA *ch, char *argument)
>>>>> {
>>>>>    char spell_list[LEVEL_IMMORTAL][MAX_STRING_LENGTH];
>>>>>    char spell_columns[LEVEL_IMMORTAL];
>>>>>    int sn,lev,mana;
>>>>>    bool found = FALSE;
>>>>>    char buf[MAX_STRING_LENGTH];
>>>>>    char output[8*MAX_STRING_LENGTH];
>>>>>    if (IS_NPC(ch))
>>>>>      return;
>>>>>    output[0] = '\0';
>>>>>    for (lev = 0; lev < LEVEL_IMMORTAL; lev++)
>>>>>    {
>>>>>        spell_columns[lev] = 0;
>>>>>        spell_list[lev][0] = '\0';
>>>>>    }
>>>>>    for (sn = 0; sn < MAX_SKILL; sn++)
>>>>>    {
>>>>>      if (skill_table[sn].name == NULL )
>>>>>        break;
>>>>>
>>>>>      if(ch->pcdata->learned[sn] >= 1)
>>>>>      {
>>>>>        found = TRUE;
>>>>>        lev=get_skill_level(ch,sn);
>>>>>        if (lev>=LEVEL_IMMORTAL)
>>>>>                continue;
>>>>>        if (ch->level < lev)
>>>>>          sprintf(buf,"@R%-18s N/[EMAIL PROTECTED]      ", 
>>>>> skill_table[sn].name);
>>>>>        else
>>>>>         {
>>>>>          mana = UMAX(skill_table[sn].min_mana,100/(2 + 
>>>>ch->level - lev));
>>>>>          sprintf(buf,"@g%-18s @wMana: @[EMAIL PROTECTED] @wLearned: 
>>>>> @[EMAIL PROTECTED]
>>>>> ",skill_table[sn].name, mana, ch->pcdata->learned[sn]);
>>>>>         }
>>>>>        if (spell_list[lev][0] == '\0')
>>>>>          sprintf(spell_list[lev],"[EMAIL PROTECTED] @c%2d: %s",lev,buf);
>>>>>        else
>>>>>        {
>>>>>            strcat(spell_list[lev],"\n\r          ");
>>>>>          strcat(spell_list[lev],buf);
>>>>>        }
>>>>>      }
>>>>>    }
>>>>>
>>>>>    if (!found)
>>>>>    {
>>>>>      send_to_char("You know no spells.\n\r",ch);
>>>>>      return;
>>>>>    }
>>>>>    for (lev = 0; lev < LEVEL_IMMORTAL; lev++)
>>>>>      if (spell_list[lev][0] != '\0')
>>>>>        strcat(output,spell_list[lev]);
>>>>>    strcat(output,"\n\r");
>>>>>    page_to_char(output,ch);
>>>>> }
>>>>>
>>>>>>>>>-----Original Message-----
>>>>>>>>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>>>>>>>>>Behalf Of Valnir
>>>>>>>>>Sent: Thursday, May 12, 2005 11:07 AM
>>>>>>>>>To: [email protected]
>>>>>>>>>Subject: Re: Odd problem
>>>>>>>>>
>>>>>>>>>Well, while I bet a lot of us would love to help you out,
>>>>>>>>>we can't do much with out info.. like what the
>>>>>>>>>function/command is or does. Often times knowing the
>>>>>>>>>function of something will jog ideas much more effectively.
>>>>>>>>>
>>>>>>>>>- Valnir
>>>>>>>>>
>>>>>>>>>----- Original Message -----
>>>>>>>>>From: <[EMAIL PROTECTED]>
>>>>>>>>>To: <[email protected]>
>>>>>>>>>Sent: Wednesday, May 11, 2005 7:06 AM
>>>>>>>>>Subject: Odd problem
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Greetings,
>>>>>>>>>>    I have an odd problem that is driving me insane.  A
>>>>>>>>>command that works
>>>>>>>>>> (with no problems I might add) on my test port.  Crashes
>>>>>>>>>on the my main
>>>>>>>>>> port.  The code bring run is EXACTLY the same code.  I
>>>>>>>>>run both ports from
>>>>>>>>>> the same executable.  Does anyone have ANY clue as to why?
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>> -K
>>>>>>>>>> -- 
>>>>>>>>>> ROM mailing list
>>>>>>>>>> [email protected]
>>>>>>>>>> Unsubscribe here ->>>
>>>>>>>>>http://www.rom.org/cgi-bin/mailman/listinfo/rom
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>-- 
>>>>>>>>>ROM mailing list
>>>>>>>>>[email protected]
>>>>>>>>>Unsubscribe here ->>>
>>>>>>>>>http://www.rom.org/cgi-bin/mailman/listinfo/rom
>>>>>
>>>>> -- 
>>>>> ROM mailing list
>>>>> [email protected]
>>>>> Unsubscribe here ->>> 
>>>>http://www.rom.org/cgi-bin/mailman/listinfo/rom
>>>>> 
>>>>
>>>>
>>>>-- 
>>>>ROM mailing list
>>>>[email protected]
>>>>Unsubscribe here ->>> 
>>>>http://www.rom.org/cgi-bin/mailman/listinfo/rom

Reply via email to