cocos2d-x android真机运行读取文件 报 Fatal signal 11 (SIGSEGV) at 0xdeadaad (code=1), thread 20446 (Thread-12
来源:互联网 发布:反转故事知乎神经病 编辑:程序博客网 时间:2024/04/27 18:21
今天给游戏加入关卡信息,我选用了.CSV文件
但是在真机上运行的时候遇到一个问题(VS直接在Windows下运行一切正常),
错误日志如下:
贴上代码:
// 读取文件数据
std::string path = FileUtils::getInstance()->fullPathForFilename("levels.csv");
FILE* pFile = fopen(path.c_str(), "rb");
log("Csv---PATH:%s",data.c_str());
if (!pFile) {
log("Csv---(!pFile)");
return;
}
根据日志可以当看到读取文件失败,直接返回了
于是替换成cocos2d-x自带的读取文件的方式
std::string text = FileUtils::getInstance()->getStringFromFile(filename);
log("Csv---text.size():%d",text.size());
if (text.size() == 0) {
return;
}
ok,读取成功,正常运行
源码路径:http://download.csdn.net/detail/xujixian6272002/8495471
0 0
- cocos2d-x android真机运行读取文件 报 Fatal signal 11 (SIGSEGV) at 0xdeadaad (code=1), thread 20446 (Thread-12
- WebView 报 Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 3777 (WebViewCoreThre)
- Android Fatal signal 11 (SIGSEGV) at 0x00000020 (code=1), thread 13602
- Android Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread
- Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 13550 (Thread-3345)
- Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 16169 (Thread-1035)
- Fatal signal 11 (SIGSEGV) at 0x7bddf000 (code=1), thread 23703 (Thread-20582)
- 错误信息Fatal signal 11 (SIGSEGV) at 0x00000040 (code=1), thread 2736 (Thread-103)
- Android中Fatal signal 11 (SIGSEGV) at 0x6df6d7bf (code=2), thread 31535
- Android中Fatal signal 11 (SIGSEGV) at 0x6df6d7bf (code=2), thread 31535 问题
- Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 3661 (ervice.Executor)
- Fatal signal 11 (SIGSEGV) at 0x000001b4 (code=1), thread 7107
- Fatal signal 11 (SIGSEGV) at 0x00000004 (code=1), thread 261 (servicemanager)错误
- Fatal signal 11 (SIGSEGV) at 0x00000014 (code=1), thread 29925 (cloud.diversion)
- Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 4358 (CameraPreviewTh)问题解决
- Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 1755 (CrBrowserMain)问题
- Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 629 (example.testpro)
- android native开发 错误信息定位:Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 4785 (XXX)
- mysql 定时任务编写分类
- SSH之Spring
- Feekood基本语法(5)-- 动画
- Linux-hexdump命令详解
- Xcconfig文件的用法
- cocos2d-x android真机运行读取文件 报 Fatal signal 11 (SIGSEGV) at 0xdeadaad (code=1), thread 20446 (Thread-12
- 模块[camera]_CMOS Sensor的调试经验分享
- 在Flex中,制作一个折线图
- 有限状态自动机(Finite state automon)
- TinyXML:一个优秀的C++ XML解析器
- Fastboot的使用简单教程
- 20150312 scrapy学习
- oracle学习之索引与约束
- 2014年娜迦CM赛第四题