iOS9上的JavaScriptCore崩溃 [英] JavaScriptCore crash on iOS9

查看:114
本文介绍了iOS9上的JavaScriptCore崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

仅在iOS9上遇到崩溃.虽然我不确定它与JavaScriptCore有任何关系,但崩溃已体现在JavaScriptCore中.我更倾向于认为这是内存耗尽问题以及可能的虚拟内存耗尽问题.如屏幕截图所示,可用RAM极低,因此绝对不是理想的情况.我对iOS内部的了解还不足以完全了解这里发生的事情,但想知道是否还有其他人在iOS9上遇到过这种情况.对于我来说,在iOS 7.x,iOS 8.x上这不是问题.

Encountering a crash for a iOS9 only. The crash is manifesting in JavaScriptCore though I'm not certain it has anything to do with JavaScriptCore. I'm more inclined to believe this is an issue with memory exhaustion more specifically and possible virtual memory exhaustion. As noted in the screenshot free RAM is exceptionally low so it's definitely not an ideal situation. I don't know enough about iOS internals to entirely what's going on here but wondering if there's others out there who have encountered this type of thing with iOS9. This was not an issue for me on iOS 7.x, iOS 8.x

推荐答案

在这种情况下,问题似乎出在从代码段释放的JSContext对象,该代码段不是设置为运行JavaScript的所有者. Xcode在静态分析器中对其进行了标记,一旦删除了发布调用,一切就很好了.我有点犹豫地说这是肯定的问题,因为崩溃并不是100%的时间发生,但是考虑到更改前后的测试,很有可能.

The issue in this case appears to have been from releasing a JSContext object from a section of code which was not the owner that was setup to run JavaScript. Xcode flagged it in the static analyzer and once the release call was removed all was well. I'm a bit hesitant to say this was for sure the issue since the crash didn't happen 100% of the time but given the testing before/after the change it seems pretty likely.

这篇关于iOS9上的JavaScriptCore崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆