项目调试Assertion failed

最近在做一个小游戏,遇到一个问题是程序运行正常,但是每次关闭程序时就会提示:Assertion failed!

然后把程序检查了一遍,没问题啊!实在找不出哪里有问题!再看提示在CCNode.cpp 189行,进去看看,

CCASSERT(!_running, "Node still marked as running on node destruction! Was base class onExit() called in derived class onExit() implementations?");

靠终于知道哪里出问题了,原来在onExit()中敲代码时没注意打错了,(⊙﹏⊙)b!!!

void HelloWorld::onExit()

{

Layer::init();

......

}

时间: 2024-08-28 07:39:19

项目调试Assertion failed的相关文章

MFC:“Debug Assertion Failed!” ——自动生成的单文档程序项目编译运行就有错误

今天照着孙鑫老师的VC++教程学习文件的操作,VS2010,单文档应用程序,项目文件命名为File,也就有了自动生成的CFileDoc.CFileView等类,一进去就编译运行(就是最初自动生成的项目),编译通过,可运行时直接弹出错误框,有点小懵,,,啥都没做就给我看这个: 图一   错误提示框 后来搜索一查,网上好多类似的错误以及解决方案,几乎都试了个遍,有: 方法(1)-重新生成解决方案,或者将项目文件目录下Debug文件夹删了,重新生成Release版: 方法(2)-可以先声明一个临时的C

debug assertion failed

vs2008 调试报错 #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]){ FILE *fp,*ofp; void filecopy(FILE *,FILE *); if(argc == 1) filecopy(stdin,stdout); else while(--argc>0) if((fp=fopen(*++argv,"r"))==NULL) printf("cat:can't o

加速Java应用开发速度2——加速项目调试启动速度

上一篇Spring/Hibernate提升速度的文章主要是通过一些技巧来提升启动速度,还是做不到如类的热部署/热替换.因此再写一篇关于热部署/热替换的文章.之前也有很多人介绍过这些知识,不过比较分散,我写此篇的目的是聚合它们.本文以HotSpot虚拟机为例. 首先让我们来看两个概念:热部署.热替换 热部署 即在容器运行过程中,重新加载类或重新加载整个项目.常见的解决方案就是使用自定义ClassLoader: 部分加载的示例:如JSP.Play框架: 重新加载整个项目的示例:如Tomcat.Jet

C++读一行到string中与vc的debug assertion failed!问题

将输入的一行读到string中不需要像用数组那样,考虑给多少大小的空间,这可以使得做acm题更加方便. c++98有两个函数可以读一行到string中,如下: istream& getline (istream& is, string& str, char delim); istream& getline (istream& is, string& str); 例子: #include <iostream> #include <string

关于Debug Assertion Failed问题

Debug Assertion Failed program:D\... LINE:1044 Expression:_CrtIsValidHeapPointer(pUserData) for information on how your program can cause an assertion failure,see the Visual C++ documentation on asserts. (Press Retry to debug the application) 学习链表时遇到

C++析构函数造成Debug Assertion Failed的问题

昨天写了两个程序,均出现了析构函数造成Debug Assertion Failed的问题,由于是初学c++怎么想也想不通问题出在哪里.今天早上经人指点终于明白问题所在了.下面贴出代码和问题解析:(以下内容摘自本人在csdn论坛求助的帖子) 第一个问题程序://Teacher_Level.h #pragma once#include<iostream>using namespace std;int num=0;class Teacher{public:char *title; Teacher()

void CWnd::SetWindowText(LPCTSTR lpszString) ASSERT(::IsWindow(m_hWnd)); Debug Assertion Failed

void CWnd::SetWindowText(LPCTSTR lpszString) ASSERT(::IsWindow(m_hWnd)); Debug Assertion Failed 原因: ID和Resource中的控件没有关联起来,导致运行的时候,发现hWnd没有相应的对象,没有实例化,hWnd是NULL void CWnd::SetWindowText(LPCTSTR lpszString) ASSERT(::IsWindow(m_hWnd)); Debug Assertion F

解决Linux下Svn检出Windows SVN服务器上项目SSL handshake failed: SSL error: Key usage violation in certificate has been detected.

在Linux上检出windows SVN服务器上项目时出现了SSL handshake failed: SSL error: Key usage violation in certificate has been detected.的错误. 最后通过从网上检索找到了一个答案: 可以同时解决掉在Ubuntu上和CentOS上检出失败的问题. 在Windows注册表中加入注册项: 32位机器: [HKEY_LOCAL_MACHINE\SOFTWARE\VisualSVN\VisualSVN Serv

(C++) Assertion failed: !&quot;Bad error code&quot;, file VMem.c, line 715

(C++) Assertion failed: !"Bad error code", file VMem.c, line 715 Misc error. Full error message Assertion failed: !"Bad error code", file VMem.c, line 715 View a screenshot of this error message Cause IDE: C++ Builder 6.0 Project type: