That's because you don't add boxMesh to the world. Your can't do a collision detection between objects that don't belong to a world, because they don't know each other. I agree that a null pointer isn't a good error message in that case. I'll add a check and a proper error message in the next version.