You are getting an assertion in the heap handling. You can check the mentioned line by viewing the source of
dbgheap.c (see at
VC<version>\crt\src in your VisualStudio directory).
Such assertion usually indicates a heap corruption.
I have never used
igraph but the error is obvious and verified when reading the
igraph Reference Manual[
^].
igraph_vector_init(&v, 0);
Quote:
This function constructs a vector of the given size and initializes each entry to 0.
VECTOR(v)[0]=v1
Quote:
The simplest way to access an element of a vector is to use the VECTOR macro. This macro can be used both for querying and setting igraph_vector_t elements.
...
Note that there are no range checks right now.
You are creating a vector of the size zero and then try to access elements. This will of course fail because no memory has been allocated on the heap and accessing elements uses probably a
NULL
pointer which is catched later by the heap checks.
You have to check first how many elements are in your input file and pass that number to
igraph_vector_init()
to allocate the required memory.