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

Adding Observer causes SIGSEGV #105

Closed
domoritz opened this issue May 24, 2018 · 4 comments
Closed

Adding Observer causes SIGSEGV #105

domoritz opened this issue May 24, 2018 · 4 comments
Assignees
Labels

Comments

@domoritz
Copy link
Contributor

domoritz commented May 24, 2018

#script(python)

class Observer():
    pass

def main(prg):
    prg.register_observer(Observer())

    prg.ground([('base', [])])
    prg.solve()

#end.

a(1..3,1).
a(3..6,2).
a(6..9,3).
a(9..12,4).

2 { b(X,C): a(X,C) } 10.

:~ b(X,C). [C,X]

#show b/2.
> clingo test.lp  
clingo version 5.2.2
Reading from test.lp
fish: 'clingo test.lp' terminated by signal SIGSEGV (Address boundary error)
@domoritz
Copy link
Contributor Author

The documentation says An observer should be a class of the form below. Not all functions have to be implemented and can be ommited if not needed.

@domoritz
Copy link
Contributor Author

Is this the same as the lucky issue #42? It doesn't seem to be as the patch was merged into master and released already.

@domoritz
Copy link
Contributor Author

I tried with a clingo binary built from master and see the same problem.

@rkaminsk rkaminsk self-assigned this May 27, 2018
@rkaminsk rkaminsk added the bug label May 27, 2018
rkaminsk added a commit that referenced this issue May 27, 2018
@domoritz
Copy link
Contributor Author

domoritz commented May 27, 2018

🎉 Thank you for the quick response! The patch fixes the issue.

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

No branches or pull requests

2 participants