TimZaman / dotaservice

DotaService is a service to play Dota 2 through gRPC
Other
110 stars 19 forks source link

Time sync of radiant/dire teams upon reset not stable. #33

Open TimZaman opened 5 years ago

TimZaman commented 5 years ago

Ex (0.3.2):

ValueError: dota_time discrepancy in depleting initial worldstate queue.
at reset (/root/dotaservice/dotaservice/dotaservice.py:439)
at request_handler (/root/.local/lib/python3.7/site-packages/grpclib/server.py:327)
sijiaxu commented 5 years ago

I also keep getting this error when launch the game. but, when I disable this part of code and use the GUI host mode, I stuck at the map loading screen and can not enter the game. Does this discrepancy in the two teams observation queue has any bad consequence, like this stuck problem?

TimZaman commented 5 years ago

Yeah that's exactly the problem.

TimZaman commented 5 years ago

Problem comes from what's explained in the last paragraph: https://github.com/TimZaman/dotaservice/blob/master/NOTES.md

sijiaxu commented 5 years ago

Thanks, but it seems cannot causing the stuck problem, I can not receive any normal observation(status='ok') in my client after launching the game.

TimZaman commented 5 years ago

Yep but that's because of this issue. Will try to solve tomorrow or something

On Mon, Jan 7, 2019, 23:11 sijia xu <notifications@github.com wrote:

Thanks, but it seems cannot causing the stuck problem, I can not receive any normal observation(status='ok') in my client after launching the game.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/TimZaman/dotaservice/issues/33#issuecomment-452197417, or mute the thread https://github.com/notifications/unsubscribe-auth/AHXSRC5dAUt-qexTz5NNQls4jzpgr7rrks5vBESsgaJpZM4ZyniI .

sijiaxu commented 5 years ago

another question, you mention set the render to true in order to see the GUI, is that referring to use the HOST_MODE_GUI mode?

TimZaman commented 5 years ago

I made the worldstate to be pushed threaded now, can you check if this solves the time discrepancy?

sijiaxu commented 5 years ago

yes, the time discrepancy error has gone, but I still stuck at the 'DOTA_GAMERULES_STATE_PRE_GAME' state, I cannot receive the world state message after that, detail log can be seen here https://github.com/TimZaman/dotaservice/issues/35

I go through the console log, there are some errors, the lack of libtensorflow.so and some .vhcg files, but it seems not the big problems after google. so how can I debug my problems like debug option and tools? I doubt there are some problems in the dota's configure, causing game freeze and no world state sended out.

TimZaman commented 5 years ago

still an issue for me sporadically even with threaded.

lenLRX commented 4 years ago

when i set ticks_per_observation to 1, i got ValueError: dota_time discrepancy in depleting initial worldstate queue.

when i set it to 2, i got assert queue.qsize() == 0 in observe()

It seems sync between two team caused a lot trouble. But I wonder whether it is neccesery to keep sync. For me, i don't think so, i just want get the latest tick and it is ok to drop any data that i missed.