[odamex-bug-reporter] [Bug 1199] (sdl20) Crash when playing back demos
- From: odamex-bugtracker@xxxxxxxxxx
- To: odamex-bug-reporter@xxxxxxxxxxxxx
- Date: Tue, 18 Oct 2016 23:25:26 +0000
http://odamex.net/bugs/show_bug.cgi?id=1199
--- Comment #5 from Alexander Mayfield <alexmax2742@xxxxxxxxx> ---
I found the problem. The function call problem I was having above was a red
herring. Blair's minidump wasn't lying, just misleading - there was indeed a
problem in SDL_Mixer, but it was because of something broken on our end.
The problematic stack trace is this:
odamex.exe!S_Stop() Line 287 C++
odamex.exe!D_Shutdown() Line 681 C++
odamex.exe!D_DoomWadReboot(const
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>
,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
& newwadfiles, const
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>
,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
& newpatchfiles, const
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>
,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
& newwadhashes, const
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>
,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
& newpatchhashes) Line 872 C++
odamex.exe!G_LoadWad(const
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>
,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
& newwadfiles, const
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>
,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
& newpatchfiles, const
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>
,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
& newwadhashes, const
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>
,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
& newpatchhashes, const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > & mapname)
Line 567 C++
odamex.exe!NetDemo::readSnapshotData(unsigned char * buf, unsigned int
length) Line 1618 C++
odamex.exe!NetDemo::readSnapshot(const NetDemo::netdemo_index_entry_t *
snap) Line 1386 C++
odamex.exe!NetDemo::prevMap() Line 1351 C++
odamex.exe!Cmd_netprevmap::Run() Line 1280 C++
odamex.exe!C_DoCommand(const char * cmd) Line 211 C++
odamex.exe!AddCommandString(const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > & str,
bool onlycvars) Line 337 C++
odamex.exe!CL_NetDemoLoadSnap() Line 1285 C++
odamex.exe!CL_ParseCommands() Line 3619 C++
odamex.exe!NetDemo::readMessageBody(buf_t * netbuffer, unsigned int len)
Line 903 C++
odamex.exe!NetDemo::readMessages(buf_t * netbuffer) Line 944 C++
odamex.exe!G_Ticker() Line 933 C++
odamex.exe!CL_StepTics(unsigned int count) Line 641 C++
odamex.exe!CL_RunTics() Line 697 C++
odamex.exe!CappedTaskScheduler::run() Line 1010 C++
odamex.exe!D_RunTics(void(*)() sim_func, void(*)() display_func) Line 1105
C++
odamex.exe!D_DoomLoop() Line 342 C++
odamex.exe!D_DoomMain() Line 969 C++
odamex.exe!main(int argc, char * * argv) Line 245 C++
The line I'm pointing to is thus:
S_ChangeMusic (std::string(level.music, 8), true);
If I switch the invocation to a blank string (such as std::string("")), there
is no more crashing. The problem is that we are trying to switch music to
level.music in the middle of reloading WAD files. I imagine this causes
SDL_Mixer to have its music data pulled out from underneath it, and its thread
simply dies after it exhausts whatever buffer it had, but since SDL_Mixer works
in its own thread the crash occurs some time later.
I have no idea why switching to level.music is done in this function, because
the name of the function is S_Stop(), which you might expect would....ya
know...STOP music ;), and it appears that music is set up properly on level
switch in all forms that I've tried (idclev, map switch, loading from save).
--
You are receiving this mail because:
You are the assignee for the bug.
Other related posts: