超长日志在Mac模拟器有控制台显示时卡死

牧牛犊 2019-06-22 11:07:40
环境:cocos2dx 3.16 + lua 开发
在lua层使用print输入一个超级大的table对象时,有显示出Mac控制台显示日志时,就卡死了,最后定位到的代码是
- (void) openConsoleWindow
{
...
int outfd = [[_pipe fileHandleForWriting] fileDescriptor];
if (dup2(outfd, fileno(stderr)) != fileno(stderr) || dup2(outfd, fileno(stdout)) != fileno(stdout)) 这一句导致卡死
...
}
在做重定向时卡死,网上查了资料也不知道怎么改,看哪位大神有修改方案可以提供下。
...全文
65 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

721

社区成员

发帖
与我相关
我的任务
社区描述
Cocos2d-x相关内容讨论专区
社区管理员
  • Cocos2d-x
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧