Note: I developed a fix for this issue and would like to request to push it.
Bug description
When called n times while expecting i rows of results, the PictGenerate function will generate n * i rows of results.
This issue is directly linked to the Model::Generate method, which means that even after fetching the results, and cleaning the results buffers, if the model is modified and the generation is triggered, the initial results will still be present.
How to reproduce
The easiest way is to modify the api-usage/pictapi-sample.cpp file and duplicate the PictGenerate call at least once.
Another option is to use the files provided with this issue. They are a duplication of the above file, stripped of unnecessary code and already reproducing the bug.
pictapi-debug-sandbox.zip
Fix
The Model::Generate function must be modified to clean the ResultCollection before generating new results.