Skip to content

WIP/RFC: Do not call SCIPincludeObjExprhdlr in exprCopyhdlrObj #159

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kkofler
Copy link
Contributor

@kkofler kkofler commented Jun 24, 2025

src/objscip/objexprhdlr.cpp (exprCopyhdlrObj): Comment out the call to SCIPincludeObjExprhdlr because this is called from the Java code.

See #149 (comment) for details.

TODO: This is a quick hack to fix the double free. Find a solution that is acceptable upstream and gets applied consistently also to constraint handlers etc.

src/objscip/objexprhdlr.cpp (exprCopyhdlrObj): Comment out the call to
SCIPincludeObjExprhdlr because this is called from the Java code.

See scipopt#149 (comment) for
details.

TODO: This is a quick hack to fix the double free. Find a solution that
is acceptable upstream and gets applied consistently also to constraint
handlers etc.
@kkofler
Copy link
Contributor Author

kkofler commented Jun 24, 2025

I am submitting this mostly as an RFC, because my comment on the old pull request got no reply, and because I I need some solution for this issue for the work I am doing on JSCIPOpt.

One alternative approach would be to have the ObjExprhdlr carry a boolean flag to record whether it was already included and have SCIPincludeObjExprhdlr do nothing in that case. Or, instead of a boolean flag, we could also remember the SCIP_EXPRHDLR* so that SCIPincludeObjExprhdlr can return it again. (Though that is not actually needed here because the call from Java will have happened first, and the call in exprCopyhdlrObj does not need the SCIP_EXPRHDLR* output.)

@kkofler kkofler marked this pull request as draft June 24, 2025 22:59
@svigerske
Copy link
Member

I was a bit busy the last days, but hope to catch up with this in the next days.

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

Successfully merging this pull request may close these issues.

2 participants