Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

If you have any questions, reports, suggestions, or requests about Live2D, please send them to this forum.
※We cannot guarantee statements or answers from Live2D staff. Thank you for your understanding in advance.
Live2D Cubism
Cubism Products and Downloads
Cubism product manuals and tutorials
Cubism Editor Manual    Cubism Editor Tutorial    Cubism SDK Manual    Cubism SDK Tutorial
[About macOS Sonoma 14.0] (update 10/17/2023)
The current compatibility status with released Live2D Cubism products is as follows:
[supported]Live2D Cubism Editor version 5.0.01 and later
[not supported]Live2D Cubism Editor version 5.0.00 beta1 and earlier,Other Live2D Cubism products, including Live2D Cubism SDK.
Please refrain from upgrading the macOS as they may not work properly.
The Cubism Editor license file may be lost after the macOS upgrade.
Please make sure to deactivate the Cubism Editor license before upgrading the macOS.
For more details

[Native SDK] I got a runtime error "Buffer Validation Cannot create buffer of zero length."


While testing several models for our app, we encountered the following error during the initialization of model:

-[MTLDebugDevice newBufferWithLength:options:]:642: failed assertion `Buffer Validation
Cannot create buffer of zero length.`
Coming from the lines:
Line 89
_vertices = [device newBufferWithLength:_vbStride * count
Line 1310
const csmInt32 drawableVertexCount = model->GetDrawableVertexCount(i);
Line 1317
_drawableDrawCommandBuffer[i]->CreateVertexBuffer(device, vertexSize, drawableVertexCount);

We tried the models in frameworks CubismSdkForNative-4.r.7 and CubismSdkForNative-5.r.1-beta.3 both in the demo app and in our app and both resulted in the mentioned error. (Simulator and real device)

The target model can be downloaded via It's free.

This issue is caused by value 0 from "model->GetDrawableVertexCount(i)" some value of an array on a certain index has value 0. I was wondering if it's normal that the array contains zeros sparsely. We found the workaround to return 1 instead of 0 to resolve it. That's working now, but I am afraid that it's the right approach.

As mentioned again to be clear, it occurs on the demo app for native provided by Live2D.

Thank you in advance.


  • @fullc0de

    Thank you for always using our products.

    I apologize for the delay in getting back to you.
    We are currently investigating, so please wait for a while.
    I will contact you again.
  • edited November 2023

    Thank you for always using our products.

    We investigated the cause of the error occurring in the SDK for Native Metal environment.

    This error occurs because the path of the model's facial expression file (exp3.json) in model3.json is incorrect.
    The location of exp3.json is in the exp directory, but that directory is not written in model3.json.

    The SDK for Native checks whether the file path listed in the model3.json file exists regardless of the renderer, so an error occurs because the expression file with the wrong path cannot be loaded.

    In fact, if you ignore the loading of exp3.json in model3.json, the model will be able to be drawn correctly, so correct the file path or ignore the loading of exp3.json. It works.

    We use machine translation. If there is anything that is difficult to understand, please feel free to let me know.
    Best regards.
Sign In or Register to comment.