[jboss-jira] [JBoss JIRA] (JBRULES-3537) JIT crash when throwing RuntimeException

Mario Fusco (JIRA) jira-events at lists.jboss.org
Fri Jul 6 07:57:12 EDT 2012


    [ https://issues.jboss.org/browse/JBRULES-3537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704782#comment-12704782 ] 

Mario Fusco commented on JBRULES-3537:
--------------------------------------

How can I reproduce this issue? Can you please attach to the ticket the rule causing this problem or even better a failing test case?
                
> JIT crash when throwing RuntimeException
> ----------------------------------------
>
>                 Key: JBRULES-3537
>                 URL: https://issues.jboss.org/browse/JBRULES-3537
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core
>    Affects Versions: 5.4.0.Final
>         Environment: linux
> java version "1.7.0_04-icedtea"
> OpenJDK Runtime Environment (IcedTea7 2.2) (ArchLinux build 7.u4_2.2-1-x86_64)
> OpenJDK 64-Bit Server VM (build 23.0-b21, mixed mode)
>            Reporter: Willem van Asperen
>            Assignee: Mario Fusco
>
> There is probably something wrong with my rules. But I get a funny error (see trace below).
> This seems to be because the ConditionAnalyzer wants to throw a RuntimeException (line 229):
> if (accessor == null) {
>             throw new RuntimeException("Null accessor on node: " + node);
> }
> Then the toString of ASTNode node crashes with a NullPointerException at line 427:
> public String toString() {
>     return isOperator() ? "<<" + DebugTools.getOperatorName(getOperator()) + ">>" :
>         (PCTX_STORED & fields) != 0 ? nameCache : new String(expr, start, offset);
> }
> This is because the variable expr is null.
> Exception in thread "Thread-1" java.lang.NullPointerException
> 	at java.lang.String.<init>(String.java:229)
> 	at org.mvel2.ast.ASTNode.toString(ASTNode.java:426)
> 	at java.lang.String.valueOf(String.java:2902)
> 	at java.lang.StringBuilder.append(StringBuilder.java:128)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeNode(ConditionAnalyzer.java:229)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeSingleCondition(ConditionAnalyzer.java:126)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:102)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCombinedCondition(ConditionAnalyzer.java:133)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:94)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCombinedCondition(ConditionAnalyzer.java:133)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:94)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCombinedCondition(ConditionAnalyzer.java:133)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:94)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCombinedCondition(ConditionAnalyzer.java:133)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:94)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCombinedCondition(ConditionAnalyzer.java:133)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:94)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCombinedCondition(ConditionAnalyzer.java:133)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:94)
> 	at org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:73)
> 	at org.drools.rule.constraint.MvelConditionEvaluator.getAnalyzedCondition(MvelConditionEvaluator.java:83)
> 	at org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:214)
> 	at org.drools.rule.constraint.MvelConstraint.access$000(MvelConstraint.java:41)
> 	at org.drools.rule.constraint.MvelConstraint$1.run(MvelConstraint.java:201)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> 	at java.lang.Thread.run(Thread.java:722)

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

        


More information about the jboss-jira mailing list