Details
Description
If you have two models with same mesh (e.g. "#Cube") in the same scene, and one model has BakedLightmap specified and one doesn't, this can crash depending on the order of the models in the scene, if the baking is not yet done and thus the baked mesh with UVs doesn't yet exist.
My guess is that the problem is related to QSSGBufferManager::loadRenderMesh. If non-baked model is loaded first, and then the baking-enabled model, those loads have different options but same mesh, so the regularly loaded mesh is released and replaced with baking-enabled mesh. However, since we haven't baked yet, this somehow corrupts the mesh for the non-baked model:
Debug trace: QSSGLayerRenderData::prepareModelForRender , theMesh->subsets.size()= 2333695256432
This is an issue for QDS, where puppet can crash while you are setting up the baking properties for the scene before baking.
See attached standalone example, running it will result in crash.