开发者社区 问答 正文

RenderThread在信号6(SIGABRT)下的本机崩溃,why?

stackflowJava问题

展开
收起
YDYK 2020-04-26 16:13:08 1530 分享 版权
1 条回答
写回答
取消 提交回答
  • 下面的代码不会阻止问题的发生,但是您可以干净地或更干净地捕获和恢复。添加一个catch并清空所有引用(并杀死生成的所有工作线程): } catch (Exception ignored) {//I think this is an ERROR not an exception here. photoFile = null;//Might want to also close this. data = null; intent = null } catch (Error ignored) { photoFile = null;//Might want to also close this. data = null; intent = null }

    2020-04-26 16:14:04
    赞同 展开评论
问答分类:
问答地址: