Skip to content

macOS/Windows/iOS Crash: Texture allocation size exceeds the maximum allowed size of 16384 #556

@BlockRen

Description

@BlockRen

Description

Our macOS application experiences a crash involving CVPixelBufferCreate, CVMetalTextureCacheCreateTextureFromImage, and an invalid MTLTextureDescriptor. The crash log indicates texture descriptor dimensions (width: 4294966496) vastly exceed Metal's maximum allowed size (16384) .

While the crash log doesn't explicitly name Rive Native, the occurrence is strongly correlated with parts of our application using Rive, suggesting a potential issue within the Rive Native library, possibly during texture allocation or management for animation rendering.

​Error Log​

2025-10-12 20:42:19.537 app[71118:58991793] CVPixelBufferCreate error -6662
2025-10-12 20:42:19.537 app[71118:58991793] CVMetalTextureCacheCreateTextureFromImage error -6661
2025-10-12 20:42:19.538 app[71118:58991793] CVPixelBufferCreate error -6662
2025-10-12 20:42:19.538 app[71118:58991793] CVMetalTextureCacheCreateTextureFromImage error -6661
2025-10-12 20:42:19.538 app[71118:58991793] CVPixelBufferCreate error -6662
2025-10-12 20:42:19.538 app[71118:58991793] CVMetalTextureCacheCreateTextureFromImage error -6661
-[MTLTextureDescriptorInternal validateWithDevice:]:1357: failed assertion `Texture Descriptor Validation
MTLTextureDescriptor has width (4294966496) greater than the maximum allowed size of 16384.

Device & Versions (please complete the following information)

∙​​Device:​​ Macbook Pro
∙OS Version:​​ Sonoma 14.6.1, 23G93, darwin-arm64
∙Rive Native Version:​​ rive 0.14.0-dev.9
∙Flutter 3.35.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions