ocraft / ocraft-s2client

StarCraft II Client - Java library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.
MIT License
55 stars 15 forks source link

Threading Response not consumed #57

Closed ShadowLordAlpha closed 1 year ago

ShadowLordAlpha commented 2 years ago

When using threads with batch requests, specifically placing in this case, sometimes an error with the response not consumed is thrown and crashes. This does not occur when simply running on one thread even if this thread is different then the main thread (though the main does wait for it)

Error Detected[RESPONSE_NOT_CONSUMED, SC2_UNKNOWN_STATUS] Proto []

ShadowLordAlpha commented 2 years ago

agent.query().getAbilitiesForUnits(unitCreepCreator, false);

Can also trigger it, interestingly the response is actually returned as well, its just not marked or something. removing both queries from the code and it works as expected in multi-thread. also .setMultithreaded(true) is set as well

The images used for creep and placement do actually work and are usable in place of this though I don't believe there is any replacement for the abilities like this

ShadowLordAlpha commented 1 year ago

Fixed by pull request #70