﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,phab_field
6714,Some models trigger black screen issues.,Stan,,"To spot them out you can use 
{{{#!diff
Index: source/graphics/ModelDef.cpp
===================================================================
--- source/graphics/ModelDef.cpp	(revision 27479)
+++ source/graphics/ModelDef.cpp	(working copy)
@@ -65,18 +65,19 @@
 		for (size_t i = 0; i < numBones; ++i)
 			boneMatrix[i] = boneMatrix[i] * inverseBindBoneMatrix[i];
 		for (size_t i = 0; i < numverts; ++i)
-			result += SkinPoint(verts[i], boneMatrix.data());
+			result += SkinPoint(verts[i], boneMatrix);
 	}
 	m_MaxBoundsPerAnimDef[animIndex] = result;
 }
 
 CVector3D CModelDef::SkinPoint(const SModelVertex& vtx,
-							   const CMatrix3D newPoseMatrices[])
+							   const std::vector<CMatrix3D>& newPoseMatrices)
 {
 	CVector3D result (0, 0, 0);
 
 	for (int i = 0; i < SVertexBlend::SIZE && vtx.m_Blend.m_Bone[i] != 0xff; ++i)
 	{
+		ENSURE(vtx.m_Blend.m_Bone[i] < newPoseMatrices.size());
 		result += newPoseMatrices[vtx.m_Blend.m_Bone[i]].Transform(vtx.m_Coords) * vtx.m_Blend.m_Weight[i];
 	}
 
@@ -450,7 +451,7 @@
 
 			for (size_t i = 0; i < mdef->m_NumVertices; ++i)
 			{
-				mdef->m_pVertices[i].m_Coords = SkinPoint(mdef->m_pVertices[i], &bindPose[0]);
+				mdef->m_pVertices[i].m_Coords = SkinPoint(mdef->m_pVertices[i], bindPose);
 				mdef->m_pVertices[i].m_Norm = SkinNormal(mdef->m_pVertices[i], &bindPose[0]);
 			}
 		}
Index: source/graphics/ModelDef.h
===================================================================
--- source/graphics/ModelDef.h	(revision 27479)
+++ source/graphics/ModelDef.h	(working copy)
@@ -204,7 +204,7 @@
 	 * @return new world-space vertex coordinates
 	 */
 	static CVector3D SkinPoint(const SModelVertex& vtx,
-		const CMatrix3D newPoseMatrices[]);
+		const std::vector<CMatrix3D>& newPoseMatrices);
 
 	/**
 	 * Transform the given vertex's normal from the bind pose into the new pose.

}}}

Currently affected actor (Maybe more):

* actor|props/structures/celts/merchant_sail_folded.xml
* actor|props/structures/romans/trireme_fore_sail.xml

Might be related to #1012.


Not sure how to fix it in Blender.

Potential temporary solution: Delete the actor.
",defect,new,Release Blocker,Alpha 27,Core engine,,,,
