You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Matthew Campbell (JIRA)" <ui...@incubator.apache.org> on 2007/07/30 16:04:53 UTC

[jira] Created: (UIMA-519) Infinite Loop in AnnotationIndexImpl tree()

Infinite Loop in AnnotationIndexImpl tree()
-------------------------------------------

                 Key: UIMA-519
                 URL: https://issues.apache.org/jira/browse/UIMA-519
             Project: UIMA
          Issue Type: Bug
          Components: Core Java Framework
    Affects Versions: 2.1
         Environment: Windows XP Professional, Java 1.6.0_01-b06, Building and running in Eclipse 3.3 with Java 5.0 compliance.
            Reporter: Matthew Campbell


There seems to be an infinite loop within the AnnotationIndexImpl addChildren() method, called by the tree() method.  The subiterator that is passed in doesn't seem to be pushed to the next value, and so it just sits and loops forever.  I changed the loop to the code below and it seems to solve the problem.

while (it.hasNext()) {
    annot = (AnnotationFS) it.next();
    dtr = new AnnotationTreeNodeImpl();
    dtr.set(annot);
    node.addChild(dtr);
    addChildren(dtr, subiterator(annot));
}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (UIMA-519) Infinite Loop in AnnotationIndexImpl tree()

Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thilo Goetz updated UIMA-519:
-----------------------------

    Fix Version/s: 2.2

> Infinite Loop in AnnotationIndexImpl tree()
> -------------------------------------------
>
>                 Key: UIMA-519
>                 URL: https://issues.apache.org/jira/browse/UIMA-519
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.1
>         Environment: Windows XP Professional, Java 1.6.0_01-b06, Building and running in Eclipse 3.3 with Java 5.0 compliance.
>            Reporter: Matthew Campbell
>            Assignee: Thilo Goetz
>             Fix For: 2.2
>
>
> There seems to be an infinite loop within the AnnotationIndexImpl addChildren() method, called by the tree() method.  The subiterator that is passed in doesn't seem to be pushed to the next value, and so it just sits and loops forever.  I changed the loop to the code below and it seems to solve the problem.
> while (it.hasNext()) {
>     annot = (AnnotationFS) it.next();
>     dtr = new AnnotationTreeNodeImpl();
>     dtr.set(annot);
>     node.addChild(dtr);
>     addChildren(dtr, subiterator(annot));
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (UIMA-519) Infinite Loop in AnnotationIndexImpl tree()

Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thilo Goetz closed UIMA-519.
----------------------------

    Resolution: Fixed

Fixed this as well as a couple of other issues.  Looks like the implementation was never quite completed.  Added test case.

Thanks for reporting this issue.


> Infinite Loop in AnnotationIndexImpl tree()
> -------------------------------------------
>
>                 Key: UIMA-519
>                 URL: https://issues.apache.org/jira/browse/UIMA-519
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.1
>         Environment: Windows XP Professional, Java 1.6.0_01-b06, Building and running in Eclipse 3.3 with Java 5.0 compliance.
>            Reporter: Matthew Campbell
>            Assignee: Thilo Goetz
>             Fix For: 2.2
>
>
> There seems to be an infinite loop within the AnnotationIndexImpl addChildren() method, called by the tree() method.  The subiterator that is passed in doesn't seem to be pushed to the next value, and so it just sits and loops forever.  I changed the loop to the code below and it seems to solve the problem.
> while (it.hasNext()) {
>     annot = (AnnotationFS) it.next();
>     dtr = new AnnotationTreeNodeImpl();
>     dtr.set(annot);
>     node.addChild(dtr);
>     addChildren(dtr, subiterator(annot));
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (UIMA-519) Infinite Loop in AnnotationIndexImpl tree()

Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thilo Goetz reassigned UIMA-519:
--------------------------------

    Assignee: Thilo Goetz

> Infinite Loop in AnnotationIndexImpl tree()
> -------------------------------------------
>
>                 Key: UIMA-519
>                 URL: https://issues.apache.org/jira/browse/UIMA-519
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.1
>         Environment: Windows XP Professional, Java 1.6.0_01-b06, Building and running in Eclipse 3.3 with Java 5.0 compliance.
>            Reporter: Matthew Campbell
>            Assignee: Thilo Goetz
>             Fix For: 2.2
>
>
> There seems to be an infinite loop within the AnnotationIndexImpl addChildren() method, called by the tree() method.  The subiterator that is passed in doesn't seem to be pushed to the next value, and so it just sits and loops forever.  I changed the loop to the code below and it seems to solve the problem.
> while (it.hasNext()) {
>     annot = (AnnotationFS) it.next();
>     dtr = new AnnotationTreeNodeImpl();
>     dtr.set(annot);
>     node.addChild(dtr);
>     addChildren(dtr, subiterator(annot));
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (UIMA-519) Infinite Loop in AnnotationIndexImpl tree()

Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516417 ] 

Marshall Schor commented on UIMA-519:
-------------------------------------

This does look like a simple bug: an iterater in a loop not incrementing the iterator - so it goes on forever...

The fix suggested seems OK; it uses the plain iterator idioms.

The hard thing about fixing this is the test case that needs to be written.  I think there are no tests covering AnnotationTree at the moment.  

> Infinite Loop in AnnotationIndexImpl tree()
> -------------------------------------------
>
>                 Key: UIMA-519
>                 URL: https://issues.apache.org/jira/browse/UIMA-519
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.1
>         Environment: Windows XP Professional, Java 1.6.0_01-b06, Building and running in Eclipse 3.3 with Java 5.0 compliance.
>            Reporter: Matthew Campbell
>
> There seems to be an infinite loop within the AnnotationIndexImpl addChildren() method, called by the tree() method.  The subiterator that is passed in doesn't seem to be pushed to the next value, and so it just sits and loops forever.  I changed the loop to the code below and it seems to solve the problem.
> while (it.hasNext()) {
>     annot = (AnnotationFS) it.next();
>     dtr = new AnnotationTreeNodeImpl();
>     dtr.set(annot);
>     node.addChild(dtr);
>     addChildren(dtr, subiterator(annot));
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.