Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PictGenerate does not clean previous results before generating the new ones #123

Open
MilanAssuied opened this issue Jun 20, 2024 · 0 comments

Comments

@MilanAssuied
Copy link

MilanAssuied commented Jun 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant