-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix the issue where Spine crashes due to container scaling. #17570
Conversation
@cocos-robot run test cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Interface Check ReportThis pull request does not change any public interfaces ! |
Minimal code that reproduces the issue: #include <vector>
int main(int argc, const char * argv[]) {
std::vector<int> arr{0, 1,2, 3, 4, 5, 6, 7, 8, 9, 10};
for (auto & e: arr) {
if (e == 5) {
arr.push_back(11);
}
printf("%d, ", e);
}
printf("\n");
return 0;
} Enable AddressSanitizer:
|
@bofeng-song, Please check the result of
Task Details
|
@bofeng-song, Please check the result of
Task Details |
This bug appeared from v3.6.0 in PR ( minggo/engine-native#442 ) |
Re: #
https://forum.cocos.org/t/topic/160784/3
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request:
Greptile Summary
This pull request modifies the MiddlewareManager class in the Cocos engine to address a potential crash issue related to Spine and container scaling.
native/cocos/editor-support/MiddlewareManager.cpp
to replace range-based for loops with index-based loops in update and render methods