.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Bug Reports (http://forums.bots-united.com/forumdisplay.php?f=49)
-   -   Bug-NUM_FOR_EDICT Error: Bad Pointer (http://forums.bots-united.com/showthread.php?t=1586)

sPlOrYgOn 21-05-2004 02:13

Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
 
yea we already know that..
just try de_prodigy..
crashes pretty fast..
sometimes right when one bot joins..

[edit]
WOOT!
I have finally narrowed the bug down to one piece of code :D
Code:

        // find a reachable target button
        while (!FNullEnt (pButton = FIND_ENTITY_BY_STRING (pButton, "target", STRING (tr.pHit->v.targetname))))
        {
            v_button_origin = VecBModelOrigin (pButton);

            TRACE_LINE (v_trace_start, v_button_origin, ignore_monsters, pEdict, &tr2);
            if ((tr2.pHit == pButton) || (tr2.flFraction > 0.95))
            {
              pBot->dest_origin = v_button_origin;
              pBot->f_wpt_timeset = gpGlobals->time;
              pBot->bCheckTerrain = FALSE;

              if (((v_button_origin - pEdict->v.origin).Length () < 40)
                  && (RANDOM_LONG (1, 100) < 10))
                  pEdict->v.button |= IN_USE;

              break;
            }
        }

This code is from BotDoWaypointNav().
It is when it is searching for the button that will open a door..
I don't see what is wrong with this code yet tho..
if anyone can help it'd be appreciated.
I will also upload a new podbot BETA dll
for those of you who get NUM_FOR_EDICT error a lot or know how to get it very well..
Tell me if the dll fixes it.
BETA DLL HERE!
[/edit]

[edit2]
some more narrowing...
Code:

while (!FNullEnt (pButton = FIND_ENTITY_BY_STRING (pButton, "target", STRING (tr.pHit->v.targetname))))
the first time it reaches that piece of code it gives the NUM_FOR_EDICT error.
I have no idea what the arguments for FIND_ENTITY_BY_STRING are...
any help on that?
[/edit2]

[edit3]
HAHHA
screw this :P
It's Fixed :D
I'll upload a new PODBOT BETA DLL..
just use the same link as above..
[/edit3]

[edit4]
oops forgot to tell you guys how i fixed it...
all i did was add
Code:

pButton = NULL;
right before the loop and it's fixed :D
[/edit4]

[edit5]
Please test to see if it is fixed for all of us..
[/edit5]

biohazerd87 21-05-2004 04:09

Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
 
Well I ran a server with 17 bots and it didn't crash ( I ran the server for about 10 mins) I think you have fixed it. You are the man!!!

sPlOrYgOn 21-05-2004 04:15

Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
 
well if you say so... :D

I'll add a few features and stuff because just one bug fix isn't enough for a release :D

biohazerd87 21-05-2004 05:09

Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
 
Yeah I think when you fixed this bug it also had a good effect on the bots difficulty. They seem to monuvier and shoot better nice job!

Pierre-Marie Baty 21-05-2004 06:24

Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
 
Congratulations sPlOrYgOn! :)
Sincerely!
You're the man :)

KWo 21-05-2004 08:58

Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
 
You are Great, sPlOrYgOn!!! Congratulations!!!
Yes - all of these maps noticed by people as generating this bug - all they have some button to "use" near some doors. This night I experienced one map more with this bug (cs_arabstreets, but I had not time to repeat the test with this map) - this map has the button to open the door, too.:)

Aragon 21-05-2004 12:51

Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
 
Great! Can you plz make us an podbot_mm_i386.so to?

biohazerd87 21-05-2004 13:55

Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
 
Splor I can't say it enough you are the man!!! Hey, I am really trying to learn C++ maybe someday i can help you it's just that I'm not old enough to take the classes for it yet so I have to teach programming languages myself. I know VB which isn't all that hard but it helps on the path to C++.

>BKA< T Wrecks 21-05-2004 16:23

Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
 
/Me pops a beer and hoists one for sPlOrYgOn...

mega-w00t! Thank you a million times - you da man! :D
Strange, I really don't know why I got this error on maps without buttons, but I'll test and see if it works.

KWo 21-05-2004 18:00

Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
 
OK - today I tested 5 times last R2.1 on cs_arabstreets and every first minute the server was crashed with this NUM_FOR_EDICT. So this map for me was the best for test (for example on cs_office I had wait about 10 min to see this crash). Right now, I 'm testing this beta version and my HLDS win32 CS1.5 is still working (about 0.5 hour) on this cs_arabstreets. Seems it's really fixed!!!
God job!http://forums.bots-united.com/images/icons/icon8.gif

Quote:

Originally Posted by sPlOrYgOn
I'll add a few features and stuff because just one bug fix isn't enough for a release :D

OK - look to the Idea and Bug reports subforums - I think there is a lot of job. But if this is still not sufficient for You - I can report few bugs and ideas more - no problem.http://forums.bots-united.com/images/icons/icon8.gif


All times are GMT +2. The time now is 23:12.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.