Comments (27)
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.
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:
- "-dataversion", "5BD7C31B44525DAB46E64C4602A81DC2"
- (The magic string comes from here: https://github.com/Blizzard/s2client-proto/blob/master/buildinfo/versions.json)
from pysc2.
@wwxFromTju Here are some more details steps for the first bullet of my above steps:
- Download the 3.16.1 map pack. (Download Link)
- Extract one of the replays from the pack.
- Launch StarCraft II through the Blizzard app.
- Click on the "Replays" tab.
- Click on the "Show in Folder" button near the top. (This will open an explorer window to your replays folder)
- Copy the replay into this folder.
- 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)
- Double click on the replay name to play it.
- This will show an warning dialog saying you need to go offline to watch the replay. Press "Load" to continue.
- 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.
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.
I also map editor to create new map, the new map also can run. just CollectMineralShards have problem
from pysc2.
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.
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.
SC2 does not crash if I run the map directly from the sc2 map editor.
from pysc2.
@4rChon Yes, When I use the map editor,the map than can use in pysc2.
from pysc2.
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.
@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.
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.
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.
@KevinCalderone in Version, I just have Base56787, so what can I do?
from pysc2.
@KevinCalderone When I unzip the zip, need password. So the password is what?
from pysc2.
See: https://github.com/Blizzard/s2client-proto#downloads
Password is 'iagreetotheeula'
from pysc2.
@KevinCalderone great! fix it!
from pysc2.
@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.
@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.
@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.
@KevinCalderone Fantastic, thanks! That fixed it! :)
from pysc2.
@KevinCalderone FYI Running 3.18.0.57507 I still get this error
from pysc2.
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.
Please see my error above regarding replays, I get an identical error.
This is what the game shows:
The game then restarts and shows:
from pysc2.
@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.
Game version parameter to allow for playing older replays: #79
from pysc2.
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)
- Proper Camera Width for human plays
- How to get the unit_type of the self-designed unit?
- RuntimeError: SC2_x64 HOT 2
- Could not open details for the replay: /tmp/sc-nb_eul9t/StarCraft II/TempReplayInfo.SC2Replay
- Support for Version 5.0.X Replays? HOT 1
- Raw Unit Y-Axis Assumes Square
- "InvalidMapData" HOT 3
- Replay dataset sizes for versions. HOT 1
- How to fast restart game in multiplayer mode
- Error in transformation action: argument is out of range
- How
- In pysc2, How can I use auto attack? Now it seems disable.
- pysc2.lib.protocol.ProtocolError: `actions` called while in state: Status.ended, valid: (Status.in_game) HOT 2
- TypeError: __init__() got an unexpected keyword argument 'extra_ports' HOT 1
- can i run it in Offline?
- try to run the first time, but failed. HOT 2
- TypeError: Descriptors cannot not be created directly. HOT 4
- Colors.py Error fix HOT 1
- Not Rendering with Nvidia GPU HOT 1
- How could I watch the StarCraft II replays?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysc2.