Skip to content

Fix native crash while using mask due to use unintialized submodel #18722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

bofeng-song
Copy link
Contributor

@bofeng-song bofeng-song commented May 19, 2025

Re: #
https://forum.cocos.org/t/topic/167947

https://forum.cocos.org/t/topic/167947/7

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.

@bofeng-song bofeng-song requested a review from star-e May 19, 2025 05:54
@star-e
Copy link
Contributor

star-e commented May 19, 2025

@cocos-robot run test cases

Copy link

Code Size Check Report

Wechat (WASM) Before After Diff
2D Empty (legacy pipeline) 1005977 bytes 1005977 bytes ✅ 0 bytes
2D All (legacy pipeline) 2671042 bytes 2671042 bytes ✅ 0 bytes
2D All (new pipeline) 2759549 bytes 2759549 bytes ✅ 0 bytes
(2D + 3D) All 10015498 bytes 10015498 bytes ✅ 0 bytes
Web (WASM + ASMJS) Before After Diff
(2D + 3D) All 16837119 bytes 16837119 bytes ✅ 0 bytes

Interface Check Report

This pull request does not change any public interfaces !

Copy link

@bofeng-song, Please check the result of run test cases:

Task Details

Platform build boot runned crashScene FailScene
web-mobile PASS PASS PASS
ios PASS PASS FAIL Morph-Head,audioBuffer,trimmed,scroll-view-bounce-back,scroll-view-rotation,scroll-view-scroll-to-offset,graphics-mask,mask-inverted-event,mask-inverted,mask-nesting,mask-type-change,mask-use-image-stencil,mask,graphics-draw-before-init,graphics-line-join,graphics,pageView_free_horizontal,pageView_free_verticle,pageView_unified_horizontal,pageView_unified_verticle,opacity-auto,perspective-ui,visibility-changed
mac PASS PASS FAIL Morph-Head,audioBuffer,scroll-view-bounce-back,scroll-view-rotation,scroll-view-scroll-to-offset,graphics-mask,mask-inverted-event,mask-inverted,mask-nesting,mask-type-change,mask-use-image-stencil,mask,graphics-draw-before-init,graphics-line-join,graphics,pageView_free_horizontal,pageView_free_verticle,pageView_unified_horizontal,pageView_unified_verticle,opacity-auto,perspective-ui,visibility-changed

Copy link

@bofeng-song, Please check the result of run test cases:

Task Details

Platform build boot runned crashScene FailScene
windows PASS PASS FAIL Morph-Head,SpineBoy,scroll-view-bounce-back,scroll-view-rotation,scroll-view-scroll-to-offset,graphics-mask,mask-inverted-event,mask-inverted,mask-nesting,mask-type-change,mask-use-image-stencil,mask,graphics-draw-before-init,graphics-line-join,graphics,pageView_free_horizontal,pageView_free_verticle,pageView_unified_horizontal,pageView_unified_verticle,opacity-auto,perspective-ui,visibility-changed
android PASS PASS FAIL Morph-Head,audioBuffer,SpineBoy,scroll-view-bounce-back,scroll-view-rotation,scroll-view-scroll-to-offset,graphics-mask,mask-inverted-event,mask-inverted,mask-nesting,mask-type-change,mask-use-image-stencil,mask,graphics-continuous-filling,graphics-draw-before-init,graphics-line-join,graphics,pageView_free_horizontal,pageView_free_verticle,pageView_unified_horizontal,pageView_unified_verticle,opacity-auto,perspective-ui,visibility-changed
wechatgame PASS PASS PASS

@bofeng-song
Copy link
Contributor Author

bofeng-song commented May 19, 2025

Uploading 企业微信截图_17476455731285.png…

In the C++ implementation of the RenderEntity system, a single node can only have one type of RenderEntity. In the problematic test case:

A Sprite creates a static-type RenderEntity.

A Mask creates a dynamic-type RenderEntity.

Conclusion: No engine modification is required.

@bofeng-song bofeng-song deleted the 387_mask_crash branch May 19, 2025 09:17
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.

3 participants