Cocos v3.15.1 effects don't work (Android 5.1.1)

Cocos v3.15.1 effects don't work (Android 5.1.1)
0

#1

Hi,

I am using LensEffect in my project. I just started testing and unfortunately effects from cocos v3.15.1 don’t work on Samsung Grand Prime with Android 5.1.

Here is a crash log from Android Studio where I run “Effects Basic” from cpp-tests.

(It worked perfectly with cocos v3.12… :/).

SIGSEGV (signal SIGSEGV: invalid address (fault address: 0x1b6a33c))

__memcpy_base
_CopySpilitIndex
gcoVERTEXARRAY_Bind_Ex2
__glChipDrawElementsInstanced
__glDrawPrimitive
glDrawElements
cocos2d::Grid3D::blit()
cocos2d::GridBase::afterDraw(cocos2d::Node*)
cocos2d::NodeGrid::onGridEndDraw()
void std::_Mem_fn<void (cocos2d::NodeGrid::)()>::operator()(cocos2d::NodeGrid) const
void std::_Bind<std::_Mem_fn<void (cocos2d::NodeGrid::)()> (cocos2d::NodeGrid)>::__call<void, 0u>(std::tuple<>&&, std::_Index_tuple<0u>)
void std::_Bind<std::_Mem_fn<void (cocos2d::NodeGrid::)()> (cocos2d::NodeGrid)>::operator()()
std::_Function_handler<void (), std::_Bind<std::_Mem_fn<void (cocos2d::NodeGrid::)()> (cocos2d::NodeGrid)> >::_M_invoke(std::_Any_data const&)

cocos2d::CustomCommand::execute()
cocos2d::Renderer::processRenderCommand(cocos2d::RenderCommand*)
cocos2d::Renderer::visitRenderQueue(cocos2d::RenderQueue&)
cocos2d::Renderer::processRenderCommand(cocos2d::RenderCommand*)
cocos2d::Renderer::visitRenderQueue(cocos2d::RenderQueue&)
cocos2d::Renderer::render()
cocos2d::Scene::render(cocos2d::Renderer*, cocos2d::Mat4 const*, cocos2d::Mat4 const*, unsigned int)
cocos2d::Scene::render(cocos2d::Renderer*, cocos2d::Mat4 const&, cocos2d::Mat4 const*)
cocos2d::GLView::renderScene(cocos2d::Scene*, cocos2d::Renderer*)
cocos2d::Director::drawScene()
cocos2d::Director::mainLoop()
Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeRender
art_quick_generic_jni_trampoline
art::mirror::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)

Could you point me somewhere?

Thanks,
kds


#2

I just checked cpp-tests with cocos v3.17 and the result is the same, Effects crash on Grand Prime with Android 5.1.1.


#3

Hi. We are using 3.15 and all effects not work in cpp-test for android 5.
Replace CCTextureCache.cpp in 3.15 with the same one in 3.17 stable version.


#4

@amin13a Thanks for reply. Do you say that replacing CCTextureCache.cpp with the one from v3.15 solves the issue?

I have checked v3.17 cpp-tests (clean build) on the same device and I got a crash when I tried to run effects.


#5

Yes. for me it works. cocos v3.17 cpp-tests also works.
I don’t know why v3.17 crash when you run effects.


#6

Did your test run on a Samsung Grand Prime with Android 5.1? That specific phone graphics chip seems to have some buggy graphics driver, because if you search online you’ll see quite a lot of references to it from other game engines too.


#7

Unfortunately changing CCTextureCache to the one from 3.17 doesn’t help.

The thing is that it worked fine in 3.12…


#8

Then your problem solved?


#9

No, it is not solved :wink: I have already migrated project to 3.15.1 and I don’t want to move back to 3.12. For now I just disabled effect on Android :frowning:

I think that finally I will disable effect for this specific device (if it will be possible) or I will write my own shader to do the similar effect.