Skip to content
This repository has been archived by the owner on May 21, 2018. It is now read-only.

Relex throws exception running OpenCog chatbot/behavior tree #709

Open
eddiemonroe opened this issue May 4, 2017 · 3 comments
Open

Relex throws exception running OpenCog chatbot/behavior tree #709

eddiemonroe opened this issue May 4, 2017 · 3 comments

Comments

@eddiemonroe
Copy link
Contributor

eddiemonroe commented May 4, 2017

On a fresh installation of HEAD, running

./dev.sh --oc

results in java.lang.IndexOutOfBoundsExceptions in the relex server.

This leads to "The Relex server seems to have crashed!" messages in and aborting of the OpenCog scripts in the "cog" and "tel" windows.

Here is the output from the "relex server" window:

Info: hndlr=1 sentence: I am looking to the left
Error: Failed to process sentence: I am looking to the left
java.lang.IndexOutOfBoundsException: Index: 7, Size: 7
        at java.util.ArrayList.rangeCheck(ArrayList.java:635)
        at java.util.ArrayList.get(ArrayList.java:411)
        at relex.ParsedSentence.getWordAsNode(ParsedSentence.java:167)
        at relex.parser.LocalLGParser.addLinkageStructure(LocalLGParser.java:322)
        at relex.parser.LocalLGParser.parse(LocalLGParser.java:244)
        at relex.RelationExtractor.parseSentence(RelationExtractor.java:308)
        at relex.RelationExtractor.processSentence(RelationExtractor.java:268)
        at relex.ServerSession.handle_session(ServerSession.java:164)
        at relex.Server.run(Server.java:203)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
RelEx processing: 15 milliseconds (avg=15 millisecs, cnt=1)
Error: hndlr=1 Failed to parse: null
java.lang.NullPointerException
        at relex.ServerSession.handle_session(ServerSession.java:165)
        at relex.Server.run(Server.java:203)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Info: hndlr=1 Closed input socket
Loop count=2 Restart count=0
Info: Waiting for socket connection
Info: Enter thread with handler 2
Info: hndlr=2 recv input: small cats are cute
Info: hndlr=2 sentence: small cats are cute
Error: Failed to process sentence: small cats are cute
java.lang.IndexOutOfBoundsException: Index: 5, Size: 5
        at java.util.ArrayList.rangeCheck(ArrayList.java:635)
        at java.util.ArrayList.get(ArrayList.java:411)
        at relex.ParsedSentence.getWordAsNode(ParsedSentence.java:167)
        at relex.parser.LocalLGParser.addLinkageStructure(LocalLGParser.java:322)
        at relex.parser.LocalLGParser.parse(LocalLGParser.java:244)
        at relex.RelationExtractor.parseSentence(RelationExtractor.java:308)
        at relex.RelationExtractor.processSentence(RelationExtractor.java:268)
        at relex.ServerSession.handle_session(ServerSession.java:164)
        at relex.Server.run(Server.java:203)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
RelEx processing: 5 milliseconds (avg=5 millisecs, cnt=1)
Error: hndlr=2 Failed to parse: null
java.lang.NullPointerException
        at relex.ServerSession.handle_session(ServerSession.java:165)
        at relex.Server.run(Server.java:203)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Info: hndlr=2 Closed input socket
@leungmanhin
Copy link
Contributor

The relex server crashes when parsing a sentence, looks like it's related to this: opencog/relex@2c18f5a

@eddiemonroe
Copy link
Contributor Author

eddiemonroe commented May 4, 2017

Thanks @leungmanhin, I filed an issue in the relex repo. opencog/relex#256

(reverting to previous commit in relex resolves the issue)

@leungmanhin
Copy link
Contributor

I think this is fixed by opencog/relex@301695c

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

No branches or pull requests

2 participants