Skip to content

解决 _entity 为空时 ,引起的闪退#18561

Closed
finscn wants to merge 1 commit intococos:v3.8.7from
finscn:patch-23
Closed

解决 _entity 为空时 ,引起的闪退#18561
finscn wants to merge 1 commit intococos:v3.8.7from
finscn:patch-23

Conversation

@finscn
Copy link
Contributor

@finscn finscn commented Apr 3, 2025

关联 bug #18560 .

这个 pr 只是解决我遇到的问题.
但是还可能有其他问题, 比如

  • 我看其他动画相关的cpp类里, 也有类似逻辑 ( 使用了 setRenderEntity() 和 _entity ) , 是否也应该加上同样的判断?
  • 一个动画已经被销毁了, 为什么还会调用它的 render 方法? 是否有更深层的 bug 没有被发现?

这些问题就留给引擎组的同学去解决吧 我个人能力有限.帮不上忙.

Re: #

Changelog


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

@github-actions
Copy link

github-actions bot commented Apr 3, 2025

Code Size Check Report

Wechat (WASM) Before After Diff
2D Empty (legacy pipeline) 1002433 bytes 1002433 bytes ✅ 0 bytes
2D All (legacy pipeline) 2664474 bytes 2664474 bytes ✅ 0 bytes
2D All (new pipeline) 2752682 bytes 2752682 bytes ✅ 0 bytes
(2D + 3D) All 10005962 bytes 10005962 bytes ✅ 0 bytes
Web (WASM + ASMJS) Before After Diff
(2D + 3D) All 16919743 bytes 16919743 bytes ✅ 0 bytes

Interface Check Report

This pull request does not change any public interfaces !

@finscn
Copy link
Contributor Author

finscn commented Apr 5, 2025

3.8.5 没有闪退是因为 3.8.5 里没有 清空 _entity
image

@bofeng-song
Copy link
Contributor

请描述复现步骤,上传复现demo

@bofeng-song
Copy link
Contributor

bofeng-song commented Apr 7, 2025

@finscn 请参考这个 PR;当前的改动不够完整,我先关闭了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants