Giter VIP home page Giter VIP logo

Comments (27)

KevinCalderone avatar KevinCalderone commented on May 13, 2024 6

Looked into this. There was a crash bug introduced in 3.17 when doing a "RequestData" query on a map using campaign mods. This should only impact the CollectMineralShards mini game map. (As tewalds mentioned, that is the only one that uses campaign data)

The fix has been implemented for the 3.18 release.

from pysc2.

KevinCalderone avatar KevinCalderone commented on May 13, 2024 5

I am able to reproduce this. I can look into it on Tuesday.

There is a way to downgrade back to 3.16.1 but it is a bit annoying since PySC2 hasn't added support for it.

A hacky way of doing it:

  • Make sure you have the 3.16.1 binary still installed:
    • You should see this folder: C:\Program Files (x86)\StarCraft II\Versions\Base55958
    • If missing, launch the game normally and play an old 3.16.1 replay which should download it.
  • Rename the other BaseXXXXX folders to something else to force PySC2 to only find the 55958 one.
  • In "pysc2/lib/sc_process.py", add this to the list of command line arguments:

from pysc2.

KevinCalderone avatar KevinCalderone commented on May 13, 2024 2

@wwxFromTju Here are some more details steps for the first bullet of my above steps:

  1. Download the 3.16.1 map pack. (Download Link)
  2. Extract one of the replays from the pack.
  3. Launch StarCraft II through the Blizzard app.
  4. Click on the "Replays" tab.
  5. Click on the "Show in Folder" button near the top. (This will open an explorer window to your replays folder)
  6. Copy the replay into this folder.
  7. In SC2, click on the "Multiplayer" tab and then the "Replays" tab again. (This will force it to refresh and show the replay you copied in)
  8. Double click on the replay name to play it.
  9. This will show an warning dialog saying you need to go offline to watch the replay. Press "Load" to continue.
  10. You will see a progress bar of it downloading the old version.

The old game version should now be downloaded, and you should see a Base55958 folder in your Versions folder.

from pysc2.

KevinCalderone avatar KevinCalderone commented on May 13, 2024 1

Oh sorry I thought you were referencing the crash from the top of this issue.

My comment here is likely still accurate.

I still don't think PySC2 has added old version support yet. I see in your screenshot it is launching the 3.18 version of the game. Replays only work with the game version they originally were played on.

I defer to @tewalds on what the timeline for this is.

from pysc2.

wwxFromTju avatar wwxFromTju commented on May 13, 2024

I also map editor to create new map, the new map also can run. just CollectMineralShards have problem

from pysc2.

tewalds avatar tewalds commented on May 13, 2024

I can't replicate that problem, and unfortunately the error message you posted only says that SC2 quit or crashed. We'd need more details than that. One difference between that map and the rest is that it depends on one of the campaign mods. Are you using the starter edition?

from pysc2.

4rChon avatar 4rChon commented on May 13, 2024

Hi, I am also getting a similar* error.

On Windows 10, with the latest expansion (Legacy of the Void), Python 3.5.3

python -m pysc2.bin.agent --map CollectMineralShards --agent pysc2.agents.scripted_agent.CollectMineralShards
Traceback (most recent call last):
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 61, in catch_websocket_connection_errors
    yield
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 152, in _read
    response_str = self._sock.recv()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 293, in recv
    opcode, data = self.recv_data()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 310, in recv_data
    opcode, frame = self.recv_data_frame(control_frame)
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 323, in recv_data_frame
    frame = self.recv_frame()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 357, in recv_frame
    return self.frame_buffer.recv_frame()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_abnf.py", line 340, in recv_frame
    self.recv_header()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_abnf.py", line 288, in recv_header
    header = self.recv_strict(2)
  File "C:\Program Files\Python35\lib\site-packages\websocket\_abnf.py", line 375, in recv_strict
    bytes_ = self.recv(min(16384, shortage))
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 427, in _recv
    return recv(self.sock, bufsize)
  File "C:\Program Files\Python35\lib\site-packages\websocket\_socket.py", line 80, in recv
    bytes_ = sock.recv(bufsize)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python35\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Program Files\Python35\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\bin\agent.py", line 112, in <module>
    app.run(main)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\app.py", line 57, in run
    really_start(main or sys.modules["__main__"].main)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\app.py", line 51, in really_start
    sys.exit(main(argv))
  File "C:\Program Files\Python35\lib\site-packages\pysc2\bin\agent.py", line 98, in main
    run_thread(agent_cls, FLAGS.map, FLAGS.render)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\bin\agent.py", line 74, in run_thread
    visualize=visualize) as env:
  File "C:\Program Files\Python35\lib\site-packages\pysc2\env\sc2_env.py", line 185, in __init__
    static_data = self._controller.data()
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\remote_controller.py", line 151, in data
    return static_data.StaticData(self.data_raw())
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\remote_controller.py", line 80, in _valid_status
    return func(self, *args, **kwargs)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\stopwatch.py", line 197, in _stopwatch
    return func(*args, **kwargs)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\remote_controller.py", line 147, in data_raw
    ability_id=True, unit_type_id=True))
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 127, in send
    res = self.send_req(sc_pb.Request(**kwargs))
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 113, in send_req
    return self.read()
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\stopwatch.py", line 197, in _stopwatch
    return func(*args, **kwargs)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 86, in read
    response = self._read()
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 152, in _read
    response_str = self._sock.recv()
  File "C:\Program Files\Python35\lib\contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 66, in catch_websocket_connection_errors
    raise ConnectionError("Socket error: %s" % e)
pysc2.lib.protocol.ConnectionError: Socket error: [WinError 10054] An existing connection was forcibly closed by the remote host

from pysc2.

4rChon avatar 4rChon commented on May 13, 2024

SC2 does not crash if I run the map directly from the sc2 map editor.

from pysc2.

wwxFromTju avatar wwxFromTju commented on May 13, 2024

@4rChon Yes, When I use the map editor,the map than can use in pysc2.

from pysc2.

fohria avatar fohria commented on May 13, 2024

I get the exact same error message as @4rChon on Windows 7 x64 and python 3.6.2.
SC2 was installed and updated via Blizzard app today.
Same for me that it's just CollectMineralShards having the issue.

from pysc2.

inoryy avatar inoryy commented on May 13, 2024

@tewalds this is most likely related to 3.17 patch.
It worked fine for me on 3.16.1 then crashed with same error as @4rChon after I updated to 3.17.

Additionally, it still works fine on Linux under 3.16.1 package.

from pysc2.

taki0112 avatar taki0112 commented on May 13, 2024

I have the same error. Is it only in 3.17 version?
Anyone know how to downgrade 3.16 ?

my environment :
window7 64 bit
python 3.5

from pysc2.

Goleeb avatar Goleeb commented on May 13, 2024

I have the same issue:
Window 10 64 bit
python 3.5.2

I ran both "python -m pysc2.bin.agent --map CollectMineralShards" and "python -m pysc2.bin.agent --map CollectMineralShards --agent pysc2.agents.scripted_agent.CollectMineralShards" both ways produce the error.
When I checked the SC2 error files in Documents\StarCraft II\GameLogs The DMP file shows this.

Exception Code: 0xC0000005

Exception Information: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.

When I attached the visual studio debugger to SC2_x64.exe I get:

Exception thrown at 0x00007FF7489AE6B6 in SC2_x64.exe: 0xC0000005: Access violation reading location 0x0000000000000008. occurred

Now If in pysc2.bin.play on line 36 if I set render to False. The game loads with the
python -m pysc2.bin.play --map CollectMineralShards Will load fine, and not crash.

Though if I change the same option in pysc2.bin.agent on line 37 I still get the same crash error.

It always happens as the game is done loading, and lead me to suspect a rendering issue,but im not familiar enough with the code to track it down yet.

from pysc2.

wwxFromTju avatar wwxFromTju commented on May 13, 2024

@KevinCalderone in Version, I just have Base56787, so what can I do?

from pysc2.

wwxFromTju avatar wwxFromTju commented on May 13, 2024

@KevinCalderone When I unzip the zip, need password. So the password is what?

from pysc2.

KevinCalderone avatar KevinCalderone commented on May 13, 2024

See: https://github.com/Blizzard/s2client-proto#downloads

Password is 'iagreetotheeula'

from pysc2.

wwxFromTju avatar wwxFromTju commented on May 13, 2024

@KevinCalderone great! fix it!

from pysc2.

skjb avatar skjb commented on May 13, 2024

@KevinCalderone I am getting this error playing replays too, not running the mineral shards map. I am unsure if the 3.18 fix resolves it so I thought I should report it. Replays worked before 3.17.

python` -m pysc2.bin.play --replay 0000e057beefc9b1e9da959ed921b24b9f0a31c63fedb8d94a1db78b58cf92c5.SC2Replay
----------------------- Replay info ------------------------
map_name: "Mech Depot LE"
player_info {
  player_info {
    player_id: 1
    race_requested: Protoss
    race_actual: Protoss
  }
  player_result {
    player_id: 1
    result: Defeat
  }
  player_mmr: 5402
  player_apm: 386
}
player_info {
  player_info {
    player_id: 2
    race_requested: Zerg
    race_actual: Zerg
  }
  player_result {
    player_id: 2
    result: Victory
  }
  player_mmr: 5564
  player_apm: 384
}
game_duration_loops: 20887
game_duration_seconds: 932.5204467773438
game_version: "3.16.1.55958"
data_build: 55958
base_build: 55958
data_version: "5BD7C31B44525DAB46E64C4602A81DC2"

------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 61, in catch_websocket_connection_errors
    yield
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 152, in _read
    response_str = self._sock.recv()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 293, in recv
    opcode, data = self.recv_data()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 310, in recv_data
    opcode, frame = self.recv_data_frame(control_frame)
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 323, in recv_data_frame
    frame = self.recv_frame()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 357, in recv_frame
    return self.frame_buffer.recv_frame()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_abnf.py", line 340, in recv_frame
    self.recv_header()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_abnf.py", line 288, in recv_header
    header = self.recv_strict(2)
  File "C:\Program Files\Python35\lib\site-packages\websocket\_abnf.py", line 375, in recv_strict
    bytes_ = self.recv(min(16384, shortage))
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 427, in _recv
    return recv(self.sock, bufsize)
  File "C:\Program Files\Python35\lib\site-packages\websocket\_socket.py", line 93, in recv
    "Connection is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python35\lib\runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Program Files\Python35\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\bin\play.py", line 183, in <module>
    app.run(main)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\app.py", line 57, in run
    really_start(main or sys.modules["__main__"].main)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\app.py", line 51, in really_start
    sys.exit(main(argv))
  File "C:\Program Files\Python35\lib\site-packages\pysc2\bin\play.py", line 141, in main
    controller.start_replay(start_replay)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\remote_controller.py", line 80, in _valid_status
    return func(self, *args, **kwargs)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\remote_controller.py", line 55, in _check_error
    return check_error(func(*args, **kwargs), error_enum)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\stopwatch.py", line 197, in _stopwatch
    return func(*args, **kwargs)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\remote_controller.py", line 134, in start_replay
    return self._client.send(start_replay=req_start_replay)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 127, in send
    res = self.send_req(sc_pb.Request(**kwargs))
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 113, in send_req
    return self.read()
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\stopwatch.py", line 197, in _stopwatch
    return func(*args, **kwargs)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 86, in read
    response = self._read()
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 152, in _read
    response_str = self._sock.recv()
  File "C:\Program Files\Python35\lib\contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 63, in catch_websocket_connection_errors
    raise ConnectionError("Connection already closed. SC2 probably crashed. "
pysc2.lib.protocol.ConnectionError: Connection already closed. SC2 probably crashed. Check the error log.

from pysc2.

KevinCalderone avatar KevinCalderone commented on May 13, 2024

@skjb Does the game crash and bring up the Blizzard error reporter when that happens? If so can you submit the report and post the exception ID number it displays in that window.

from pysc2.

KevinCalderone avatar KevinCalderone commented on May 13, 2024

@skjb Actually I just tested using that replay and can reproduce the issue. The problem is that PySC2 hasn't added support for old version replays yet. The game was recently patched to 3.17, and that replay is from 3.16.1.

If you really need it to work, there are some hacky steps to downgrade PySC2 back to the old version: #53 (comment)

from pysc2.

laksefest avatar laksefest commented on May 13, 2024

@KevinCalderone Fantastic, thanks! That fixed it! :)

from pysc2.

skjb avatar skjb commented on May 13, 2024

@KevinCalderone FYI Running 3.18.0.57507 I still get this error

from pysc2.

KevinCalderone avatar KevinCalderone commented on May 13, 2024

Just retested and seem to work for me.

Does it still crash and bring up the error reporter? Can you submit the report and give me the Occurence Id it shows in the window?

from pysc2.

skjb avatar skjb commented on May 13, 2024

Please see my error above regarding replays, I get an identical error.

This is what the game shows:

image

The game then restarts and shows:

image

from pysc2.

skjb avatar skjb commented on May 13, 2024

@KevinCalderone @tewalds I am happy to help with this if you need, seems for replays you would need the specific version in run_configs/platforms.py exec_path method rather than choosing the max version available

from pysc2.

skjb avatar skjb commented on May 13, 2024

Game version parameter to allow for playing older replays: #79

from pysc2.

tewalds avatar tewalds commented on May 13, 2024

Ok, the code I just pushed fixes this in a few ways: Fixes the maps to not crash, lets you specify a game version, and will automatically launch the right version for a replay.

from pysc2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.