.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > POD-Bot mm > Bug Reports
Bug Reports Post any bug you experience with the latest release of this bot here

Closed Thread
 
Thread Tools
Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
Old
  (#21)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: Bug-NUM_FOR_EDICT Error: Bad Pointer - 10-05-2004

Quote:
Originally Posted by sPlOrYgOn
well I have now added...
Code:
int pfnIndexOfEdict (const edict_t *pEdict)
{
   if (FNullEnt (pEdict))
      RETURN_META_VALUE (MRES_SUPERCEDE, NULL);

   RETURN_META_VALUE (MRES_IGNORED, NULL);
}
This will only work if that is a bug in CS
calling ENTINDEX() or INDEXENT() in the bot plugin won't get here...
  
Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
Old
  (#22)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: Bug-NUM_FOR_EDICT Error: Bad Pointer - 11-05-2004

Quote:
Originally Posted by Whistler
This will only work if that is a bug in CS
calling ENTINDEX() or INDEXENT() in the bot plugin won't get here...
aww

on the good side...
I didn't know INDEXENT could cause it too
I was only checking ENTINDEX

[edit]
another good news might be that I might have found where it is being caused...
and it does have something to do with intense battles..
at least the dying part...
in BotClient.cpp I changed this:
Code:
void BotClient_CS_DeathMsg (void *p, int bot_index)
{
   // This message gets sent when someone got killed

   static int killer_index;
   static int victim_index;
   static edict_t *killer_edict;
   static bot_t *pBot;

   if (state == 0)
      killer_index = *(int *) p; // ENTINDEX() of killer
   else if (state == 1)
      victim_index = *(int *) p; // ENTINDEX() of victim
   else if (state == 2)
   {
      if ((killer_index != 0) && (killer_index != victim_index))
      {
         killer_edict = INDEXENT (killer_index);
         pBot = UTIL_GetBotPointer (killer_edict);

         // is this message about a bot who killed somebody ?
         if (pBot != NULL)
         {
            pBot->pLastVictim = INDEXENT (victim_index);
            pBot->f_shootatdead_time = gpGlobals->time + RANDOM_FLOAT (0.0, 2.0);
         }

         else // Did a human kill a Bot on his team ?
         {
            edict_t *victim_edict = INDEXENT (victim_index);
            pBot = UTIL_GetBotPointer (victim_edict);

            if (pBot != NULL)
               pBot->bDead = TRUE;
         }
      }
   }
}
to:
Code:
void BotClient_CS_DeathMsg (void *p, int bot_index)
{
   // This message gets sent when someone got killed

   static int killer_index;
   static int victim_index;
   static edict_t *killer_edict;
   static bot_t *pBot;

   if (state == 0)
      killer_index = *(int *) p; // ENTINDEX() of killer
   else if (state == 1)
      victim_index = *(int *) p; // ENTINDEX() of victim
   else if (state == 2)
   {
      // check if victim_index is zero...
      // it does it to killer_index so why not victim_index too?
      if ((killer_index != 0) && (victim_index != 0) && (killer_index != victim_index))
      {
         killer_edict = INDEXENT (killer_index);
         pBot = UTIL_GetBotPointer (killer_edict);

         // is this message about a bot who killed somebody ?
         if (pBot != NULL)
         {
            pBot->pLastVictim = INDEXENT (victim_index);
            pBot->f_shootatdead_time = gpGlobals->time + RANDOM_FLOAT (0.0, 2.0);
         }

         else // Did a human kill a Bot on his team ?
         {
            edict_t *victim_edict = INDEXENT (victim_index);
            pBot = UTIL_GetBotPointer (victim_edict);

            if (pBot != NULL)
               pBot->bDead = TRUE;
         }
      }
   }
}
and hopefully that will fix it..
[/edit

Last edited by sPlOrYgOn; 11-05-2004 at 02:47..
  
Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
Old
  (#23)
biohazerd87
Moderator by day Waypointer by night
 
biohazerd87's Avatar
 
Status: Offline
Posts: 1,039
Join Date: Apr 2004
Location: Missouri
Default Re: Bug-NUM_FOR_EDICT Error: Bad Pointer - 12-05-2004

If you changed this in the latest version of PODbot i am still getting this error to let you know
[EDIT]
My bad i didn't read before i typed thanks for updating PODbot Splorygon

Last edited by biohazerd87; 12-05-2004 at 06:25..
  
Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
Old
  (#24)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: Bug-NUM_FOR_EDICT Error: Bad Pointer - 12-05-2004

so you used R2.1 and still getting the error?
if so...
I SERIOUSLY do NOT know what is wrong..
I've checked every SINGLE call to INDEXENT and ENTINDEX...
They all have a check to make sure that it's not null...

We will probably have to wait for Austin to come help debug this...

Last edited by sPlOrYgOn; 12-05-2004 at 06:28..
  
Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
Old
  (#25)
biohazerd87
Moderator by day Waypointer by night
 
biohazerd87's Avatar
 
Status: Offline
Posts: 1,039
Join Date: Apr 2004
Location: Missouri
Default Re: Bug-NUM_FOR_EDICT Error: Bad Pointer - 12-05-2004

yeah i am still getting the error after like 2 rounds
  
Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
Old
  (#26)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: Bug-NUM_FOR_EDICT Error: Bad Pointer - 12-05-2004

Only thing i can think of is if theres another way to cause this error besides giving a null ent to INDEXENT or ENTINDEX....
  
Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
Old
  (#27)
biohazerd87
Moderator by day Waypointer by night
 
biohazerd87's Avatar
 
Status: Offline
Posts: 1,039
Join Date: Apr 2004
Location: Missouri
Default Re: Bug-NUM_FOR_EDICT Error: Bad Pointer - 12-05-2004

Hey wow i just though about this i relized that everytime CS encounters an error it makes an error log. this is the error log it creates everytime it does the NUM_FOR_EDICT

Error:Failed to load dialog file Resource/UI/ClassMenu.res

Function trace:
CGameUI::Start
CGameUI::Initialize
CBaseUI::Start
CBaseUI::Initialize
Host_Init
CFileSystem_Steam::Mount()

Thats it i hope it helps
  
Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
Old
  (#28)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: Bug-NUM_FOR_EDICT Error: Bad Pointer - 12-05-2004

are you sure thats the log to the correct error?
that looks like a steam error...

well anyways any info can be useful...
as long as it's in the right direction..
but I don't know what to do with that info..
  
Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
Old
  (#29)
Huntkillaz
Member
 
Huntkillaz's Avatar
 
Status: Offline
Posts: 594
Join Date: Mar 2004
Location: Middle Earth (New Zealand)
Default Re: Bug-NUM_FOR_EDICT Error: Bad Pointer - 12-05-2004

thats steam error ..happens without bots too in normal play.....

this error is definatley coz of the bot move or combat when an intense battle happens....i've been playing with them (2.1) for a while with no error...(good )i think we need printf fuctions to trace this bug... too bad it's one of those that haapen once in a while (for me at least)


●_•
  
Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
Old
  (#30)
biohazerd87
Moderator by day Waypointer by night
 
biohazerd87's Avatar
 
Status: Offline
Posts: 1,039
Join Date: Apr 2004
Location: Missouri
Default Re: Bug-NUM_FOR_EDICT Error: Bad Pointer - 12-05-2004

Yes well i suspected it was it i tested it to make sure i had like 5 of these logs so i played CS again and let it crash and then i had 6 logs so i assumse that was the problem
  
Closed Thread


Currently Active Users Viewing This Thread: 4 (0 members and 4 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com