Help passing the Fuzzer
Closed this issue · 3 comments
Hey everyone. I'm not sure why I'm failing this particular test in the fuzzer and would like to see if any of you know what might be happening. Occasionally, all the tests will pass, but 9/10 I get caught with
Exception Fuzzer failed on iteration 9992 action 12
Exception: GDWG node count mismatch
And this happens for every type (hashable / unhashable combination)
I print out the values of nodes.size() and slowGraph.nodes.size() and
nodes.size() is ALWAYS 1 less than slowGraph.nodes.size(). Checking the size during my printNodes function it is always the same number, so that means the issue is either, a node is not getting inserted into my graph, or a node was wrong inserted into the slowGraph.
Anyone ran into this error?
- Cameron
Try turning on CHECK_EQUALITY_EVERY_ITERATION
to see exactly which iteration the graphs diverge. It's off by default because it's sloooow
Yep, I did that and I found out it was an edge case in mergeReplace where src and dst were the same! So my implementation was stuffing up.
My newest error is
Fuzzer.cpp:155: std::set<std::pair<_T1, _T2> > {anonymous}::_extractGdwgEdges(const gdwg::Graph<N, E>&, const NodeLabel&) [with NodeLabel = {anonymous}::Unhashable; EdgeValue = {anonymous}::Hashable]: Assertion `result.insert(std::make_pair(std::move(label), std::move(value))).second' failed
And the preceding action before hand was mergeReplace. So there must be a bug where duplicate edges are being added!
All fixed! Always a good idea to make copies of the data first and not try to modify it in place. Thanks for the help