I'm having a problem with my source compilation, where when I disconnect from the server by any means, MUSHclient crashes hard during a call to _vscprintf(). One of the stack frames shows this line of code:
CString strDuration = TFormat ("--- Connected for %i day%s, %i hour%s, %i minute%s, %i second%s. ---",
PLURAL (ts.GetDays()),
PLURAL (ts.GetHours()),
PLURAL (ts.GetMinutes()),
PLURAL (ts.GetSeconds()));
The TFormat() function's frame shows this line:
strTranslated = CFormat (sFormat, argList);
And CFormat() shows this:
FormatV(lpszFormat, argList);
// (The arguments in this stack frame show:
// lpszFormat: "--- Connected for %i day%s, %i hour%s, %i minute%s, %i second%s. ---"
// argList: ""
No idea what's going on here...
Full stack trace:
> msvcr80d.dll!_output_l(_iobuf * stream=0x0012f4c4, const char * format=0x00af2187, localeinfo_struct * plocinfo=0x00000000, char * argptr=0x0012f7dc) Line 1648 + 0x1f bytes C++
msvcr80d.dll!_vscprintf_helper(int (_iobuf *, const char *, localeinfo_struct *, char *)* outfn=0x65182820, const char * format=0x00af2148, localeinfo_struct * plocinfo=0x00000000, char * ap=0x0012f7bc) Line 405 + 0x13 bytes C
msvcr80d.dll!_vscprintf(const char * format=0x00af2148, char * ap=0x0012f7bc) Line 414 + 0x14 bytes C
mfc80d.dll!ATL::ChTraitsCRT<char>::GetFormattedLength(const char * pszFormat=0x00af2148, char * args=0x0012f7bc) Line 473 + 0xe bytes C++
mfc80d.dll!ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > >::FormatV(const char * pszFormat=0x00af2148, char * args=0x0012f7bc) Line 2142 + 0xd bytes C++
MUSHclient.exe!CFormat::CFormat(const char * lpszFormat=0x00af2148, char * argList=0x0012f7bc) Line 42 + 0x13 bytes C++
MUSHclient.exe!TFormat(const char * sFormat=0x00af2148, ...) Line 2835 + 0x16 bytes C++
MUSHclient.exe!CWorldSocket::OnClose(int nErrorCode=0) Line 145 + 0x108 bytes C++
mfc80d.dll!CAsyncSocket::DoCallBack(unsigned int wParam=584, long lParam=32) Line 639 C++
mfc80d.dll!CSocket::ProcessAuxQueue() Line 919 C++
mfc80d.dll!CSocketWnd::OnSocketNotify(unsigned int wParam=584, long lParam=32) Line 1242 C++
mfc80d.dll!CWnd::OnWndMsg(unsigned int message=883, unsigned int wParam=584, long lParam=32, long * pResult=0x0012fc60) Line 2004 + 0x11 bytes C++
mfc80d.dll!CWnd::WindowProc(unsigned int message=883, unsigned int wParam=584, long lParam=32) Line 1741 + 0x20 bytes C++
mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x040efa90, HWND__ * hWnd=0x00f60e42, unsigned int nMsg=883, unsigned int wParam=584, long lParam=32) Line 240 + 0x1c bytes C++
mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x00f60e42, unsigned int nMsg=883, unsigned int wParam=584, long lParam=32) Line 389 C++
mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x00f60e42, unsigned int nMsg=883, unsigned int wParam=584, long lParam=32) Line 411 + 0x15 bytes C++
user32.dll!77351a10()
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
user32.dll!77351ae8()
user32.dll!77351a91()
user32.dll!77352a47()
user32.dll!77343c8a()
mfc80d.dll!AfxInternalPumpMessage() Line 183 C++
mfc80d.dll!CWinThread::PumpMessage() Line 896 C++
mfc80d.dll!CWinThread::Run() Line 625 + 0xd bytes C++
mfc80d.dll!CWinApp::Run() Line 894 C++
mfc80d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00d23e6e, int nCmdShow=1) Line 47 + 0xd bytes C++
MUSHclient.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00d23e6e, int nCmdShow=1) Line 33 C++
MUSHclient.exe!__tmainCRTStartup() Line 589 + 0x35 bytes C
MUSHclient.exe!WinMainCRTStartup() Line 414 C
kernel32.dll!776b3823()
ntdll.dll!77a7a9bd()
MUSHclient.exe!CChatSocket::Process_File_start(const ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > > strMessage="RèÌüÿƒÄˆ…küÿÿ‹ôtüÿÿÿÐŒµ") Line 1183 + 0x38 bytes C++
MUSHclient.exe!CMUSHclientDoc::FixSendText(const ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > > strSource=<Bad Ptr>, const int iSendTo=361582797, const t_regexp * regexp=0x006d009c, const char * sLanguage=0xf62183e8, const bool bMakeWildcardsLower=true, const bool bExpandVariables=true, const bool bExpandWildcards=true, const bool bFixRegexps=false, const bool bIsRegexp=true, const bool bThrowExceptions=true) Line 1303 + 0xe bytes C++
fff5ef75()
|