Hi,
I'm currently building my own interface to igraph.
But after building some 100 Graphs it crashes with
error.c:125: failed assertion `no<100'
I probably forget to clean something but I have no idea what?
Functions for creating and destroying the graphs are included.
The only thing special is that I store for every node a name.
Or can I figure somehow out the size of the stack (or increase it).
Therefor I defined my own struct:
typedef struct {
igraph_t * graph;
igraph_trie_t * names;
} yap_igraph_t;
Construction code:
yap_igraph_t * ygraph=malloc(sizeof(yap_igraph_t));
ygraph->graph=malloc(sizeof(igraph_t));
igraph_t * graph= ygraph->graph;
//printf("%p \n ",ygraph);
igraph_vector_t * v1 = malloc(sizeof(igraph_vector_t));
igraph_vector_init(v1, 0);
igraph_create(graph, v1, 0, IGRAPH_UNDIRECTED);
igraph_vector_destroy(v1);
ygraph->names=malloc(sizeof(igraph_trie_t));
//I also do not sure, why I need the next to lines both. But
without it doesnt work
igraph_trie_init(ygraph->names,0);
IGRAPH_TRIE_INIT_FINALLY(ygraph->names,TRUE);
Destruction code:
igraph_trie_destroy(ygraph->names);
igraph_destroy(ygraph->graph);
igraph_free(ygraph->names);
igraph_free(ygraph->graph);
free(ygraph);
Thanks in advance
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help