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

Relex throws exception running OpenCog chatbot/behavior tree #709

Open
@eddiemonroe

Description

@eddiemonroe

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

Activity

leungmanhin

leungmanhin commented on May 4, 2017

@leungmanhin
Contributor

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

eddiemonroe

eddiemonroe commented on May 4, 2017

@eddiemonroe
ContributorAuthor

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

(reverting to previous commit in relex resolves the issue)

leungmanhin

leungmanhin commented on May 11, 2017

@leungmanhin
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @eddiemonroe@leungmanhin

        Issue actions

          Relex throws exception running OpenCog chatbot/behavior tree · Issue #709 · hansonrobotics/HEAD