Blizzard / Blizzard/s2client-api

Loading replay files fails on Windows

Open
#220 3 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

Hi,

I am trying to process replays in order to extract some features out of them. I use a custom ReplayObserver and this is how the main function looks like:

```
int main(int argc, char* argv[]) {
sc2::Coordinator coordinator;
if (!coordinator.LoadSettings(argc, argv)) {
return 1;
}

if (!coordinator.SetReplayPath(kReplayFolder)) {
std::cout << "Unable to find replays." << std::endl;
return 1;
}

Replay replay_observer;

coordinator.SetStepSize(16);
coordinator.SetRealtime(false);

coordinator.AddReplayObserver(&replay_observer);

while (coordinator.Update());
while (!sc2::PollKeyPress());
}
```

following is the output and the error I am getting:
```
Launched SC2 (C:\Games\StarCraft II\Versions\Base59587\SC2_x64.exe), PID: 3212
Waiting for connection....
Connected to 127.0.0.1:8167
Replay is from a different version. Relaunching client into the correct version...
Launched SC2 (C:\Games\StarCraft II\Versions\Base55958\SC2_x64.exe), PID: 12652
Waiting for connection..
Connected to 127.0.0.1:8168
map_name: 奥德赛 - 天梯版`
WaitForReplay: start replay contains an error: 7
WaitForReplay: error details: The launch of this game makes reference to mod or map dependencies which are no longer available.
map_name: Abyssal Reef LE
WaitForReplay: start replay contains an error: 7
WaitForReplay: error details: The launch of this game makes reference to mod or map dependencies which are no longer available.
```

I have the replay and map files in their respective folders in the root of my StarCraft II installation directory. Moreover, the code works fine on Linux.

I tried to debug the issue and I fond out that the ReplayInfo objects for each replay have a seemingly random sequence of characters for their map_name attributes, i.e.: `奥德赛 - 天梯版`
Even though some replays have correct map_name in their ReplayInfo: `Abyssal Reef LE` the error is still the same for those as well.

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.