Issues with triangle mesh cooking PhysX 3.3.4

Hi so i have wrote a python script to convert an wavefront OBJ file from blender into PxVec3 vertex array and a PxU32 triangle array, which is then used to create the triangle mesh.

However the issue that I’m experiencing is that this works perfectly sometimes, and other time not so much - with the same mesh. E.g. I start my PhysX program, and create 10 of the same objects and some of them look like this:

but then 2 or 3 will look like this despite being loaded with the same data

both are being passed the vertex and triangles array however they result in vastly different outputs. Below is the code i am using to cook the mesh

class CustomObject : public StaticActor
		ModelLoader* modelLoader;

		CustomObject(const PxTransform& pose = PxTransform(PxIdentity), string vert = "", string trig = "") :
			//creates new model loader to load vertex and triangle data
			modelLoader = new ModelLoader();

			objectVerts = modelLoader->LoadVertexFile(vert);	//returns PxVec3 and stores in vector
			objectTrigs = modelLoader->LoadTrianglesFile(trig);	//returns PxU32 and stores in vector

			PxTriangleMeshDesc mesh_desc;
			mesh_desc.points.count = (PxU32)objectVerts.size();
			mesh_desc.points.stride = sizeof(PxVec3); = &objectVerts.front();
			mesh_desc.triangles.count = (PxU32)objectTrigs.size();
			mesh_desc.triangles.stride = 3 * sizeof(PxU32); = &objectTrigs.front();

			PxDefaultMemoryOutputStream stream;

 			if (!GetCooking()->cookTriangleMesh(mesh_desc, stream))
				throw new Exception("TriangleMesh::CookMesh, cooking failed.");

			PxDefaultMemoryInputData input(stream.getData(), stream.getSize());
			PxTriangleMeshGeometry meshGeometry = GetPhysics()->createTriangleMesh(input);

			std::cout << "Custom Object Deleted" << std::endl;
			delete modelLoader;

EDIT: I’ve updated my code to make sure that CustomObject always has a copy of the vertex and triangle data, however the problem still persists