Ubuntu, can not reset environment with steam turning on.
Hi, thanks for your reading first.
Environment
Ubuntu 18.04.1. The newest steam, Dota2 client and code up to date (10/12/2018).
Problem
- Turn on steam.
- Start server,
python3 -m dotaservice - Run test code. This just do the init jobs (import lib, define variables ...) and calling
state = await asyncio.wait_for(env.reset(config))
When i do as 1 2 3 (whether with and without rendering), the server will blocked at
(py) worldstate @ dotatime=-89.23334503173828, gamestate=4
The last few logs are showing below:
(py) worldstate @ dotatime=-12.10013198852539, gamestate=8
Act::
Observe:: cout
Observe:: cerr
(py) worldstate @ dotatime=-12.10013198852539, gamestate=8
Act::
S:Gamerules: entering state 'DOTA_GAMERULES_STATE_WAIT_FOR_MAP_TO_LOAD'
S:Gamerules: entering state 'DOTA_GAMERULES_STATE_PRE_GAME'
m_flPreGameStartTime set to 31.13
m_flStateTransitionTime set to 121.13
Height map file (maps/prefabs/promotional_radiant_fountain.vhcg) not found, this will make ground height traces more expensive! Recompile the map to generate a height map.
Height map file (maps/prefabs/promotional_dire_fountain.vhcg) not found, this will make ground height traces more expensive! Recompile the map to generate a height map.
Observe:: cout
Observe:: cerr
(py) worldstate @ dotatime=-89.23334503173828, gamestate=4
But when i do as 2 3 4, without turn on steam client, it can work correctly. Some logs are:
(py) worldstate @ dotatime=-12.10013198852539, gamestate=8
Act::
Observe:: cout
Observe:: cerr
(py) worldstate @ dotatime=-12.10013198852539, gamestate=8
Act::
S:Gamerules: entering state 'DOTA_GAMERULES_STATE_WAIT_FOR_MAP_TO_LOAD'
S:Gamerules: entering state 'DOTA_GAMERULES_STATE_PRE_GAME'
m_flPreGameStartTime set to 31.13
m_flStateTransitionTime set to 121.13
Height map file (maps/prefabs/promotional_radiant_fountain.vhcg) not found, this will make ground height traces more expensive! Recompile the map to generate a height map.
Height map file (maps/prefabs/promotional_dire_fountain.vhcg) not found, this will make ground height traces more expensive! Recompile the map to generate a height map.
Observe:: cout
Observe:: cerr
(py) worldstate @ dotatime=-89.23334503173828, gamestate=4
(py) lua_config = {'step': 30, 'dota_time': -88.966682434082}
(py) lua config received= {'step': 30, 'dota_time': -88.966682434082}
(py) writing live config= {'calibration_dota_time': -89.23334503173828}
DotaService::step()
I compared the two logs, it seems without steam running, it can not load steam API. Can this be one reason of the block? I doesn't know much about Steam and Dota2 APIs, and doesn't know how to debug this error. Thanks for your helping!
Thanks for you report, I'll look into it. Some observations:
- You can only run 1 instance of dota at the same time
- In order to render the dota GUI, you need to have steam on (so it can find the steam DLL)
- Running Dota dedicated (without rendering) without having steam on will result into warnings that can be ignored, it doesn't actually use.
That doesn't help your issue though does it? You also list "Observe:: cout (..) Observe:: cerr" what are those?
Thanks for you report, I'll look into it. Some observations:
- You can only run 1 instance of dota at the same time
- In order to render the dota GUI, you need to have steam on (so it can find the steam DLL)
- Running Dota dedicated (without rendering) without having steam on will result into warnings that can be ignored, it doesn't actually use.
That doesn't help your issue though does it? You also list "Observe:: cout (..) Observe:: cerr" what are those?
- Yes, i only run one instance.
- When the steam is on, it will load stem DLL. I think the problem may caused by this. E.g. New steam DLL doesn't match cause
DOTA_GAMERULES_STATE_PRE_GAMEfailed? - Without steam on, i can get the world state successfully.
- I think the "Observe:: cout (..) Observe:: cerr" is come from the
Observefunction indotaservice/botcpp_dire.cpp. I compile this file and copy the.sotodota/scripts/vscripts/bots/to load when init bots.
By the way, the logs with steam on print a lot of "FS: Tried to Write NULL file handle!", which i think is just warning and should not influence other jobs. Doesn't check.
I guess the block may caused by loaded steam DLL. Since this is one difference between the logs of with and without steam on that i found. I didn't find other difference until now.
Interesting. How did you compile the botcpp_dire.so? Command and compiler v?
Interesting. How did you compile the
botcpp_dire.so?
Use this command g++ -shared -o botcpp_dire.so -fPIC botcpp_radiant.cpp. Same as shown in dotaservice/botcpp/README.md
That cannot be the right command. You're missing includes.. Anyway I think I figured that part out.
That cannot be the right command. You're missing includes.. Anyway I think I figured that part out.
I am not quite understand what to includes? Do you mean protobuf? I already exported it. It did not show any warning or error during compiling.
Besides, these .so can work when steam is off. Maybe the bot .so is not the problem?
I can confirm steam only needs to be turned on (or even installed!) when you want the graphical interface. It runs fine on a docker container without steam..