terminating with uncaught exception of type std::logic_error: basic_string::_S_construct NULL not va
来源:互联网 发布:mac safari 无痕浏览 编辑:程序博客网 时间:2024/06/07 13:49
char* szName[] ={"诈了没","斗你妹","全下了没","VIP有特权哟","奖励领了没","大乐透中奖了","邀个好友","换牌了没","玩下竞技场","加点魅力","扔个牛屎","踢个贱人"};
int nSelName[] = {-1,-1,-1,-1};
for (int i =1; i<=4; i++)
{
if (arc4random()%6<=3)
{//随机人数及名称尽量不重复
int nName=arc4random()%16;
for (int j =0; j<i; j++)
{
if (nName == nSelName[j])
{
nName=arc4random()%16;
break;
}
}
nSelName [i] = nName;
AndroidUser* pItem =newAndroidUser(i,DANJI_DEF_USERID+i,szName[nName]);
androidAry->addObject((CCObject*)pItem);
// pItem->IsLogEanble(true);
pItem->UserCome();
pItem->release();
}
}
打印日志:
(char *[16]) szName = {
[0] = 0x00000000
[1] = 0x00930042 "\xd5\xa9\xc1\xcb\xc3\xbb"
[2] = 0x00930049 "\xb0\xd9\xc8\xcb\xc5\xa3\xc5\xa3"
[3] = 0x00930052 "\xd5\xa8\xbd\xf0\xbb\xa8"
[4] = 0x00930059 "\xb6\xb7\xc4\xe3\xc3\xc3"
[5] = 0x00930060 "\xb0\xd9\xc1\xe9\xb0\xd9\xc1\xe9"
[6] = 0x00930069 "\xc8\xab\xcf\xc2\xc1\xcb\xc3\xbb"
[7] = 0x00930072 "VIP\xd3\xd0\xcc\xd8\xc8\xa8\xd3\xb4"
[8] = 0x0093007e "\xbd\xb1\xc0\xf8\xc1\xec\xc1\xcb\xc3\xbb"
[9] = 0x00930089 "\xb4\xf3\xc0\xd6\xcd\xb8\xd6\xd0\xbd\xb1\xc1\xcb"
[10] = 0x00930096 "\xd1\xfb\xb8\xf6\xba\xc3\xd3\xd1"
[11] = 0x0093009f "\xbb\xbb\xc5\xc6\xc1\xcb\xc3\xbb"
[12] = 0x009300a8 "\xcd\xe6\xcf\xc2\xbe\xba\xbc\xbc\xb3\xa1"
[13] = 0x009300b3 "\xbc\xd3\xb5\xe3\xf7\xc8\xc1\xa6"
[14] = 0x009300bc "\xc8\xd3\xb8\xf6\xc5\xa3\xca\xba"
[15] = 0x009300c5 "\xcc\xdf\xb8\xf6\xbc\xfa\xc8\xcb"
}
第一个竟然变成NULL了,不知道为什么变成NULL,难道是越界修改待查。- terminating with uncaught exception of type std::logic_error: basic_string::_S_construct NULL not va
- 调bug:terminating with uncaught exception of type std::out_of_range: vector Abort trap: 6
- terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_S_construct
- basic_string::_S_construct NULL not valid
- [AFN]terminating with uncaught exception of type NSException
- [iOS错误汇总]libc++abi.dylib: terminating with uncaught exception of type NSException
- libc++abi.dylib: terminating with uncaught exception of type NSException错误的原因
- ibc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
- 使用字面量的方法创建一个dictionary报错:libc++abi.dylib: terminating with uncaught exception of type NSException
- 集成微信SDK出现libc++abi.dylib: terminating with uncaught exception of type NSException,微信支付SDKDEMO运行编译报错
- 新浪微博分享出现libc++abi.dylib: terminating with uncaught exception of type NSException微博微信SDK运行编译报错
- [aidl] terminate called after throwing an instance of 'std::logic_error' [aidl] what(): basic_string
- terminate called after throwing an instance of 'std::logic_error' [aidl] what(): basic_string
- LeetCode terminate called after throwing an instance of 'std::logic_error' what(): basic_string::
- *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not
- Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not
- Terminating app due to uncaught exception of class '_NSZombie_NSException'
- error: cannot pass objects of non-trivially-copyable type ‘std::string {aka class std::basic_string
- Ubuntu14.04Unity启动器加入最小化点击功能
- 嵌入式学习资料整理
- 编程算法 - 链表逆序 代码(C)
- Winpcap在vs下的使用方法
- Git与Github使用教程(windows环境)
- terminating with uncaught exception of type std::logic_error: basic_string::_S_construct NULL not va
- SlideMenu屏蔽滑动问题
- C++ 合并链表
- 黑马程序员------张孝祥高新技术(二)--注解、泛型和类加载器
- C#中构造函数不能调用构造函数?
- B树、B-树、B+树、B*树
- 【ACdream】1103 瑶瑶正式成为CEO 树链剖分+费用流
- 字符串转码解决乱码问题(不是根本解决方法)
- java API------File类