Dear All,
Thought I would share a solution to a strange clone object command crash.
The crash was one of those nasty ones that doesn't generate a run-time error message. After some experimentation I found it was being caused by the clone object command and only occurred with certain models, and only some of the time. The weird thing was the model would load, but would crash 75% of the time when I tried to clone the object.
The crash was caused by a problem with the model's x-file. The model was created in blender and exported with Kira's excellent exporter (http://forum.thegamecreators.com/?m=forum_view&t=166987&b=3).
The problem was with an empty object mesh (with no vertices) in the x-file definition. Once this is removed the object clones every time. In blender you'll sometimes find you've accidently created an empty mesh. You can locate it in the outliner and remove it. The problem mesh definition in the x-file is shown below:
Frame Mesh_004 {
FrameTransformMatrix {
0.069492, 0.000000, 0.000000, 0.000000,
0.000000, 0.069492, 0.000000, 0.000000,
0.000000, 0.000000, 0.069492, 0.000000,
-1.368773, 0.660006, 1.534233, 1.000000;;
}
Mesh { //Mesh_004 Mesh
0;
0;
MeshNormals { //Mesh_004 Normals
0;
0;
} //End of Mesh_004 Normals
MeshMaterialList { //Mesh_004 Material List
1;
1;
0;;
Material Default_Material {
1.000000; 1.000000; 1.000000; 1.000000;;
1.500000;
1.000000; 1.000000; 1.000000;;
0.000000; 0.000000; 0.000000;;
}
} //End of Mesh_004 Material List
MeshTextureCoords { //Mesh_004 UV Coordinates
0;
} //End of Mesh_004 UV Coordinates
} //End of Mesh_004 Mesh
} //End of Mesh_004
Best,
Mr Grumpy
GrumpyOne - the natural state of the programmer