Blizzard / Blizzard/s2client-api

Access Violation in sc2_client.css ObservationImp::UpdateObservation()

Open
#289 0 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

I am writing a SC2 bot written in C++. The bot is tested using the sc2 coordinator in a standard way (copied code from tutorials), except that it runs in non-realtime and non-multithreaded way.

Sometimes, when the game updates, it sometimes crashes.
In my test scenario it occurs sometimes when a hostile marine is killing probes mining gas. I don't know if there is a connection or it is just a coincidence.

Here is the stacktrace:
```
0xC0000005: Access violation writing location 0xFFFFFFFF00000000

std::_Container_base12::_Orphan_all() Line 256 C++ Non-user code. Symbols loaded.
std::_Vector_alloc,std::allocator > > >::_Orphan_all() Line 580 C++ Non-user code. Symbols loaded.
std::vector,std::allocator > >::_Tidy() Line 2003 C++ Non-user code. Symbols loaded.
std::vector,std::allocator > >::~vector,std::allocator > >() Line 920 C++ Non-user code. Symbols loaded.
sc2::Unit::~Unit() C++ Non-user code. Symbols loaded.
std::pair::~pair() C++ Non-user code. Symbols loaded.
std::pair::`scalar deleting destructor'(unsigned int) C++ Non-user code. Symbols loaded.
std::_Default_allocator_traits,void * __ptr64> > >::destroy >(std::allocator,void *> > & __formal={...}, std::pair * const _Ptr=0x000001818c6defe0) Line 952 C++ Non-user code. Symbols loaded.
std::_List_buy,std::allocator > >::_Freenode(std::_List_node,void *> * _Pnode=0x000001818c6defd0) Line 777 C++ Non-user code. Symbols loaded.
std::list,std::allocator > >::clear() Line 1451 C++ Non-user code. Symbols loaded.
std::_Hash,std::equal_to >,std::allocator >,0> >::clear() Line 633 C++ Non-user code. Symbols loaded.
sc2::ObservationImp::UpdateObservation() Line 589 C++ Symbols loaded.
sc2::ControlImp::GetObservation() Line 1977 C++ Symbols loaded.
sc2::ControlImp::WaitStep() Line 1765 C++ Symbols loaded.
sc2::CoordinatorImp::StepAgents::__l2::(sc2::Agent * a=0x0000002ae62ff030) Line 303 C++ Symbols loaded.
[External Code] Annotated Frame
invoke_thread_procedure(unsigned int(*)(void *) procedure=0x00007ff702eb072b, void * const context=0x0000002ae62feb80) Line 92 C++ Symbols loaded.
thread_start(void * const parameter=0x000001818c9b5b90) Line 115 C++ Symbols loaded.
[External Code] Annotated Frame
```

The game state when the crash occurs. The crashed controller causes the game to freeze.

![bug](https://user-images.githubusercontent.com/44499681/48161967-25396100-e2dc-11e8-8bb0-42a48a1a6057.png)

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.