History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-1289
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Charles Oliver Nutter
Reporter: Robert Egglestone
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
JRuby

JRuby fails if assertions are enabled

Created: 25/Aug/07 01:05 AM   Updated: 22/Dec/07 06:28 AM
Component/s: Core Classes/Modules
Affects Version/s: None
Fix Version/s: JRuby 1.1b1, JRuby 1.0.2

Time Tracking:
Not Specified


 Description  « Hide
JRuby 1.0.1 fails to start if assertions are enabled.
It looks like the assertion of line 109 of DynamicScope throws a NPE for variableValues.

It may be best to enable assertions while the tests are run from the build file.

>java -enableassertions -jar jruby-complete-1.0.1.jar --command irb
DynamicScope.java:109:in `org.jruby.runtime.DynamicScope.setValue': java.lang.NullPointerException: null (NativeException)
from AssignmentVisitor.java:186:in `org.jruby.evaluator.AssignmentVisitor.localAsgnNode'
from AssignmentVisitor.java:88:in `org.jruby.evaluator.AssignmentVisitor.assign'
from Block.java:283:in `org.jruby.runtime.Block.setupBlockArg'
from Block.java:213:in `org.jruby.runtime.Block.yield'
from Block.java:186:in `org.jruby.runtime.Block.yield'
from RubyArray.java:1283:in `org.jruby.RubyArray.each'
from null:-1:in `org.jruby.RubyArrayInvokereach0.call'
from InvocationCallback.java:49:in `org.jruby.runtime.callback.InvocationCallback.execute'
... 72 levels...
from file:/Users/regg002/.m2/repository/org/jruby/jruby-complete/1.0.1/jruby-complete-1.0.1.jar!/jruby/commands.rb:29:in `require'
from file:/Users/regg002/.m2/repository/org/jruby/jruby-complete/1.0.1/jruby-complete-1.0.1.jar!/jruby/commands.rb:29:in `jirb'
from :1
Complete Java stackTrace
java.lang.NullPointerException
at org.jruby.runtime.DynamicScope.setValue(DynamicScope.java:109)
at org.jruby.evaluator.AssignmentVisitor.localAsgnNode(AssignmentVisitor.java:186)
at org.jruby.evaluator.AssignmentVisitor.assign(AssignmentVisitor.java:88)
at org.jruby.runtime.Block.setupBlockArg(Block.java:283)
at org.jruby.runtime.Block.yield(Block.java:213)
at org.jruby.runtime.Block.yield(Block.java:186)
at org.jruby.RubyArray.each(RubyArray.java:1283)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Charles Oliver Nutter - 13/Sep/07 05:24 PM
This was fixed in both trunk and 1.0 branches and we have turned on -ea as part of all the test runs to prevent it happening in the future.