该程序在Visual Studio 2013中运行完美,但只要我尝试直接从资源管理器运行可执行文件,应用程序就会崩溃。
我用WindDbg运行它,它给了我这个错误代码:
Microsoft (R) Windows Debugger Version 10.0.10240.9 X86
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine:
G:\Libraries\VSProjects\UntitledGame\UnicityEngine\bin\Debug\UnicityEngine.exe
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path. *
* Use .symfix to have the debugger choose a symbol path. *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
ModLoad: 012f0000 01384000 Demo.exe
ModLoad: 76f10000 77090000 ntdll.dll
ModLoad: 767a0000 768b0000 C:\Windows\syswow64\kernel32.dll
ModLoad: 76670000 766b7000 C:\Windows\syswow64\KERNELBASE.dll
ModLoad: 198b0000 19978000 C:\Windows\SysWOW64\OPENGL32.dll
ModLoad: 766f0000 7679c000 C:\Windows\syswow64\msvcrt.dll
ModLoad: 76a60000 76b01000 C:\Windows\syswow64\ADVAPI32.dll
ModLoad: 74ff0000 75009000 C:\Windows\SysWOW64\sechost.dll
ModLoad: 76340000 76430000 C:\Windows\syswow64\RPCRT4.dll
ModLoad: 74880000 748e0000 C:\Windows\syswow64\SspiCli.dll
ModLoad: 74870000 7487c000 C:\Windows\syswow64\CRYPTBASE.dll
ModLoad: 754d0000 75560000 C:\Windows\syswow64\GDI32.dll
ModLoad: 76570000 76670000 C:\Windows\syswow64\USER32.dll
ModLoad: 752b0000 752ba000 C:\Windows\syswow64\LPK.dll
ModLoad: 74ba0000 74c3d000 C:\Windows\syswow64\USP10.dll
ModLoad: 083e0000 08402000 C:\Windows\SysWOW64\GLU32.dll
ModLoad: 6f500000 6f5e7000 C:\Windows\SysWOW64\DDRAW.dll
ModLoad: 6f640000 6f646000 C:\Windows\SysWOW64\DCIMAN32.dll
ModLoad: 75020000 751bd000 C:\Windows\syswow64\SETUPAPI.dll
ModLoad: 75280000 752a7000 C:\Windows\syswow64\CFGMGR32.dll
ModLoad: 751e0000 7526f000 C:\Windows\syswow64\OLEAUT32.dll
ModLoad: 74c40000 74d9c000 C:\Windows\syswow64\ole32.dll
ModLoad: 74940000 74952000 C:\Windows\syswow64\DEVOBJ.dll
ModLoad: 71390000 713a3000 C:\Windows\SysWOW64\dwmapi.dll
ModLoad: 75590000 761db000 C:\Windows\syswow64\SHELL32.dll
ModLoad: 74da0000 74df7000 C:\Windows\syswow64\SHLWAPI.dll
ModLoad: 0ff90000 10059000 C:\Windows\SysWOW64\MSVCP120D.dll
ModLoad: 0f200000 0f3bf000 C:\Windows\SysWOW64\MSVCR120D.dll
(5fc.14b4): Break instruction exception - code 80000003 (first chance)
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
eax=00000000 ebx=00000000 ecx=13640000 edx=0014e218 esi=fffffffe edi=00000000
eip=76fb12fb esp=0029f414 ebp=0029f440 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246
ntdll!LdrVerifyImageMatchesChecksum+0x96c:
76fb12fb cc int 3`
我完全不知道为什么会这样。如果这是重要的话,我会使用GLEW和GLFW。
更新
在再次运行异常之后,以下是程序抛出的所有未处理的异常:
0:000:x86> gn
(f40.1758): Access violation - code c0000005 (!!! second chance !!!)
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\SYSTEM32\wow64.dll -
wow64!Wow64LdrpInitialize+0x8d5:
00000000`7318cb49 654c8b1c2530000000 mov r11,qword ptr gs:[30h]
gs:00000000`00000030=????????????????
0:000> g
(f40.1758): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
atioglxx+0x12f0:
690212f0 8a01 mov al,byte ptr [ecx]
ds:002b:cccccccc=??
0:000:x86> gn
(f40.1758): Access violation - code c0000005 (!!! second chance !!!)
wow64!Wow64LdrpInitialize+0x8d5:
00000000`7318cb49 654c8b1c2530000000 mov r11,qword ptr gs:[30h]
gs:00000000`00000030=????????????????
0:000> gn
答案 0 :(得分:0)
它int 3
停了吗?这是将程序丢入调试器的中断。或者就像你看到的那样杀死它。
在我看来,您(或某人)将有意的调试中断指令放入您的代码中。
请参阅https://msdn.microsoft.com/en-us/library/f408b4et.aspx
如果你试图调用一个指向包含0xCC的内存的函数指针,看起来你也可以得到这个,这是我认为的调试模式内存填充之一。
请参阅When and why will an OS initialise memory to 0xCD, 0xDD, etc. on malloc/free/new/delete?