Error when runtime

Started by
3 comments, last by DaBono 18 years, 8 months ago
Can anyone help me find out what happen on my game? How to fix below program? -Game crash when running then i use debug mode, a alert message pop up show what: Unhandled exception in Game.exe: 0xC0000005: Access Violation. -Pop up an error message show that: The instruction at "0x00429c69" referenced memory at "0xcdcdcdcd". The memory could not be "read". Click OK to terminate the program. -After click ok, my vC++ show below message: Loaded symbols for 'C:\Documents and Settings\Albert\Desktop\Backup3\Game\Debug\Game.exe' Loaded 'C:\WINDOWS\system32\ntdll.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\winmm.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\d3d9.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\d3d8thk.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\dinput8.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\imm32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\lpk.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\usp10.dll', no matching symbolic information found. Loaded symbols for 'C:\WINDOWS\system32\Syncor11.dll' Loaded 'C:\WINDOWS\system32\uxtheme.dll', no matching symbolic information found. Loaded 'C:\Program Files\Common Files\Symantec Shared\AntiSpam\ASOEHOOK.DLL', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\msvcr71.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\MSCTF.dll', no matching symbolic information found. Loaded 'C:\Powerword 2003\Cjktl32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\MSCTFIME.IME', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\mslbui.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\hid.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\setupapi.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\wintrust.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\crypt32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\msasn1.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\imagehlp.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\clbcatq.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\oleaut32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\comres.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\dpnet.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\ws2_32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\ws2help.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\rsaenh.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\dmloader.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\dmusic.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\msacm32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\dsound.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\dmime.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\wdmaud.drv', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\msacm32.drv', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\midimap.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\ksuser.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\dsdmo.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\msdmo.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\dmsynth.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\mswsock.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\hnetcfg.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\wshtcpip.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\dnsapi.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\winrnr.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\wldap32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\rasadhlp.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\dpnhpast.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\iphlpapi.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\dpnhupnp.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\rasapi32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\rasman.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\netapi32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\tapi32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\shlwapi.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\rtutils.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\apphelp.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\dswave.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\imaadp32.acm', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\d3dxof.dll', no matching symbolic information found. The thread 0xF34 has exited with code 0 (0x0). The thread 0x36C has exited with code -1073741819 (0xC0000005). The thread 0x1B0 has exited with code -1073741819 (0xC0000005). The thread 0x5F8 has exited with code -1073741819 (0xC0000005). The thread 0x594 has exited with code -1073741819 (0xC0000005). The thread 0x7C0 has exited with code -1073741819 (0xC0000005). The thread 0x8CC has exited with code -1073741819 (0xC0000005). The thread 0xBB4 has exited with code -1073741819 (0xC0000005). The thread 0xBD4 has exited with code -1073741819 (0xC0000005). The thread 0x3D4 has exited with code -1073741819 (0xC0000005). The thread 0xA58 has exited with code -1073741819 (0xC0000005). The thread 0x88C has exited with code -1073741819 (0xC0000005). The thread 0x7A4 has exited with code -1073741819 (0xC0000005). The thread 0x8A8 has exited with code -1073741819 (0xC0000005). The program 'C:\Documents and Settings\Albert\Desktop\Backup3\Game\Debug\Game.exe' has exited with code -1073741819 (0xC0000005).
Advertisement
You aren't doing enough of error checking.
0xCDCDCDCD and 0xC0000005 are pretty common when it comes to not checking error values, that is, if you get this, you have done something stupid ;)
So, all I can say is, debug your threads, add "checkpoints" so you can narrow down the problem.


Quote:Can anyone help me find out what happen on my game? How to fix below program?

The most common causes for this are you've tried to use a pointer before assigning an allocated object to it, or you've tried using a pointer after deleting the object it points to. But there are LOTS of other things that could cause this too.

I'm also wondering why you're trying to use threading when you seem to be very new to programming, and better yet why you're using so many threads for a game?
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
You are trying to acces object, there haven't been initialised (or be destroyed).
Allways initialize you pointers with NULL and after destroying set it to NULL ! Then you have a way how to detect, if pointer is correct :
if (myPointer)
{
myPointer->AnyFunction ();
}

and your AV's are gone.

I'm use few macros like :
#define SAFE_DELETE(p) { if (p) delete (p); (p) = NULL; }
#define SAFE_RELEASE(p) { if (p) (p)->Release (); (p) = NULL; }

and every my pointers destroying with these macros.
As the above posters already stated: you have a segmentation fault - a reference to memory that is not 'yours'. In this case, it seems you are trying to reference memory, while your pointer is not initialised. (The value 0xCDCDCDCD is a special value).

Run your program in the debugger included with your IDE, the debugger will probably point you to the line in which the bad reference is done.

This topic is closed to new replies.

Advertisement