jirb_swing crashes in interface.rb
----------------------------------
Key: JRUBY-1545
URL: http://jira.codehaus.org/browse/JRUBY-1545
Project: JRuby
Issue Type: Bug
Components: Java Integration
Affects Versions: JRuby 1.1b1
Environment: Windows XP Pro SP2, Sun JDK 1.6.0_03-b05, JRuby 1.1b1
(binary)
Reporter: Henrik Mohr
This can be reproduced:
Command prompt: jirb_swing
Inside jirb I type the following (note the "=> false" from the require 'java'!):
irb(main):001:0> require 'java'
=> false
irb(main):002:0> class MouseL < java::awt::event::MouseListener
irb(main):003:1> def mouseReleased
irb(main):004:2> p "mouse released"
irb(main):005:2> end
irb(main):006:1> def mouseClicked
irb(main):007:2> p "mouse clicked"
irb(main):008:2> end
irb(main):009:1> end
This makes jirb_swing hang completely, and throw the following exception in the
command line:
Exception in thread "main" java.lang.NullPointerException
at org.jruby.RubyModule.to_s(RubyModule.java:1218)
at org.jruby.RubyModuleInvoker$to_s_method_0_0.call(Unknown Source)
at org.jruby.RubyObject.callMethod(RubyObject.java:512)
at
org.jruby.runtime.Dispatcher$DefaultDispatcher.callMethod(Dispatcher.java:15)
at org.jruby.RubyObject.callMethod(RubyObject.java:495)
at org.jruby.RubyObject.callMethod(RubyObject.java:483)
at org.jruby.RubyObject.toString(RubyObject.java:274)
at java.lang.String.valueOf(String.java:2827)
at java.lang.StringBuilder.append(StringBuilder.java:115)
at org.jruby.RubyClass.checkInheritable(RubyClass.java:334)
at org.jruby.evaluator.ASTInterpreter.classNode(ASTInterpreter.java:665)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:212)
at org.jruby.evaluator.ASTInterpreter.rootNode(ASTInterpreter.java:1518)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:357)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.RubyObject.evalWithBinding(RubyObject.java:761)
at org.jruby.RubyKernel.eval(RubyKernel.java:720)
at org.jruby.RubyKernelInvoker$eval_method_1_3.call(Unknown Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:140)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:996)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:140)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at
org.jruby.evaluator.ASTInterpreter.setupArgs(ASTInterpreter.java:2058)
at org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:991)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:140)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at
org.jruby.evaluator.ASTInterpreter.rescueNode(ASTInterpreter.java:1416)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:351)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:260)
at
org.jruby.evaluator.ASTInterpreter.yieldNode(ASTInterpreter.java:1720)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:392)
at
org.jruby.evaluator.ASTInterpreter.ensureNode(ASTInterpreter.java:968)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:248)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:140)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1001)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:260)
at
org.jruby.evaluator.ASTInterpreter.yieldNode(ASTInterpreter.java:1720)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:392)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at
org.jruby.evaluator.ASTInterpreter.rescueNode(ASTInterpreter.java:1416)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:351)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:260)
at org.jruby.runtime.Block.yield(Block.java:225)
at org.jruby.RubyKernel.loop(RubyKernel.java:889)
at org.jruby.RubyKernelInvoker$loop_method_0_0.call(Unknown Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1001)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:260)
at org.jruby.runtime.Block.yield(Block.java:225)
at org.jruby.RubyKernel.rbCatch(RubyKernel.java:748)
at org.jruby.RubyKernelInvoker$rbCatch_method_1_0.call(Unknown Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1001)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:566)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.runtime.Block.yield(Block.java:260)
at org.jruby.runtime.Block.yield(Block.java:225)
at org.jruby.RubyKernel.rbCatch(RubyKernel.java:748)
at org.jruby.RubyKernelInvoker$rbCatch_method_1_0.call(Unknown Source)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1001)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:254)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:561)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:208)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:535)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:202)
at org.jruby.evaluator.ASTInterpreter.rootNode(ASTInterpreter.java:1518)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:357)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:165)
at org.jruby.Ruby.runInterpreter(Ruby.java:579)
at org.jruby.Ruby.runNormally(Ruby.java:487)
at org.jruby.Ruby.runFromMain(Ruby.java:409)
at org.jruby.Main.runInterpreter(Main.java:229)
at org.jruby.Main.runInterpreter(Main.java:185)
at org.jruby.Main.run(Main.java:117)
at org.jruby.Main.main(Main.java:92)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email