Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#454 closed defect (fixed)

"Debug Assertion Failed!" in VC++ Express 2008 when clicking on "Copy" button in pyrogenesis error dialog box

Reported by: Erik Johansson Owned by:
Priority: Should Have Milestone: Pre-Alpha 1
Component: Core engine Keywords:
Cc: Jan Wassenberg, philip Patch:

Description

When pressing the Copy button in the Program Error window when running the game (with -editor) in VC++ Express 2008, I get an error message from VC++:

Debug Assertion Failed! Program: h:\0ad\binaries\system\pyrogenesis_dbg.exe File: f:\dd\vctools\crt_bld\self_x86\crt\src\tcscpy_s.inl Line: 30 Expression: (L"Buffer is too small" && 0) For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts. (Press Retry to debug the application)

So I do, another dialog box:

pyrogenesis_dbg.exe has triggered a breakpoint [Break][Continue]

I press break, and below is the call stack:

>	pyrogenesis_dbg.exe!SetClipboardText(const wchar_t * text=0x02e90068, void * * hMem=0x0012f400)  Line 35 + 0x14 bytes	C++ 

	pyrogenesis_dbg.exe!sys_clipboard_set(const wchar_t * text=0x02e90068)  Line 55 + 0xd bytes	C++ 

	pyrogenesis_dbg.exe!error_dialog_proc(HWND__ * hDlg=0x00090978, unsigned int msg=273, unsigned int wParam=1002, long lParam=395626)  Line 183 + 0x9 bytes	C++

 	user32.dll!7e418734() 	

 	user32.dll!7e423ce4() 	

 	user32.dll!7e423b30() 	 

	user32.dll!7e43e577() 	 

	user32.dll!7e418734() 	

 	user32.dll!7e418734() 	

 	user32.dll!7e43e577() 	 

	user32.dll!7e43e577() 	

 	user32.dll!7e43e18a() 	

 	MSCTF.dll!747313d4() 	

 	MSCTF.dll!747313d9() 	

 	MSCTF.dll!7473057a() 	

 	user32.dll!7e418734() 	

 	user32.dll!7e418816() 	

 	user32.dll!7e4189cd() 	

 	user32.dll!7e4193e9() 	 

	user32.dll!7e4193a8() 	

 	user32.dll!7e431b7c() 	

 	user32.dll!7e4249c4() 	

 	user32.dll!7e424a06() 	

 	user32.dll!7e43b190() 	

 	pyrogenesis_dbg.exe!sys_display_error(const wchar_t * text=0x02040000, unsigned int flags=6)  Line 265 + 0x1d bytes	C++

 	pyrogenesis_dbg.exe!CallDisplayError(const wchar_t * text=0x02040000, unsigned int flags=6)  Line 405 + 0xd bytes	C++

 	pyrogenesis_dbg.exe!debug_DisplayError(const wchar_t * description=0x0012f9bc, unsigned int flags=6, void * context=0x00000000, const wchar_t * lastFuncToSkip=0x01f1a640, const wchar_t * pathname=0x00c1b0a0, int line=55, const char * func=0x00c1b098, unsigned char * suppress=0x00d48993)  Line 480 + 0xd bytes	C++

 	pyrogenesis_dbg.exe!debug_OnAssertionFailure(const wchar_t * expr=0x00c1b108, unsigned char * suppress=0x00d48993, const wchar_t * file=0x00c1b0a0, int line=55, const char * func=0x00c1b098)  Line 565 + 0x35 bytes	C++

 	pyrogenesis_dbg.exe!dlopen(const char * so_name=0x0012fe48, int flags=10)  Line 55 + 0x21 bytes	C++

 	pyrogenesis_dbg.exe!DllLoader::LoadDLL()  Line 82 + 0x10 bytes	C++

 	pyrogenesis_dbg.exe!ATLAS_Run(const CmdLineArgs & args={...}, int flags=1)  Line 43 + 0xa bytes	C++

 	pyrogenesis_dbg.exe!ATLAS_RunIfOnCmdLine(const CmdLineArgs & args={...})  Line 73 + 0xb bytes	C++

 	pyrogenesis_dbg.exe!RunGameOrAtlas(int argc=2, const char * * argv=0x01f17690)  Line 393 + 0x9 bytes	C++

 	pyrogenesis_dbg.exe!main(int argc=2, char * * argv=0x01f17690)  Line 419 + 0xd bytes	C++

 	pyrogenesis_dbg.exe!__tmainCRTStartup()  Line 586 + 0x19 bytes	C

 	pyrogenesis_dbg.exe!mainCRTStartup()  Line 403	C

 	pyrogenesis_dbg.exe!CallStartupWithinTryBlock()  Line 356 + 0x5 bytes	C++

 	pyrogenesis_dbg.exe!wseh_EntryPoint()  Line 384	C++

 	kernel32.dll!7c817077() 	

 	pyrogenesis_dbg.exe!std::_Tree<std::_Tmap_traits<void const *,CModelDefRPrivate *,std::less<void const *>,std::allocator<std::pair<void const * const,CModelDefRPrivate *> >,0> >::insert(std::_Tree<std::_Tmap_traits<void const *,CModelDefRPrivate *,std::less<void const *>,std::allocator<std::pair<void const * const,CModelDefRPrivate *> >,0> >::const_iterator _Where=(...,..., const std::pair<void const * const,CModelDefRPrivate *> & _Val=(...,...)  Line 691 + 0x1f bytes	C++

 	e04d8d52()

The output seems to be the same as the other error (and I assume at least some of the above information is at least as much related to that error as this error :P If nothing else it was that error that caused the error box to appear in the first place.) http://trac.wildfiregames.com/attachment/ticket/453 <-- the other error, am getting too tired to make nicer link =) Please tell me if I've missed some information and I'll try to include it.

Change History (3)

comment:1 by Jan Wassenberg, 14 years ago

Resolution: fixed
Status: newclosed

(In [7303]) fix off-by-one error in wcscpy_s parameter list causing crash when copying error dialog text closes #454 Thanks to Erik for reporting this!

comment:2 by (none), 14 years ago

Milestone: Unclassified

Milestone Unclassified deleted

comment:3 by historic_bruno, 12 years ago

Milestone: Pre-Alpha 1
Note: See TracTickets for help on using tickets.