Download |
Download |
Cheeseh |
Nov 7 2018, 06:48 AM
Post
#21
|
Admin Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 |
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 |
madmax2 |
Nov 7 2018, 06:43 PM
Post
#22
|
RCBot Guru Group: Waypointers Posts: 957 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.
I did test openslater, and that is working good now... 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? |
Cheeseh |
Nov 7 2018, 06:50 PM
Post
#23
|
Admin Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 |
Sorry for late reply, having a mechanical problem with my car I must tend to immediately. I did test openslater, and that is working good now... 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. |
madmax2 |
Nov 9 2018, 06:41 PM
Post
#24
|
RCBot Guru Group: Waypointers Posts: 957 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...
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... |
Poka |
Nov 10 2018, 07:11 AM
Post
#25
|
Member Group: Members Posts: 25 Joined: 28-February 08 Member No.: 1,314 |
Cool to see RCBot active again
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? |
Cheeseh |
Nov 10 2018, 08:52 AM
Post
#26
|
Admin Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 |
Cool to see RCBot active again 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 |
Poka |
Nov 10 2018, 12:43 PM
Post
#27
|
Member Group: Members Posts: 25 Joined: 28-February 08 Member No.: 1,314 |
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. |
RoboCop |
Nov 10 2018, 01:55 PM
Post
#28
|
RCBot Fan Group: Admin Posts: 192 Joined: 17-December 15 From: Dundee, Scotland Member No.: 2,435 |
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. |
Poka |
Nov 10 2018, 02:41 PM
Post
#29
|
Member Group: Members Posts: 25 Joined: 28-February 08 Member No.: 1,314 |
|
Solokiller |
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. |
Cheeseh |
Nov 12 2018, 08:00 PM
Post
#31
|
Admin Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 |
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 ); |
Solokiller |
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. |
Cheeseh |
Nov 14 2018, 06:41 PM
Post
#33
|
Admin Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 |
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. |
Solokiller |
Nov 14 2018, 06:49 PM
Post
#34
|
Member Group: Members Posts: 23 Joined: 17-December 16 Member No.: 2,482 |
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. |
w00tguy123 |
Nov 16 2018, 09:11 PM
Post
#35
|
Advanced Member Group: Members Posts: 69 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 |
Solokiller |
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. |
Cheeseh |
Nov 17 2018, 11:40 AM
Post
#37
|
Admin Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 |
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 |
Solokiller |
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.
|
Poka |
Nov 17 2018, 03:51 PM
Post
#39
|
Member Group: Members Posts: 25 Joined: 28-February 08 Member No.: 1,314 |
Seems like the crash issues have mostly gone after the latest updates. Good work
|
Ryusho |
Dec 6 2018, 11:14 PM
Post
#40
|
Member Group: Members Posts: 37 Joined: 25-December 08 Member No.: 1,436 |
-------------------------------------------------------------------------------------------------------------------------- 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 |
Lo-Fi Version | Time is now: 4th November 2024 - 07:46 PM |