mesh.vertexBuffer is null?

Good evening everyone,

I’ve run into a strange error when working with a project. The first time I switch to this scene, it loads in normally, but if I leave the scene and then return, the app crashes and the console logs this error:

mesh.vertexBuffer is null

Any ideas?

I ensured that all of the assets in the scene are properly tagged to be loaded by a preloader, disabled geometry entities, disabled light entities, and deleted both geometry and lights temporarily. Still the error persists the 2nd time the scene is loaded.

I was able to narrow it down to 6 identical RenderComponents using the Cylinder primitive. Removing the RenderComponent and replacing it with a ModelComponent cleared the error.

Not sure if this should be marked solved. Been a long day. I will try to create a small repro, if even possible, in the morning.

It’d be fantastic to have a repro of this, that would allow us to sort it out quickly. Let us know! Thanks.

Reproduced here:

3 Likes

Thank you @yaustar !

I was trying to reproduce, but I apparently did something different in the attempted repro. I was about to offer an invite to a fork of the individual project.

I still don’t know what I did differently.

Thanks for the report and the bug guys … the fix is here Fix to primitives mesh ref-counting to avoid those getting released by mvaligursky · Pull Request #3292 · playcanvas/engine · GitHub
We’ll likely release it at the end of this week, when the engine will hopefully get released.

4 Likes