This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
While implementing some unit tests, I found out that calling vxProcessGraph() on a graph that has no nodes makes the process hang without feedback, even if vxVerifyGraph() succeeded.
I haven't seen a mention of this behavior in the documentation, is this intended?
Catch2 test below. If you comment the vxProcessGraph() call, then if works. Else, it just hangs.
TEST_CASE("Empty graph") { // Init REQUIRE(0 == appInit()); vx_context ctx = vxCreateContext(); REQUIRE(nullptr != ctx); // Create vx_graph graph = vxCreateGraph(ctx); REQUIRE(VX_SUCCESS == vxGetStatus((vx_reference) graph)); REQUIRE(nullptr != graph); REQUIRE(VX_SUCCESS == vxSetReferenceName((vx_reference) graph, "MyGraph")); // Verify REQUIRE(VX_SUCCESS == vxVerifyGraph(graph)); // Run REQUIRE(VX_SUCCESS == vxProcessGraph(graph)); // Cleanup REQUIRE(VX_SUCCESS == vxReleaseGraph(&graph)); REQUIRE(VX_SUCCESS == vxReleaseContext(&ctx)); REQUIRE(0 == appDeInit()); }
Hi FredC_LT,
Sure, we will check this. Most likely this is a bug. But typically we would have atleast one node in the graph, any specific reason you want to run graph without any node?
Regards,
Brijesh
Thanks Brijesh.
I was just implementing a C++ wrapper and testing a virtual class for graphs, that's why it does not have any node.
Hi FredC_LT,
I would recommend keeping atleast one node in the graph before calling vxProcessGraph.
Regards,
Brijesh