cocos2d-x
cocos2d-x copied to clipboard
Crash at RenderTexture::newImage
- cocos2d-x version: 4.0
- devices test on: iPhone Simulator iOS 13.5
- developing environments
- Xcode version: 11.5
Steps to Reproduce:
- use
utils::captureNode - sometimes crashes.
https://github.com/cocos2d/cocos2d-x/blob/674bb716f7d7372fc05a6e6a85e3bfc2acebc6df/cocos/2d/CCRenderTexture.cpp#L481
_texture2D will be nullpter in this callback sometimes. I don't know why _texture2D get null but we can avoid the crash by stopping reference capture of _texture2D.
Any reason for this PR not to be merged yet? We had the same random crash in the callback, and this fixes it. Also the memory leak fix is nice.
Becos the C++ cocos2dx is very low priority, almost zero. As confirmed on their discord.
You can try this fork, it's more actively maintained
https://github.com/c4games/engine-x
@imtrobin this is unfair. It's not almost zero you made that up. Currently the Cocos engineering staff is working very hard on features to benefit the Cocos Ecosystem. Not just Creator and not just Cocos2d-x. Please edit your comment to accurately reflect this.
This is from the discord recently.

I'm referring to cocos2dx. I'm not interested in creator or typescript.
I'm started with cocos2dx with couple of years ago. Now, I've reported bugs with fixes and nobody even looks at it. I see other github reports similarly are not being looked at. At least zhangx or someone would look at them in the past.
Look at the other fork, the maintainer incorporated the bug fixes in less than day after reporting (I reported the bug to him too)
https://github.com/c4games/engine-x/issues/223
Actions shows, not words. Look at how many fixes/features the fork has compared to this repo.
There are other issues I can go into , like retiring cocos2dx studio without opening the source, then the creator to cocos2dx is also abandoned.
Cocos Studio was never planned to be open-sourced, nor promised to be.
creator to cocos2d-x was an attempt to help replace Studio for c++ users. It didn't turn out to work the way users wished.
It does not change the fact that cocos2dx is very low priority, where a fork is doing way more fixes/changes.
If I'm starting a new project, I wouldn't be recommending cocos2dx, that's for sure.
It's sad, but I think imtrobin is correct. There hasn't been a single commit in 2021. Thanks for the heads up, will look into engine-x, looks interesting.