Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-2383

NPE when using Phreak related to activation matches

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 6.0.0
    • 6.0.0
    • BRE
    • None

    Description

      Description of problem:
      A problem occurs when switching from Rete to Phreak.
      We get a NPE in the following code:
      // @TODO (mdp) is this really necessary? won't the entire FH and RightTuple chaines just et GC'd?
      unlinkCreatedHandles(leftTuple);

      On line 268 : leftTuple.getObject

      It seems like the 'match' is null at t+1 but it was not at t.

      An extract of our rules is:
      rule A
      when
      ...
      then
      context.delete("D1");
      end

      rule B
      when
      Object(...) from context.get("D1")
      then
      ...
      end

      Unfortunately, we haven't reproduced the bug yet in a unit test.

      Version-Release number of selected component (if applicable):

      How reproducible:

      Steps to Reproduce:
      1.
      2.
      3.

      Actual results:

      Expected results:

      Additional info:
      java.lang.NullPointerException
      at org.drools.core.phreak.PhreakFromNode.unlinkCreatedHandles(PhreakFromNode.java:268)
      at org.drools.core.phreak.PhreakFromNode.doLeftDeletes(PhreakFromNode.java:258)
      at org.drools.core.phreak.PhreakFromNode.doNode(PhreakFromNode.java:41)
      at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:348)
      at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:162)
      at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:117)
      at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:199)
      at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:66)
      at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:927)
      at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1187)
      at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957)
      at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931)
      at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:233)
      at fr.edf.distribution.linky.lsp.DefaultTestWithSession.launchRules(DefaultTestWithSession.java:45)
      at fr.edf.distribution.linky.lsp.TestRulesOnDysf.testRG_MO_02(TestRulesOnDysf.java:53)
      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:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      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)

      Attachments

        Activity

          People

            etirelli@redhat.com Edson Tirelli
            rbourner@redhat.com Richard Bourner (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson
            Tomas David Tomas David
            Tomas David Tomas David
            etirelli, Olivier Mike (Inactive), rbourner2

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty