救急啊,创建了个MFC项目出现不明BUG

tigertianx 2013-12-06 09:46:32
用vs2010的MFC向导创建了个对话框项目,就加了个Button和RichEdit,然后用向导创建不了Button的单击事件就自己手动加了个,然后运行程序,程序跑了下就自动退出了。
输出窗口有如下提示,怎么解决呢

“ACSProject.exe”: 已加载“C:\Documents and Settings\tianxinwei\桌面\ACSProject\Debug\ACSProject.exe”,已加载符号。
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\ntdll.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\kernel32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\mfc100ud.dll”,已加载符号。
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\msvcr100d.dll”,已加载符号。
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\user32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\gdi32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\shlwapi.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\advapi32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\rpcrt4.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\secur32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\msvcrt.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\comctl32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\msimg32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\oleaut32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\ole32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\imm32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\lpk.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\usp10.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\uxtheme.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\mfc100chs.dll”,未使用调试信息生成二进制文件。
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\shell32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\Program Files\360\360Safe\safemon\safemon.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\psapi.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\wininet.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\crypt32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\msasn1.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\version.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\ws2_32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\ws2help.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\netapi32.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\MSCTF.dll”,Cannot find or open the PDB file
“ACSProject.exe”: 已加载“C:\WINDOWS\system32\MSCTFIME.IME”,Cannot find or open the PDB file
Detected memory leaks!
Dumping objects ->
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\occmgr.cpp(195) : {444} normal block at 0x0039D740, 32 bytes long.
Data: < > 01 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\occmgr.cpp(181) : {443} normal block at 0x0039D6F0, 20 bytes long.
Data: < > FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00
Object dump complete.
程序“[5492] ACSProject.exe: 本机”已退出,返回值为 0 (0x0)。
...全文
387 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
叫我阿亮 2015-05-20
  • 打赏
  • 举报
回复
BOOL ***App::InitInstance() { AfxEnableControlContainer(); AfxInitRichEdit();//加上这行 ----------------------------------应该是richEdit的问题
mrlgy 2014-01-24
  • 打赏
  • 举报
回复
楼主怎么解决这个问题的,我也是这个问题,那个虚拟地址为空是怎么回事?
Isnis-fallen 2013-12-06
  • 打赏
  • 举报
回复
向导文件已损坏, 重建工程吧, 就两个控件
赵4老师 2013-12-06
  • 打赏
  • 举报
回复
Debug|DebugRunToCursor                |Ctrl+F10              |Runs the program to the line containing the cursor
Debug|DebugEnableBreakpoint           |Ctrl+F9               |Enables or disables a breakpoint
Debug|DebugRestart                    |Ctrl+Shift+F5         |Restarts the program
Debug|DebugRemoveAllBreakpoints       |Ctrl+Shift+F9         |Removes all breakpoints
Debug|DebugStepOver                   |F10                   |Steps over the next statement
Debug|DebugStepInto                   |F11                   |Steps into the next statement
Debug|DebugGo                         |F5                    |Starts or continues the program
Debug|DebugToggleBreakpoint           |F9                    |Inserts or removes a breakpoint
Debug|DebugStepOut                    |Shift+F11             |Steps out of the current function
Debug|DebugStopDebugging              |Shift+F5              |Stops debugging the program
Debug|DebugQuickWatch                 |Shift+F9              |Performs immediate evaluation of variables and expressions
赵4老师 2013-12-06
  • 打赏
  • 举报
回复
代码功能归根结底不是别人帮自己看或讲解或注释出来的;而是被自己静下心来花足够长的时间和精力亲自动手单步或设断点或对执行到某步获得的中间结果显示或写到日志文件中一步一步分析出来的。 提醒:再牛×的老师也无法代替学生自己领悟和上厕所! 单步调试和设断点调试是程序员必须掌握的技能之一。
tigertianx 2013-12-06
  • 打赏
  • 举报
回复
引用 1 楼 focuslight 的回复:
向导怎么创建不了单击响应? 在设计里按钮上双击即自动添加
我加断点调试了下 在crtexe.c文件的__declspec(noinline) int __tmainCRTStartup( void )函数中 /* * Note that if the exe is managed app, we don't really need to * call exit or _c_exit. .cctor should be able to take care of * this. */ if ( !managedapp )//这里managedapp为0,所以退出了 exit(mainret); if (has_cctor == 0) _cexit(); 会退出 而managedapp 是在managedapp = check_managed_app();这里被赋值 而/*** *check_managed_app() - Check for a managed executable * *Purpose: * Determine if the EXE the startup code is linked into is a managed app * by looking for the COM Runtime Descriptor in the Image Data Directory * of the PE or PE+ header. * *Entry: * None * *Exit: * 1 if managed app, 0 if not. * *Exceptions: * *******************************************************************************/ static int __cdecl check_managed_app ( void ) { PIMAGE_DOS_HEADER pDOSHeader; PIMAGE_NT_HEADERS pPEHeader; pDOSHeader = &__ImageBase; if (pDOSHeader->e_magic != IMAGE_DOS_SIGNATURE) { return 0; } pPEHeader = (PIMAGE_NT_HEADERS) ((BYTE *) pDOSHeader + pDOSHeader->e_lfanew); if (pPEHeader->Signature != IMAGE_NT_SIGNATURE) { return 0; } if (pPEHeader->OptionalHeader.Magic != IMAGE_NT_OPTIONAL_HDR_MAGIC) { return 0; } /* prefast assumes we are overflowing __ImageBase */ #pragma warning(push) #pragma warning(disable:26000) if (pPEHeader->OptionalHeader.NumberOfRvaAndSizes <= IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR) { return 0; } #pragma warning(pop) return pPEHeader->OptionalHeader. DataDirectory[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].VirtualAddress != 0; } 前面都没return 0,而是在最后一句中DataDirectory数组中它的第IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR=14元素的VirtualAddress 为0,所以返回了0
tigertianx 2013-12-06
  • 打赏
  • 举报
回复
引用 1 楼 focuslight 的回复:
向导怎么创建不了单击响应? 在设计里按钮上双击即自动添加
手动添加之前确实自动添加不了,双击按钮没反应,右键按钮选择类向导还是添加事件都没反应,在类属性事件栏找到ID点开之后选择BN_CLICKED也是添加不了,说是无效的值。最后在网上搜了下所那只能手动添加了,手动添加了之后我试了下现在可以自动添加了。 上面这个问题是怎么回事呢,大家给看看
Isnis-fallen 2013-12-06
  • 打赏
  • 举报
回复
向导怎么创建不了单击响应? 在设计里按钮上双击即自动添加

64,649

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧