Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-3212

NPE when using SHIFT on parent types in low memory profile

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1.0ruta
    • Ruta
    • None

    Description

      There is a NullPointerException when using the following script with low memory profile :

      PACKAGE org.apache.uima;
      
      W{->SHIFT(W, 1, 1)};
      

      Stacktrace :

      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
      

      Attachments

        1. npe-shift-low-memory-profile.patch
          8 kB
          Alexandre Patry

        Activity

          People

            pkluegl Peter Klügl
            apatry Alexandre Patry
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: