-
Notifications
You must be signed in to change notification settings - Fork 234
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 when I fail to declare variable in SatisfactionLink inside LambdaLink #2768
Comments
I tried the above, and I don't get a crash, I get a different error (which should not occur)
|
Digging just a bit deeper, it appears that there's some inf-loop in there, which, for me, is terminated after exceeding the max count ... |
Oh. Hah. The inf loop is due to the variables being untyped. So, somewhere during matching, it decides that it should explore the At the moment, its not obvious to me why, exactly, it tried to loop. However, this is a generic problem of untyped variables: during pattern matching, the worst-case assumption is to try to match everything, which is both a performance hit, and often leads to obscure bugs like this. The following works:
|
Oh, ahh Hmm I have to eat some of my words. The following also works:
You are right -- the definition for the |
The following Scheme code crashes the process running OpenCog (guile in my case)
.. code-block:: scheme
I can work around the issue by declaring (Variable "predicate_object") in the SatisfactionLink. Regardless of whether the undeclared variable is valid, I would expect an error and not a crash.
I don't know how I access the relevant OpenCog / Atomspace version. I am running the OpenCog Docker images, which are based on Ubuntu 18.04.4 LTS.
The text was updated successfully, but these errors were encountered: