NPE out of Tempfile.new in some cases
-------------------------------------

                 Key: JRUBY-4624
                 URL: http://jira.codehaus.org/browse/JRUBY-4624
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.4
            Reporter: Vladimir Sizikov


Execute the following:

{code}
jruby -v -rtempfile -e "100_000.times{Tempfile.new('foo')}"
{code}

And then press Control-C.

You'll get:

{noformat}
jruby 1.5.0.dev (ruby 1.8.7 patchlevel 174) (2010-03-05 f25167a) (Java 
HotSpot(TM) Client VM 1.6.0_18) [x86-java]
DeleteOnExitHook.java:34:in `add': java.lang.NullPointerException
        from File.java:939:in `deleteOnExit'
        from RubyTempfile.java:118:in `initialize'
        from 
org/jruby/RubyTempfile$i_method_0_1$RUBYFRAMEDINVOKER$initialize.gen:-1:in 
`call'
        from CachingCallSite.java:75:in `callBlock'
        from CachingCallSite.java:82:in `call'
        from RubyClass.java:726:in `newInstance'
        from RubyIO.java:865:in `newInstance'
        from 
org/jruby/RubyIO$s_method_0_0$RUBYFRAMEDINVOKER$newInstance.gen:-1:in `call'
        from DynamicMethod.java:190:in `call'
        from DynamicMethod.java:186:in `call'
        from CachingCallSite.java:146:in `call'
        from -e:1:in `block_0$RUBY$__block__'
        from null:-1:in `call'
        from CompiledBlock.java:115:in `yield'
        from CompiledBlock.java:98:in `yield'
        from Block.java:194:in `yield'
        from RubyFixnum.java:261:in `times'
        from RubyInteger.java:230:in `times19'
        from 
org/jruby/RubyInteger$i_method_0_0$RUBYFRAMEDINVOKER$times19.gen:-1:in `call'
        from CachingCallSite.java:299:in `cacheAndCall'
        from CachingCallSite.java:117:in `callBlock'
        from CachingCallSite.java:132:in `callIter'
        from -e:1:in `__file__'
        from -e:-1:in `load'
        from Ruby.java:667:in `runScript'
        from Ruby.java:572:in `runNormally'
        from Ruby.java:418:in `runFromMain'
        from Main.java:275:in `run'
        from Main.java:117:in `run'
        from Main.java:97:in `main'
{noformat}


-- 
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


Reply via email to