[Regarding macOS Tahoe](Updated September 18, 2025)
We cannot guarantee the compatibility of the current releases of Live2D Cubism Editor and Cubism SDK with macOS Tahoe.
We advise against upgrading your macOS at this time as it may cause Live2D products not to function correctly.
Upgrading macOS can also cause you to lose your Cubism Editor license file.
Please make sure to deactivate your Cubism Editor license before upgrading the macOS.
For more details:
https://help.live2d.com/en/other/other_09/For inquiries regarding issues with license purchases or license activation errors, please contact us through the
email form.Can cause csmReviveMocInPlace return nullptr when I use csmGetSizeofModel?
#include
#include
#include
int main(int argc,char ** argv)
{
for(auto i=0;i<100000;i++)
{
auto file = fopen("../../../CubismSDK/Core/Haru/Haru.moc3", "rb");
fseek(file, 0, SEEK_END);
auto len = ftell(file);
fseek(file, 0, SEEK_SET);
auto data = std::vector<uint8_t>(len);
auto readLen = fread(data.data(), sizeof(uint8_t), len, file);
if (len != readLen)
{
printf("No!");
}
auto moc = csmReviveMocInPlace(data.data(), len);
if (!moc)
{
printf("moc is nullptr!");
}
auto modelSize = csmGetSizeofModel(moc);
printf("%d\n", i);
fclose(file);
}
}
--------------------------------------------------------------------
I run my example.Not add csmGetSizeofModel's function can work.But I add csmGetSizeofModel will csmReviveMocInPlace return null and print my log "moc is nullptr!".
0 ·
Comments
Please check if the allocated memory is alligned.
Here is Live2D Core API.
https://cubism.live2d.com/sdk-doc/reference/NativeCoreAPIReference_en_r11.pdf
And see the API 'csmReviveMocInPlace..."The address passed by address must satisfy the default alignment."
I wondered if perhaps the moc variable had an incorrect value because the memory was not aligned.
This is a sample to get alligned memory.
https://github.com/Live2D/CubismNativeSamples/blob/044c9b091a1feae8296248229acf97ddbd3dd0dd/Samples/OpenGL/Demo/proj.android.cmake/Full/app/src/main/cpp/LAppAllocator.cpp#L22
I try your example,it can work.
Thanks.