Blizzard / Blizzard/s2client-api

Get error when opened many coordinators simultaneously

Open
#330 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.7k
Forks
280
PR merge metrics
No merged PRs in 30d

Description

I want to launch many (about 100-200) sc2 games at the same time.
during their launch, there is always an error shown 2-3 times like this :
```
Deferred error: 536936448 (0x20010000)
Deferred error details: Bad profiling data. TimeMS: 22722180.000000 Conversion: 1.000000e-03
```
I have no idea about it and I can not find anything through directly searching the error.

The code is like this:
```C
void CSetAndStart(Coordinator &cor, int port, int argc, char *argv[], Agent *bot1, Agent *bot2)
{
cor.LoadSettings(argc, argv);
cor.SetParticipants({CreateParticipant(Terran, bot1), CreateParticipant(Terran, bot2)});
cor.SetPortStart(port);
cor.SetMapPath("PCANP_EnemyZealotModVSMarines.SC2Map"); // map designed by myself
cor.SetStepSize(1);
cor.LaunchStarcraft();
cor.StartGame();
}

int main(){
std::vector cors(100);
ANBot bots1[100];
ANBot bots2[100];
int count = 100; // num of sc2 processes
std::vector> cors_futures(100);
for (int i = 0; i < count; ++i) // launch, the error occured during the launch process
{
cors_futures[i] = std::async(std::launch::async, CSetAndStart, std::ref(cors[i]), 4000 + 10 * i, argc, argv, &(bots1[i]), &(bots2[i]));
}
for (int i = 0; i < count; ++i)
{
cors_futures[i].wait();
}
return 0;
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.