Trouble with ofPath

This is my draw code

ofPath path;

path.arc        (moon.GetDrawPoint(), m_radius, m_radius,           m_fFirstBound -90 , m_fSecondBound -90);
path.arcNegative(moon.GetDrawPoint(), m_radius - m_thickness, m_radius - m_thickness,   m_fSecondBound -90, m_fFirstBound -90);



this crashes intermittently, when it comes to draw, I think it’s getting a null pointer when the renderer tries to get the tesselation as at this line in void ofGLRenderer::draw(const ofPath & shape)

const ofMesh & mesh = shape.getTessellation();

mesh has no variables I can view, I’m using xcode so I believe that’s an indication it’s null. The crash I get is exc_bad_access in the following place

// This is never executed right now but this branch of the ifdef should be used for GLES 3 so let's keep it for future uses
		glDrawElements(ofGetGLPrimitiveMode(vertexData.getMode()), vertexData.getNumIndices(),GL_UNSIGNED_SHORT,vertexData.getIndexPointer());
		glDrawElements(ofGetGLPrimitiveMode(vertexData.getMode()), vertexData.getNumIndices(),GL_UNSIGNED_INT,vertexData.getIndexPointer());

I thought that vertexData would be coming in as null, so how come the crash isn’t in vertexData.getNumIndices? What could cause getTessellation in ofPath to return null, and could getNumIndices() still be called and not crash? Could the memory the mesh is a reference of be being modified by some other thread at the moment of drawing?

what platform are you using this on? is it iOS and are you using Xcode 8? I don’t have a solution for you, but i have been having difficulties with ofPath since Xcode 8

It’s ok, I was overwriting an array in a render function which was overwriting some memory, a reference was refering to null memory and had no null check. been fine since then. I’m on mac, I think xcode 8 but I’m away from my dev mbp.

ahhhhhh i see, thanks