davechurchill / StarcraftAITournamentManager

Tournament Manager Software for StarCraft AI Competitions
MIT License
77 stars 43 forks source link

Client gets stuck in loop on: CMD /C taskkill /T /F /IM StarCraft.exe #17

Closed BryanSWeber closed 6 years ago

BryanSWeber commented 6 years ago

I have the server and client set up on local machine, and another client in a Win10VM.

The clients see the server, and can start starcraft.

Problem: The clients (on either machine) when hitting the CMD /C taskkill /T /F /IM StarCraft.exe cannot continue further. BW does not close for them, freezing the tournament.

BryanSWeber commented 6 years ago

Partial solution: 1) closing client 2) manually opening the shell and running taskkill.exe with parameters desired:

cd / cd Windows cd System32 taskkill.exe /T /F /IM StarCraft.exe

or killing it through taskmanager.

However, the bot will not be in an appropriate state to start a new game from here. Instead, it will freeze on attempting to join the next game.

I can then stop the tournament manually and resume it. The bots find this acceptable and continue the game. I have played against AIUR but not UAB (it fails to find the UAB .dll, unclear why.)

The TM then again freezes at the conclusion of the game.

BryanSWeber commented 6 years ago

Solution: ~/client/bwapi.ini

Change auto_restart = ON

BryanSWeber commented 6 years ago

Ooops! Closed this prematurely.

That did not resolve the issue. However, I may now click OK to manually resume.

davechurchill commented 6 years ago

Sounds like something system related, haven't run into this issue in a long long time with the TM. Try running all clients in VMs and see if that fixes the issues. Since we did not run into this for the most recent AIIDE tournament I will close this until more people start reporting it, but we can keep talking about it here

BryanSWeber commented 6 years ago

I've set it up in a VM Win10(x64) and a VM Win7(x32) between each other and the problem persisted. I could share the virtualbox files if you would like.

I've tried changing the BWAPI.ini files contained within required_XXX.zip to have auto_restart=ON as well, but it did not improve the situation.

As a less serious (but perhaps related?) problem, UAB is one of the few bots I cannot play against (fails to find .dll), while the other bots do load (so long as I manually resume between each round.)

davechurchill commented 6 years ago

Then you are doing something wrong in the set-up. What year version of UAB are you using? This year's version was an .exe

BryanSWeber commented 6 years ago

I used the ones bundled with the 2016_AIIDE.zip and set it to "1vsAll" to see how all the bots were doing. I'll try again tomorrow morning with fresh images and a fresh pull from github and see what happens. If you have any ideas about how I'm installing it wrong to lead to this particular problem, I'd be happy to hear.

davechurchill commented 6 years ago

Make sure the config file matches the bots you are using. Sounds like you might be using the 2017 config file with the 2016 bots

BryanSWeber commented 6 years ago

I tried a fresh pair of VMs and a a clean restart. I have tried changing the client's bwapi.ini file to match that from one of the: Required_BWAPI_XXX.zip Is there another .ini file I should instead?

Here is a screenshot of the server and command windows VM postgame (AIUR vs inert UAB) https://snag.gy/6LEWiw.jpg

Upon clicking OK in SC:BW's victory screen, the replays are all present and accounted for in the Server VM. The TM then correctly moves to the next round.

davechurchill commented 6 years ago

@richard-kelly

richard-kelly commented 6 years ago

Neither of those bwapi.ini files actually do anything. The version that gets used is written out by the TM client using hard-coded values and the correct bot names, etc. for the game being scheduled. I had thought that was the case but hadn't confirmed it until now. There are a few old bits of functionality like that which should be removed.

So that's not an issue. I'm thinking it has to do with the client machine setups. What version of Java is installed on the client VMs? Also, there is an issue where two of the C++ redists won't install using the script provided, but that shouldn't affect the TM client killing the StarCraft process.

I had a weird issue the last time I set up a fresh client VM, but I forget the symptom. I'm going to try to recreate it and see if it's the same.

With UAlbertaBot, is it the error that BWAPI reports in the game when it can't find the bot dll? The server_settings.json file and the 2016 bots included with the TM match up and there shouldn't be any issue there.

There may be issues with using paths other than C:\TM\Starcraft for the install directory.

richard-kelly commented 6 years ago

The UAlbertaBot issue is likely that you haven't copied some dlls required for it into either the Windows or Starcraft directory (either is fine) on the client machine : libgmp-10.dll and libmpfr-4.dll

You can get those from the BWTA 2.2 installer in the Windows directory. https://bitbucket.org/auriarte/bwta2/downloads/

richard-kelly commented 6 years ago

I made a small change in the alpha branch to fix a problem I was having. I don't think it would cause your issue, but you should give it a try.

BryanSWeber commented 6 years ago

I have repeated the install process again using a fresh pull from this git.

1) Fresh Win7 (32 bit win 7) 2) Moved Client over 3) Installed SC (no spaces), use C:\TM\Starcraft as the directory of choice. I also moved libgmp-10.dll and libmpfr-4.dll to C:\TM\Starcraft. 4) Installed BWAPI 4.1.2 (Some others have included this step to make sure SC is in the registry. 5) installed VS-redists manually. Vs2015 often gets stuck. Have to uninstall and reinstall it. 6) Install jdk 8 - win i586 7) Set PATH system variable to: c:\program files\java\jdk1.8.0_151\bin 8) Win + R set HKLM->Software permissions for user to full. (32 bit win 7) 9) Set client to connect to host. 10) Set client to find SC.

Notes: -UAB still fails to find the .dll. The path is C:\TM\Starcraft\Starcraft.exe -The folder TM is empty except for .\Starcraft