打印

Debug assertioon failed!!!

[复制链接]
1638|5
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
BUG, LED, TI, se, IO
编译ccs5.2程序时弹出这个窗口,始终不能编译。。。。百度之后发现要修改isctype.c这个文件,但是找不到。。。怎样解决??
感谢!!!

P_{`HOWTE5M$J}G$}RYUI$X.jpg (144.07 KB )

错误贴图

错误贴图

相关帖子

沙发
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 | 只看该作者
楼主解决没?我今天也遇到这种错误了

使用特权

评论回复
5
看不见的妳| | 2018-11-15 12:44 | 只看该作者
看看头文件包含路径里有没出现中文,我的是刚开始有中文,改成英文后还是出现Debug Assertion Failed的对话框,忽略了再下载调试就可以。之前是点忽略,点关闭都没用,还自动打开了C++软件。一脸闷逼,自己建个工程弄一下,问题就都出来了。

cannot open source file错误.png (400.76 KB )

cannot open source file错误.png

Debug Assertion Failed问题.png (378.16 KB )

Debug Assertion Failed问题.png

Debug Assertion.png (298.83 KB )

Debug Assertion.png

使用特权

评论回复
6
qijg| | 2018-11-22 10:01 | 只看该作者
安装路径和创建工程路径必须英文的就OK了。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2

主题

2

帖子

0

粉丝