jruby seg fault when running win32ole methods on a process that has disappeared
-------------------------------------------------------------------------------

                 Key: JRUBY-5422
                 URL: http://jira.codehaus.org/browse/JRUBY-5422
             Project: JRuby
          Issue Type: Bug
          Components: win32ole, Windows
         Environment: jruby 1.6.0.RC1 (ruby 1.8.7 patchlevel 330) (2011-01-24 
406556b) (Java HotSpot(TM) Client VM 1.6.0_18) [Windows 7-x86-java]
            Reporter: Roger Pack
            Assignee: Thomas E Enebo


Currently, if you start up a process, for example jruby.exe -e sleep in one 
window

Then you run this in another window:

require 'rubygems'
require 'ruby-wmi'
piddy = WMI::Win32_Process.find(:first,  :conditions => {'Name' => 
'jruby.exe'}) }
p piddy
700.times {sleep 1; piddy.SetPriority 64; print '.' }

(it starts) then kill the first process, jruby responds with:

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x76fd2be9, pid=3144, tid=3756
#
# JRE version: 6.0_18-b07
# Java VM: Java HotSpot(TM) Client VM (16.0-b13 mixed mode, sharing windows-x86 
)
# Problematic frame:
# C  [ntdll.dll+0x52be9]
#
# An error report file with more information is saved as:
# C:\dev\ruby\sensible-cinema\hs_err_pid3144.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

MRI (1.8.6, 1.9.2 mingw) yield:

jruby_bug.rb:7:in `method_missing': (in OLE method `SetPriority': ) 
(WIN32OLERuntimeError)
    OLE error code:80041002 in SWbemObjectEx
      Not found
    HRESULT error code:0x80020009
      Exception occurred.
        from jruby_bug.rb:7:in `block in <main>'
        from jruby_bug.rb:7:in `times'
        from jruby_bug.rb:7:in `<main>'

Thanks!
-r

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