调试出现Debug Assertion Failed!和Detected memory leaks!怎么回事

csdnzhwk 2015-08-18 11:02:37
调试输出如下:
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\dlgcore.cpp(971) : AppMsg - ERROR: Dialog with IDD 0x0136 must have the child style.
Debug Assertion Failed!

Program: C:\Windows\system32\mfc140ud.dll
File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\bardlg.cpp
Line: 39

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)
线程 0x1f68 已退出,返回值为 3 (0x3)。
线程 0x181c 已退出,返回值为 3 (0x3)。
线程 0x1ab8 已退出,返回值为 3 (0x3)。
线程 0x17d4 已退出,返回值为 3 (0x3)。
Detected memory leaks!
Dumping objects ->
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\plex.cpp(29) : {6228} normal block at 0x00280B98, 168 bytes long.
Data: < F \) > 00 00 00 00 CD CD CD CD 46 00 00 00 B0 5C 29 00
{6227} normal block at 0x0027D2B8, 68 bytes long.
Data: < > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\afxstatusbar.cpp(520) : {5889} normal block at 0x00289550, 6 bytes long.
Data: <1\ ~ > 31 5C EA 7E 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\plex.cpp(29) : {5750} normal block at 0x002B14C0, 128 bytes long.
Data: < > 00 00 00 00 CD CD CD CD 00 00 00 00 00 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\plex.cpp(29) : {5741} normal block at 0x002B1200, 128 bytes long.
Data: <P + + + > 50 11 2B 00 CD CD CD CD 14 12 2B 00 C4 11 2B 00 。。。。。。。。。
求解决
...全文
432 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
LostSpeed 2015-08-20
  • 打赏
  • 举报
回复
用VLD跑一遍, 退出时, 就直接指出在你的工程中那里new却没有deltete, 利器啊 这么好用的工具都不用, 自己琢磨多别扭啊:) http://download.csdn.net/detail/lostspeed/5013106 超好用的内存泄漏检查工具, 程序在Debug模式下跑一遍.退出时,就能看到具体的内存泄漏发生在哪行. current v2.2.3 date Wed Feb 15, 2012 at 8:00 AM status Stable Visual Leak Detector is a free, robust, open-source memory leak detection system for Visual C++. It's pretty easy to use. After installing it, you just need to tell Visual C++ where to find the included header and library file. Then it can be used with any C/C++ project simply by adding the following line to your code: #include <vld.h> When you run your program under the Visual Studio debugger, Visual Leak Detector will output a memory leak report at the end of your debugging session. The leak report includes the full call stack showing how any leaked memory blocks were allocated. Double-click on a line in the call stack to jump to that file and line in the editor window. It's a very effective way to quickly diagnose, and fix, memory leaks in C/C++ applications. The main difference between the CRT Debug Library and VLD, is that Visual Leak Detector shows you the complete callstack used for memory allocation has led to the leak.
Eleven 2015-08-19
  • 打赏
  • 举报
回复
Debug模式下打开call stack,看看函数调用堆栈,看到出错的函数调用先~
rxguoblp 2015-08-19
  • 打赏
  • 举报
回复
1.对话框的style属性需要设置为child 2.内存泄露。new了指针变量但是没有释放。检查new-delete是否成对出现。
jinling4388 2015-08-18
  • 打赏
  • 举报
回复
Detected memory leaks!表示内存泄露了,你把代码贴出来
大鱼> 2015-08-18
  • 打赏
  • 举报
回复
你贴出来的这些东西,对于找错误帮助不是很大。
大鱼> 2015-08-18
  • 打赏
  • 举报
回复
上面说的很清楚了在你bardlg.cpp 39行有问题,你看一下。

16,372

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

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