Game crashed in Sound_Handler
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
High
|
Jari Hautio |
Bug Description
This happened originally in windows when I was porting the code to compile on visual studio.
The game crashed after few minutes to a threading bug in sound_handler.
const std::map<uint32_t, std::string>
for
it != active_fx_end;
{
// Crashed here! it is not valid and m_active_fx is empty.
// Probably threading problem with erase() in handle_
if (it->second == fx_name) {
iterator is bad, m_active is empty but active_fx_end is != it. Looks
like a threading bug. Sound_Handler:
a lock because handle_
thread.
Confirmed later that m_active_fx map is actively accessed from multiple threads.
Changed in widelands: | |
status: | New → In Progress |
assignee: | nobody → Jari Hautio (jarih) |
Changed in widelands: | |
importance: | Undecided → High |
milestone: | none → build15 |
Changed in widelands: | |
status: | In Progress → Fix Committed |
Fix with SDL_mutexes attached.
Tested on 32-bit windows and linux builds with cmake.