You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Alexandre Patry (JIRA)" <de...@uima.apache.org> on 2013/08/23 17:23:53 UTC

[jira] [Updated] (UIMA-3212) NPE when using SHIFT on parent types in low memory profile

     [ https://issues.apache.org/jira/browse/UIMA-3212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexandre Patry updated UIMA-3212:
----------------------------------

    Attachment: npe-shift-low-memory-profile.patch

Here is a patch solving this problem and adding a unit test.
                
> NPE when using SHIFT on parent types in low memory profile
> ----------------------------------------------------------
>
>                 Key: UIMA-3212
>                 URL: https://issues.apache.org/jira/browse/UIMA-3212
>             Project: UIMA
>          Issue Type: Bug
>          Components: ruta
>            Reporter: Alexandre Patry
>         Attachments: npe-shift-low-memory-profile.patch
>
>
> There is a NullPointerException when using the following script with low memory profile :
> {code}
> PACKAGE org.apache.uima;
> W{->SHIFT(W, 1, 1)};
> {code}
> Stacktrace :
> {noformat}
> org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing failed.    
> 	at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:283)
> 	at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
> 	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:378)
> 	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:298)
> 	at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)
> 	at org.apache.uima.ruta.RutaTestUtils.process(RutaTestUtils.java:187)
> 	at org.apache.uima.ruta.RutaTestUtils.process(RutaTestUtils.java:81)
> 	at org.apache.uima.ruta.ShiftWithLowMemoryProfileTest.testWithLowMemory(ShiftWithLowMemoryProfileTest.java:36)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
> 	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> 	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
> 	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> Caused by: java.lang.NullPointerException
> 	at java.util.HashSet.<init>(HashSet.java:116)
> 	at org.apache.uima.ruta.type.RutaBasic.getEndAnchors(RutaBasic.java:126)
> 	at org.apache.uima.ruta.action.ShiftAction.execute(ShiftAction.java:60)
> 	at org.apache.uima.ruta.rule.AbstractRuleElement.apply(AbstractRuleElement.java:139)
> 	at org.apache.uima.ruta.rule.RuleElementCaretaker.applyRuleElements(RuleElementCaretaker.java:113)
> 	at org.apache.uima.ruta.rule.ComposedRuleElement.applyRuleElements(ComposedRuleElement.java:537)
> 	at org.apache.uima.ruta.rule.AbstractRuleElement.doneMatching(AbstractRuleElement.java:85)
> 	at org.apache.uima.ruta.rule.ComposedRuleElement.fallback(ComposedRuleElement.java:459)
> 	at org.apache.uima.ruta.rule.ComposedRuleElement.fallbackContinue(ComposedRuleElement.java:377)
> 	at org.apache.uima.ruta.rule.RutaRuleElement.startMatch(RutaRuleElement.java:95)
> 	at org.apache.uima.ruta.rule.ComposedRuleElement.startMatch(ComposedRuleElement.java:73)
> 	at org.apache.uima.ruta.rule.RutaRule.apply(RutaRule.java:47)
> 	at org.apache.uima.ruta.rule.RutaRule.apply(RutaRule.java:40)
> 	at org.apache.uima.ruta.rule.RutaRule.apply(RutaRule.java:29)
> 	at org.apache.uima.ruta.RutaScriptBlock.apply(RutaScriptBlock.java:63)
> 	at org.apache.uima.ruta.RutaModule.apply(RutaModule.java:48)
> 	at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:281)
> 	... 34 more
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira