-
Notifications
You must be signed in to change notification settings - Fork 572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v8 reinit cause crash #2751
Comments
我也遇到这个问题了,原生app集成cocos,二次启动就这个错误,请问有解嘛? |
v8::platform::NewDefaultPlatform().release();
v8::V8::InitializePlatform(_platform);
v8::V8::Dispose();
v8::V8::ShutdownPlatform(); 不需要多次执行, 从 scriptEngine 中抽出来 |
楼上正解,但是重新初始化有黑屏现象,你们有嘛? @PatriceJiang |
我们目前退出时没做释放,第二次进入直接获取之前的 v8 使用。没有遇到黑屏问题 |
楼上能给个 demo 看看吗 |
不释放V8,会导致V8一直在后台运行,占用内存和线程资源 |
不好意思,最近才看到这里的消息。我截了屏可以参考下 cc @wdx700 除此之外,v8 占用的内存不多 其中两个个文件的修改,按截屏顺序看
|
我们是自己改了Cocos的代码,封装成View方式加载cocos动画,退出页面时改cocos代码释放掉v8 engine |
重复初始化是会有问题的,所以不建议重复初始化。可参考上面的截图,改造支持下 @wdx700 |
你好, 请问除了这里修改还需要改其他地方吗, 目前我们第二次进去还是会遇到黑屏的问题, 报错信息如下
|
在退出时释放下DeviceGraphics这个单例对象就可以修复iOS的黑屏问题.Android目前我们用的是新进程的方式规避的. |
Cocos Creator 2.4.2
ScriptEngine::init()
_isolate = v8::Isolate::New(_createParams);
after exit cocos, then enter cocos again, crash on above line。It seams some incorrect use of Allocator!!!
The text was updated successfully, but these errors were encountered: