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

segfault with number fields #27

Closed
videlec opened this issue Apr 17, 2019 · 2 comments
Closed

segfault with number fields #27

videlec opened this issue Apr 17, 2019 · 2 comments

Comments

@videlec
Copy link
Contributor

videlec commented Apr 17, 2019

>>> import PyNormaliz
>>> nf = [ "a4-5a2+5", "a", "1.9021+/-0.01" ]
>>> C = PyNormaliz.NmzCone(number_field=nf, cone=[[[1],[0,1]],[[1],[-1]]])
>>> PyNormaliz.NmzResult(C, "ExtremeRays")
@sebasguts
Copy link
Member

sebasguts commented Apr 22, 2019

Should be fixed in 997ae34.

That was a tough one. Apparently, PyList_SetItem steals a reference, and you need to increase the reference count accordingly if you want to insert the same object into several lists.

@videlec
Copy link
Contributor Author

videlec commented Apr 23, 2019

This does fix all issues but #22. Thank you.

@videlec videlec closed this as completed Apr 23, 2019
videlec added a commit to videlec/PyNormaliz that referenced this issue Apr 23, 2019
sebasguts pushed a commit that referenced this issue Apr 23, 2019
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

2 participants