Debug assertioon failed!!!

[复制链接]
 楼主| xunmacao 发表于 2014-9-14 22:41 | 显示全部楼层 |阅读模式
BUG, LED, TI, se, IO
编译ccs5.2程序时弹出这个窗口,始终不能编译。。。。百度之后发现要修改isctype.c这个文件,但是找不到。。。怎样解决??
感谢!!!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
wangch_sh 发表于 2014-9-15 17:04 | 显示全部楼层
5.2没用过,一直用3.3
zhangmangui 发表于 2014-9-16 22:43 | 显示全部楼层
没遇到过  网上找的   你看看
Though this call is late I just encountered the same problem again; I guess 101st times now.

As I see it, many developers seem to run into this problem and the statement that passing a value larger than 255 is not allowed for isctype.c may be correct so far but the circumstances that lead to it seem to be a problem made by Microsoft itself.

E.g. I have a mutithreaded program in debug, i.e. compiled with _DEBUG and _MT compiler switches, and I use some of the isspace, isdigit, is... CRT functions in my program. All of these functions have a signature specifying to accept an integer as only parameter and therefore I claim to use it as integer to test whatever (unicode) character to be a digit, a space or whatsoever.

Now, if I run this program testing any arabic, kyrillic, chinese character the beforementioned assertion will come up. In release the program will state a protection fault. If you take a look at the CRT implementation you will find that it is not supported for multithreading but still the CRT itself (not my program) refers it. So as a developer I have no chance to work around it (and it really should not be my task to work around it).

#if !defined (_MT) || defined (_DEBUG)
int __cdecl _chvalidator(
        int c,
        int mask
        )
{
        _ASSERTE((unsigned)(c + 1) <= 256);
        return ( _pctype[c] & mask);
}

Addenum:
There may be of course the possibility to use the isw... functions but I am not quite sure if these are supported in the ANSI standard - and therefore may not be available on non-Windows platform compilers.
看不见的妳 发表于 2018-11-15 11:39 | 显示全部楼层
楼主解决没?我今天也遇到这种错误了
看不见的妳 发表于 2018-11-15 12:44 | 显示全部楼层
看看头文件包含路径里有没出现中文,我的是刚开始有中文,改成英文后还是出现Debug Assertion Failed的对话框,忽略了再下载调试就可以。之前是点忽略,点关闭都没用,还自动打开了C++软件。一脸闷逼,自己建个工程弄一下,问题就都出来了。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
qijg 发表于 2018-11-22 10:01 | 显示全部楼层
安装路径和创建工程路径必须英文的就OK了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2

主题

2

帖子

0

粉丝
快速回复 返回顶部 返回列表