调试出现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 。。。。。。。。。
求解决
...全文
1065 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行有问题,你看一下。
内容概要:本文基于Matlab/Simulink平台,对电励磁同步电机在异步牵入、稳态运行及能耗制动三个阶段的全周期动态特性进行建模仿真与系统研究。研究构建了完整的电机数学模型与仿真系统,重点分析了电机从异步启动到同步运行的过渡过程、稳态运行时的电磁与机械性能,以及执行能耗制动时的减速特性与能量耗散机理。通过仿真,揭示了励磁电流、负载转矩与转速在不同工况下的动态响应规律与耦合关系,为电机的控制策略设计与性能优化提供了理论依据和数据支持。; 适合人群:具备电机学、电力电子与电力拖动基础知识的电气工程及相关专业的研究生、科研人员与工程技术人员。; 使用场景及目标:①研究电励磁同步电机的启动特性,解决异步牵入过程不稳定或失败的问题;②分析电机在不同负载下的稳态运行性能,优化运行效率;③设计和验证能耗制动策略,精确控制制动过程的减速时间和能量消耗。; 阅读建议:在学习过程中,应结合电机的基本原理,深入理解仿真模型中各模块(如电机本体、励磁控制、负载模型)的搭建逻辑,并通过调整仿真参数(如励磁电压、负载大小)来观察和分析系统动态响应,以加深对电机全周期运行特性的理解。

16,550

社区成员

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

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

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