We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a large database (817718 facts) in the form of:
actor(actor_519105,m). actor(actor_524655,m). actor(actor_475182,m). actor(actor_370794,m). actor(actor_389977,m). actor(actor_213427,m). actor(actor_380131,m). actor(actor_302008,m). actor(actor_171966,m). actor(actor_291,m). ...
When I try to run:
from pyswip import Prolog prolog = Prolog() prolog.consult('test.pl') for r in prolog.query('actor(A,_)'): print(r)
then is crashes with:
{'A': 'actor_44508'} {'A': 'actor_60096'} {'A': 'actor_66141'} {'A': 'actor_95401'} .... [FATAL ERROR: at Thu Aug 27 17:32:11 2020 Too many stacked strings]
Also, if instead of print(r) I just put pass, it crashes as well.
print(r)
pass
If I do the same in Prolog then is succeeds without any issues:
['test.pl']. set_prolog_flag(answer_write_options,[max_depth(0)]). findall(A, actor(A,_), L).
If I use findall in Python, like:
findall
L = list(prolog.query('findall(A, actor(A,_), L)'))[0]['L'] for r in L: print(r.value)
then it crashes as well.
With a smaller database this doesn't happen. Any ideas?
The text was updated successfully, but these errors were encountered:
I traced the issue to PL_get_chars, which crashes after a large number of query results. Does that come from libswipl?
PL_get_chars
libswipl
Edit: Yes, and it crashes at this line.
Sorry, something went wrong.
Saw this, don't know if it is relevant but better to have seen it and decide than not.
SWI-Prolog/swipl-devel@ab1a138
Successfully merging a pull request may close this issue.
I have a large database (817718 facts) in the form of:
When I try to run:
then is crashes with:
Also, if instead of
print(r)
I just putpass
, it crashes as well.If I do the same in Prolog then is succeeds without any issues:
If I use
findall
in Python, like:then it crashes as well.
With a smaller database this doesn't happen.
Any ideas?
The text was updated successfully, but these errors were encountered: