Closed rkaminsk closed 6 years ago
One way to fix this could be
diff --git a/src/clasp_facade.cpp b/src/clasp_facade.cpp
index c99ed7d..f07cea2 100644
--- a/src/clasp_facade.cpp
+++ b/src/clasp_facade.cpp
@@ -637,6 +637,7 @@ void ClaspFacade::Statistics::initLevel(uint32 level) {
}
}
void ClaspFacade::Statistics::addExternal(StatsCallback cb, void* data) {
+ getClingo();
sources_.push_back(UserSource(cb, data));
}
Here it would probably be better to store the sources in the ClingoView
in the first place.
Thanks. Fixed in dev.
Just calling
ClaspFacade::addStatisticsCallback
is not enough to make user statistics appear in the text output. When the (read-only) statistics are traversed at some point, then they will appear also in the textoutput with--stats
.