Am Freitag, 3. September 2021, 17:42:40 CEST schrieb Gerion Entrup:
Am Freitag, 3. September 2021, 11:12:45 CEST schrieb Tiago de Paula Peixoto:
Am 03.09.21 um 00:18 schrieb Gerion Entrup:
My question: How can I debug this and find out, why it is invalid? Can I do/print anything in Python? Should I use GDB? Where would be a good place to set a breakpoint?
I cannot print the faulty edge. It is fairly complicate to make an minimal example. My whole code uses no remove_edge() or remove_vertex(). I'm using graph_tool 2.43.
What you should do is produce a minimal example that shows the problem... No debugger is going to replace this simple strategy.
The function is not new. It has worked for some time now. I'm pretty sure, that this exact graph produces the problem. So to make a minimal example, it would help to understand the problem first.
I have found my error. The function `get_function_bbs` actually is a generator and thus leaving the out_edges() iterator intact. In the code which calls `get_function_bbs`, however, some additional edges are created for this exact node (`function`) which probably destroys the iterator. Storing the generator output in memory first fixes the problem. Best, Gerion