IPB

Welcome Guest ( Log In | Register )

3 Pages V < 1 2 3 >  
Reply to this topicStart new topic
> Download
Cheeseh
post Nov 7 2018, 06:48 AM
Post #21


Admin
*****

Group: Admin
Posts: 2,999
Joined: 11-September 03
From: uk
Member No.: 1



QUOTE(Cheeseh @ Nov 5 2018, 08:10 PM) *

opens later should be fixed now .. also buttons dont need to be visible at important waypoints... still to add bots pressing buttons when needing to get through doors
ps. added your waypoint to the git


Hey madmax . I added a new command

Rcbot.waypoint_convert_type (from) (to)

E.g.

Rcbot.waypoint_convert_type end important

Will change all end waypoints to important waypoints

Needed for this version
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
madmax2
post Nov 7 2018, 06:43 PM
Post #22


RCBot Guru
*****

Group: Waypointers
Posts: 804
Joined: 2-March 12
From: USA, WA state
Member No.: 2,162



Sorry for late reply, having a mechanical problem with my car I must tend to immediately. sad.gif

I did test openslater, and that is working good now... smile.gif

Rcbot.waypoint_convert_type (from) (to) sounds good. So I could convert all crouch-jump wpts to jump wpts? Or any wpt type to any other wpt type?

I had begun working on converting desertcircle again, changed all objectives to important. I'll check out what you did later today, thanks. So with this new command I could use that to change all objective to important wpts?

FYI, Quarter still had some buggyness with the doors in the spawn rooms and the ammo rack in 3rd area spawn (defend computer area?). So I didn't consider it done yet. And desertcircle has some unimplemented/untested ladders. I assume you will update the git as I post updated/fixed wpts?

I was going to start a WIP topic for converted rcwa's in the waypoints forum, and put all my conversions in one topic, and one zip, where you could just copy the whole zip over to the git each time i update it with new conversions/fixes, etc... Just haven't got enough done to do that yet...

I'm hoping to get more done this week, now that i'm back home now. Hopefully the car problem won't be a huge drain on my time?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Nov 7 2018, 06:50 PM
Post #23


Admin
*****

Group: Admin
Posts: 2,999
Joined: 11-September 03
From: uk
Member No.: 1



QUOTE(madmax2 @ Nov 7 2018, 06:43 PM) *

Sorry for late reply, having a mechanical problem with my car I must tend to immediately. sad.gif

I did test openslater, and that is working good now... smile.gif

Rcbot.waypoint_convert_type (from) (to) sounds good. So I could convert all crouch-jump wpts to jump wpts? Or any wpt type to any other wpt type?

I had begun working on converting desertcircle again, changed all objectives to important. I'll check out what you did later today, thanks. So with this new command I could use that to change all objective to important wpts?

FYI, Quarter still had some buggyness with the doors in the spawn rooms and the ammo rack in 3rd area spawn (defend computer area?). So I didn't consider it done yet. And desertcircle has some unimplemented/untested ladders. I assume you will update the git as I post updated/fixed wpts?

I was going to start a WIP topic for converted rcwa's in the waypoints forum, and put all my conversions in one topic, and one zip, where you could just copy the whole zip over to the git each time i update it with new conversions/fixes, etc... Just haven't got enough done to do that yet...

I'm hoping to get more done this week, now that i'm back home now. Hopefully the car problem won't be a huge drain on my time?


change all end waypoints to"important", add one end waypoint at the last hurdle of the map.

the bots will 'jump and crouch' anyway with normal jump waypoints, so maybe need to change the crouch jump name to 'long jump'. so yeah maybe for now best also changing crouch jump to normal jump.


User is offlineProfile CardPM
Go to the top of the page
+Quote Post
madmax2
post Nov 9 2018, 06:41 PM
Post #24


RCBot Guru
*****

Group: Waypointers
Posts: 804
Joined: 2-March 12
From: USA, WA state
Member No.: 2,162



You seem to be making good progress, been following your git changes, nice work... smile.gif

I should have more time today to work on wpts... I worked on & tested intruder last night, tested one of 2 routes. Bots were able to get to the end of the map after a few tweaks. Began work on sc_doc too. I'll probably have a few questions, need to work with the bots a bit more, first...

Should receive my car part today, will only take an hour to replace it... Then I can focus my time on this... smile.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Poka
post Nov 10 2018, 07:11 AM
Post #25


Member
**

Group: Members
Posts: 17
Joined: 28-February 08
Member No.: 1,314



Cool to see RCBot active again cool.gif

I tested it on Windows and seemed to work just fine but on linux the bots crash the server almost immediately. I ran with developer 2 and got this:

CODE

SUB_Remove called on entity with health > 0
L 10/11/2018 - 08:14:02: FATAL ERROR (shutting down): NUM_FOR_EDICT: bad pointer
FATAL ERROR (shutting down): NUM_FOR_EDICT: bad pointer


Any idea what could be causing this?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Nov 10 2018, 08:52 AM
Post #26


Admin
*****

Group: Admin
Posts: 2,999
Joined: 11-September 03
From: uk
Member No.: 1



QUOTE(Poka @ Nov 10 2018, 07:11 AM) *

Cool to see RCBot active again cool.gif

I tested it on Windows and seemed to work just fine but on linux the bots crash the server almost immediately. I ran with developer 2 and got this:

CODE

SUB_Remove called on entity with health > 0
L 10/11/2018 - 08:14:02: FATAL ERROR (shutting down): NUM_FOR_EDICT: bad pointer
FATAL ERROR (shutting down): NUM_FOR_EDICT: bad pointer


Any idea what could be causing this?


Try to run with "as_log_level 3" and developer 2 then if it happens again check the latest log in svencoop/logs
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Poka
post Nov 10 2018, 12:43 PM
Post #27


Member
**

Group: Members
Posts: 17
Joined: 28-February 08
Member No.: 1,314



QUOTE(Cheeseh @ Nov 10 2018, 10:52 AM) *

Try to run with "as_log_level 3" and developer 2 then if it happens again check the latest log in svencoop/logs


Cant get anything but the bad pointer error in the logs. Nothing in angelscript logs either. Also seems like the SUB_removed line was a one time thing only and not the problem.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
RoboCop
post Nov 10 2018, 01:55 PM
Post #28


RCBot Fan
****

Group: Moderator
Posts: 116
Joined: 17-December 15
From: Dundee, Scotland
Member No.: 2,435



QUOTE(Poka @ Nov 10 2018, 12:43 PM) *

Cant get anything but the bad pointer error in the logs. Nothing in angelscript logs either. Also seems like the SUB_removed line was a one time thing only and not the problem.

Well those BAD POINTER crashes appear to occur a lot in Osprey map, but some other maps maybe affected by that crash.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Poka
post Nov 10 2018, 02:41 PM
Post #29


Member
**

Group: Members
Posts: 17
Joined: 28-February 08
Member No.: 1,314



QUOTE(RoboCop @ Nov 10 2018, 03:55 PM) *

Well those BAD POINTER crashes appear to occur a lot in Osprey map, but some other maps maybe affected by that crash.

Tried hplanet, sc_another and osprey. I get bad pointers in all of them in under a minute.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Solokiller
post Nov 12 2018, 01:46 PM
Post #30


Member
**

Group: Members
Posts: 23
Joined: 17-December 16
Member No.: 2,482



The Bot Manager script was a sample that i made, it was never tested much so it probably has some issues. At a glance i think the issue is that bot entity handles are retained between map changes, which can result in the edict handle becoming invalid.

This puts the address for it outside the range of entities (sv.edicts <= handle < sv.edicts + sv.num_edicts * sizeof( edict_t ) ) which causes this error to occur when an engine function tries to get the index for an entity.

To fix this, always destroy all bots on map change and recreate them when a new map is started. The hooks for both events should already be available.

If that isn't the cause i'll take a closer look and see what i can find out. If it's happening on Linux then it should be possible to produce a stack trace, which should narrow things down. Using GDB it may be possible to get some more information.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Nov 12 2018, 08:00 PM
Post #31


Admin
*****

Group: Admin
Posts: 2,999
Joined: 11-September 03
From: uk
Member No.: 1



QUOTE(Solokiller @ Nov 12 2018, 01:46 PM) *

The Bot Manager script was a sample that i made, it was never tested much so it probably has some issues. At a glance i think the issue is that bot entity handles are retained between map changes, which can result in the edict handle becoming invalid.

This puts the address for it outside the range of entities (sv.edicts <= handle < sv.edicts + sv.num_edicts * sizeof( edict_t ) ) which causes this error to occur when an engine function tries to get the index for an entity.

To fix this, always destroy all bots on map change and recreate them when a new map is started. The hooks for both events should already be available.

If that isn't the cause i'll take a closer look and see what i can find out. If it's happening on Linux then it should be possible to produce a stack trace, which should narrow things down. Using GDB it may be possible to get some more information.


This error appears to happen whilst not changing map though, maybe even on the first map. I actually would have thought that it wouldn't matter to clear the bots per map change as it appears, correct me if I'm wrong, that the plugins are reloaded at map change -- and all memory would be flushed ? and /or do you mean here:

CODE


        HookReturnCode MapChange()
        {
// <--- put something in here?
            m_Bots.resize( 0 );
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Solokiller
post Nov 12 2018, 08:06 PM
Post #32


Member
**

Group: Members
Posts: 23
Joined: 17-December 16
Member No.: 2,482



Unless they've changed it plugins are not reloaded on map change.

Bots are dropped on changelevel so a handle to its CBasePlayer instance will become invalid. You should clear the handles out to avoid problems.

If the problem isn't related to this then you should run it with GDB to get a stack trace by putting a breakpoint in the NUM_FOR_EDICT function in its error condition code.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Nov 14 2018, 06:41 PM
Post #33


Admin
*****

Group: Admin
Posts: 2,999
Joined: 11-September 03
From: uk
Member No.: 1



QUOTE(Solokiller @ Nov 12 2018, 08:06 PM) *

Unless they've changed it plugins are not reloaded on map change.

Bots are dropped on changelevel so a handle to its CBasePlayer instance will become invalid. You should clear the handles out to avoid problems.

If the problem isn't related to this then you should run it with GDB to get a stack trace by putting a breakpoint in the NUM_FOR_EDICT function in its error condition code.


Hi solokiller , just to confirm --- which handle to CBasePlayer and when ? When bot is "disconnected" is that good enough? Also you mean the m_pPlayer handle ? Just set to null? Or do something more complicated? Thanks.

@Poka

Also if you connect to a server thinking you can use "as_command rcbot.addbot" , this might cause the same error. you must use rcon so you are executing the command on the server, not the client.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Solokiller
post Nov 14 2018, 06:49 PM
Post #34


Member
**

Group: Members
Posts: 23
Joined: 17-December 16
Member No.: 2,482



QUOTE(Cheeseh @ Nov 14 2018, 07:41 PM) *

Hi solokiller , just to confirm --- which handle to CBasePlayer and when ? When bot is "disconnected" is that good enough? Also you mean the m_pPlayer handle ? Just set to null? Or do something more complicated? Thanks.

@Poka

Also if you connect to a server thinking you can use "as_command rcbot.addbot" , this might cause the same error. you must use rcon so you are executing the command on the server, not the client.


Yeah the CBasePlayer handle. When a player is dropped the entity instance is also freed, whether it's a real or fake client doesn't matter.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
w00tguy123
post Nov 16 2018, 09:11 PM
Post #35


Advanced Member
***

Group: Members
Posts: 66
Joined: 9-March 07
Member No.: 1,069



Someone ran the osprey map with some bots and a debugger and saw this after the crash:

QUOTE
#3 0xe3616dbf in UTIL_FindEntityByClassname (pStartEntity=0x86c0b38, szName=0x8348ac0 "*") at [redacted]

Probably a corrupted reference passed to that at some point:
https://github.com/rcbotCheeseh/RCBotSven5/...tityByClassname
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Solokiller
post Nov 16 2018, 09:16 PM
Post #36


Member
**

Group: Members
Posts: 23
Joined: 17-December 16
Member No.: 2,482



Yeah the problem is probably that the entity that the handle in BotVisibles.as points to is removed between frames. Use an EHANDLE and it should be good, just make sure your code accounts for handle invalidation correctly.

If passing null is acceptable for your use case then it should work once it's an EHANDLE.

If you're wondering why the entity can be removed, it's because the type is registered with reference counting disabled so Angelscript handles to it don't keep it alive.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Nov 17 2018, 11:40 AM
Post #37


Admin
*****

Group: Admin
Posts: 2,999
Joined: 11-September 03
From: uk
Member No.: 1



QUOTE(Solokiller @ Nov 16 2018, 09:16 PM) *

Yeah the problem is probably that the entity that the handle in BotVisibles.as points to is removed between frames. Use an EHANDLE and it should be good, just make sure your code accounts for handle invalidation correctly.

If passing null is acceptable for your use case then it should work once it's an EHANDLE.

If you're wondering why the entity can be removed, it's because the type is registered with reference counting disabled so Angelscript handles to it don't keep it alive.


Hmm so what would be a quicker way to iterate through all entities on map without doing the maxEntities thing (too many loops of nothing) and avoiding this issue?? I remember w00tguy did some experiments . Though I'd rather not iterate too much pretty frame otherwise there'd be too much slow down of there are many bots
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Solokiller
post Nov 17 2018, 11:42 AM
Post #38


Member
**

Group: Members
Posts: 23
Joined: 17-December 16
Member No.: 2,482



Just store entities in an EHANDLE if you intend to keep it around for more than a frame. In other words, if you're just doing a while (FindEntitiesXXX) type loop you can use the entity handle directly, if you store it in a member or global or whatnot store it as an EHANDLE.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Poka
post Nov 17 2018, 03:51 PM
Post #39


Member
**

Group: Members
Posts: 17
Joined: 28-February 08
Member No.: 1,314



Seems like the crash issues have mostly gone after the latest updates. Good work cool.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Ryusho
post Dec 6 2018, 11:14 PM
Post #40


Member
**

Group: Members
Posts: 35
Joined: 25-December 08
Member No.: 1,436



QUOTE(madmax2 @ Nov 2 2018, 03:47 PM) *


--------------------------------------------------------------------------------------------------------------------------
Hey Ryusho, Nice to see you back... Let us know which maps you are working on, I'll be testing/fixing all
my waypoints first. Let us know if you see anything that looks buggy...



Heh, well at the moment I am manually Waypointing SC Tetris 1, ...Apparently I had some waypoints on my system that lead to the spawn area, and it was buggy there, since it had 'tank' waypoints at the buttons to open the spawn gate, but I fixed that and got them to open it.. *well i had to poke one button as they were all clustering on the same button..back and forth* but now I'm working on getting the pathing through it, and it's definitely interesting to do since I don't actually know the map that well myself, so I am learning it as I go.

*Edit* ..and akwardly I am having to look up a walkthrough for it because I got lost XD
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

3 Pages V < 1 2 3 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th February 2019 - 01:54 AM