Crash after changing to vectors from lists in actors.cpp
In actors.cpp line 1603 I'm getting crashes when selecting troops and having them do things. I'm trying to determine how to replicate this easily. For reference, this is line 1603:
void actors::doNextStackedCommand()
{
if (!this->listOfOrders.empty()) {
switch (this->listOfOrders.front().orderType) { //crash here, maybe front is invalid?
...
}
I am having a really hard time trying to reproduce a crash.
It does a pop_front() after setting the task active a push_back() when a task is added and a clear() when a non-stacked command is issued. That are all the operations done on that list. And should not cause .front() to get invalid. An invalid orderType should probably just fall through that switch without causing an exception.
Was it a particular type of order move, attack, gather or build that caused the exception?
What type of exception was it?
This was related to remnants of the multi threading. It was caused by data races. It is now fixed.