Skip to content

Get error when opened many coordinators simultaneously #330

@monarchBacilluscoli

Description

@monarchBacilluscoli

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:

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<Coordinator> cors(100);
    ANBot bots1[100];
    ANBot bots2[100];
    int count = 100; // num of sc2 processes
    std::vector<std::future<void>> 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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions