Check the
documentation and tutorial on how to use VertexArrays.
You create a vertex array with 25 elements and then you append additionally 25 elements by calling append(). Either don't allocate 25 elements and call append or if you allocate 25 elements you should access them with the indices.