Crash in TextureCache::loadImage()

This happens with 3.17.2 and 4.0 on Android devices.

I get an intermittent crash in TextureCache::loadImage() on the call to:


Another user posted the same thing back in 2020, but so far no one has responded. I know that 3.17.2 isn’t actively supported anymore, but since it happens with 4.0 I thought I’d repost it.

The Crashlytics callstack looks like this:

#00 pc 0x19d34 
#01 pc 0x62a09 
#02 pc 0x39929 
#03 pc 0x13f8486 (cocos2d::TextureCache::loadImage() [CCTextureCache.cpp:243])
#04 pc 0xa289a 
#05 pc 0x1a4702a (__fixsfdi [libgcc2.c:1502])
#06 pc 0x1a4702a (__fixsfdi [libgcc2.c:1502])
#07 pc 0x13fc136 (cocos2d::VolatileTextureMgr::reloadAllTextures() [CCTextureCache.cpp:859])
#08 pc 0x13fc176 (decltype(*std::__ndk1::forward<cocos2d::TextureCache*>(fp0).*fp()) std::__ndk1::__invoke<void (cocos2d::TextureCache::*)(), cocos2d::TextureCache*, void>(void (cocos2d::TextureCache::*&&)(), cocos2d::TextureCache*&&) [type_traits:4264])