You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Peter Klügl (Created JIRA)" <de...@uima.apache.org> on 2012/01/19 13:19:39 UTC

[jira] [Created] (UIMA-2347) StackOverflowError by greedy TextMarker rule elements

StackOverflowError by greedy TextMarker rule elements
-----------------------------------------------------

                 Key: UIMA-2347
                 URL: https://issues.apache.org/jira/browse/UIMA-2347
             Project: UIMA
          Issue Type: Bug
          Components: TextMarker
            Reporter: Peter Klügl
            Assignee: Peter Klügl


The new implementation of the TextMarker rule inference is now based on recursion. Greedy rule elements continue their match on additional annotations therefore with a call of continueMatch(). This causes a quite big call stack for rules like ANY+ on large documents. Investigate the error. Maybe introduce a new method continueOwnMatch that is based on a loop.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (UIMA-2347) StackOverflowError by greedy TextMarker rule elements

Posted by "Marshall Schor (Commented) (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189143#comment-13189143 ] 

Marshall Schor commented on UIMA-2347:
--------------------------------------

You might already be thinking this, but just in case: if possible, it would be better to "hide" these kinds of details from APIs that users use - making the underlying implementation "just work"..
                
> StackOverflowError by greedy TextMarker rule elements
> -----------------------------------------------------
>
>                 Key: UIMA-2347
>                 URL: https://issues.apache.org/jira/browse/UIMA-2347
>             Project: UIMA
>          Issue Type: Bug
>          Components: TextMarker
>            Reporter: Peter Klügl
>            Assignee: Peter Klügl
>
> The new implementation of the TextMarker rule inference is now based on recursion. Greedy rule elements continue their match on additional annotations therefore with a call of continueMatch(). This causes a quite big call stack for rules like ANY+ on large documents. Investigate the error. Maybe introduce a new method continueOwnMatch that is based on a loop.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Closed] (UIMA-2347) StackOverflowError by greedy TextMarker rule elements

Posted by "Peter Klügl (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Klügl closed UIMA-2347.
-----------------------------

    Resolution: Fixed

fixed
                
> StackOverflowError by greedy TextMarker rule elements
> -----------------------------------------------------
>
>                 Key: UIMA-2347
>                 URL: https://issues.apache.org/jira/browse/UIMA-2347
>             Project: UIMA
>          Issue Type: Bug
>          Components: TextMarker
>            Reporter: Peter Klügl
>            Assignee: Peter Klügl
>
> The new implementation of the TextMarker rule inference is now based on recursion. Greedy rule elements continue their match on additional annotations therefore with a call of continueMatch(). This causes a quite big call stack for rules like ANY+ on large documents. Investigate the error. Maybe introduce a new method continueOwnMatch that is based on a loop.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (UIMA-2347) StackOverflowError by greedy TextMarker rule elements

Posted by "Peter Klügl (Commented JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189165#comment-13189165 ] 

Peter Klügl commented on UIMA-2347:
-----------------------------------

Yes, I agree and I think nobody that uses TextMarker should have to know about its actual implementation. The information above is just a documentation for me (or any other programmer) that there is a quite specific implementation problem.

I always naively thought that StackOverflows only happen in recursions if the arguments of the method do not change... I was so wrong.
                
> StackOverflowError by greedy TextMarker rule elements
> -----------------------------------------------------
>
>                 Key: UIMA-2347
>                 URL: https://issues.apache.org/jira/browse/UIMA-2347
>             Project: UIMA
>          Issue Type: Bug
>          Components: TextMarker
>            Reporter: Peter Klügl
>            Assignee: Peter Klügl
>
> The new implementation of the TextMarker rule inference is now based on recursion. Greedy rule elements continue their match on additional annotations therefore with a call of continueMatch(). This causes a quite big call stack for rules like ANY+ on large documents. Investigate the error. Maybe introduce a new method continueOwnMatch that is based on a loop.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (UIMA-2347) StackOverflowError by greedy TextMarker rule elements

Posted by "Peter Klügl (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431946#comment-13431946 ] 

Peter Klügl commented on UIMA-2347:
-----------------------------------

I fixed this problem now also for composed rule elements like (ANY ANY)+. However, there is a problem with additional matching alternatives during the greedy match, which cannot be performed correctly. Therefore, I introduce a new parameter "simpleGreedyForComposed" for the analysis engine. The default value is false: inference behaves as before with the possibility of an StackOverflow caused by "silly" rules. When set to true, no StackOverflow could be observed, but there is the rare possibility to miss some rule match completely. In 99.9% of the use cases, the user does not have to change anything right now.
                
> StackOverflowError by greedy TextMarker rule elements
> -----------------------------------------------------
>
>                 Key: UIMA-2347
>                 URL: https://issues.apache.org/jira/browse/UIMA-2347
>             Project: UIMA
>          Issue Type: Bug
>          Components: TextMarker
>            Reporter: Peter Klügl
>            Assignee: Peter Klügl
>
> The new implementation of the TextMarker rule inference is now based on recursion. Greedy rule elements continue their match on additional annotations therefore with a call of continueMatch(). This causes a quite big call stack for rules like ANY+ on large documents. Investigate the error. Maybe introduce a new method continueOwnMatch that is based on a loop.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira