cocos2d-x icon indicating copy to clipboard operation
cocos2d-x copied to clipboard

Crash at RenderTexture::newImage

Open sidepelican opened this issue 5 years ago • 7 comments
trafficstars

  • cocos2d-x version: 4.0
  • devices test on: iPhone Simulator iOS 13.5
  • developing environments
    • Xcode version: 11.5

Steps to Reproduce:

  1. use utils::captureNode
  2. 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.

sidepelican avatar May 29 '20 13:05 sidepelican

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.

mpereyra avatar May 04 '21 13:05 mpereyra

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 avatar May 04 '21 14:05 imtrobin

@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.

slackmoehrle avatar May 05 '21 15:05 slackmoehrle

This is from the discord recently.

image image image

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.

imtrobin avatar May 06 '21 10:05 imtrobin

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.

slackmoehrle avatar May 06 '21 23:05 slackmoehrle

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.

imtrobin avatar May 07 '21 02:05 imtrobin

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.

mpereyra avatar May 07 '21 18:05 mpereyra