Cocos create 3.8.x native bug

I found a bug in the createMesh function. Please fix it.

cpp:

ts:

Thanks for you feedback, could you show the behavior of the bug occurs? Or you can provide the demo for us to check the bug fix.

CreateMesh.cpp:

if (geometry.customAttributes.has_value()) {
for (const auto &ca : geometry.customAttributes.value()) {
// const auto &info = gfx::GFX_FORMAT_INFOS[static_cast<uint32_t>(attr->format)];
const auto &info = gfx::GFX_FORMAT_INFOS[static_cast<uint32_t>(ca.attr.format)]; // by Mac
attributes.emplace_back(ca.attr);
vertCount = std::max(vertCount, static_cast<uint32_t>(std::floor(ca.values.size() / info.count)));
channels.emplace_back(Channel{stride, ca.values, ca.attr});
stride += info.size;
}
}

I can see the differences between ts codes and c++ codes. Could you provide the demo which can regenerate the bug.

:cocos create 3.8.6
NewProject.zip (273.7 KB)
: Chrome(web)


: Native(Android)

gotcha


I can not regenerate the bug you have showed. Please provide the phone infos to me.

Galaxy S10+
OS: Android 12
change CreateMesh.cpp ?

Show me CreateMesh.cpp ?

original native code, use vivo s9 and mi 8

Thank you!