NVIDIA Flex crashing after setting collision triangles on a obj file in Open GL

Hello Everyone,

     I'm working on a Surgical Simulation project and I'm using NVIDIA Flex particle engine to simulate fluid flow. To test the API out I wrote a simple emitter and rendered a parsed obj file (a broken sphere). I got the particles to render and act as a fluid, but if I set collision triangle on the obj file, the program gets an assertion error. Below is the code where I created the indices and vertices arrays to set the collision triangles on them.
flexObject->indices = (int*)(malloc(sizeof(int)*3*num_tris1));
flexObject->vertices = (float*)(malloc(sizeof(float)*3*num_vert1));

for(int i = 0; i < num_tris1 ;i++)
	flexObject->indices[i*3+0] = parsed_indices[i].x;
	flexObject->indices[i*3+1] = parsed_indices[i].y;
	flexObject->indices[i*3+2] = parsed_indices[i].z;
	cout << flexObject->indices[i*3+0] <<" "<< flexObject->indices[i*3+1] <<endl;

for(int j = 0; j < num_vert1;j++)
	flexObject->vertices[j*3+0] = parsed_vertices[j].x;
	flexObject->vertices[j*3+1] =  parsed_vertices[j].y;
	flexObject->vertices[j*3+2] =  parsed_vertices[j].z;


And below is the code where I set them.

void smFlex::setCollisonTris()
	flexSetTriangles(Solver, indices, vertices, num_tris,num_vert,Params->mRadius*2,eFlexMemoryHost);

And I keep getting this error: Assertion Failed!

The obj file contains 731 triangles and 387 vertices. I would really appreciate some help.

Thank You!