win32ole cannot call from two different threads -----------------------------------------------
Key: JRUBY-5423 URL: http://jira.codehaus.org/browse/JRUBY-5423 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 again using the rdp-ruby-wmi gem: require 'rubygems' require 'ruby-wmi' Thread.new { p piddy = WMI::Win32_Process.find(:first, :conditions => {'Name' => 'xxx.exe'}) raise } sleep 0.1 WMI::Win32_Process.find(:first, :conditions => {'Name' => 'xxx.exe'}) works in MRI, in jruby: C:\dev\ruby\sensible-cinema>\dev\ruby\downloads\jruby\bin\jruby jruby_bug.rb PROGID: WbemScripting.SWbemLocator Dispatch.java:-2:in `invokev': org.racob.com.ComFailException: Invoke of: ConnectServer Source: SWbemLocator Description: from Dispatch.java:243:in `invokev' from Dispatch.java:187:in `callN' from RubyWIN32OLE.java:203:in `invokeMethodOrGet' from RubyWIN32OLE.java:112:in `method_missing' from org/jruby/ext/win32ole/RubyWIN32OLE$i_method_0_0$RUBYINVOKER$method_missing.gen:65535:in `call' from JavaMethod.java:642:in `call' from RuntimeHelpers.java:493:in `call' from CachingCallSite.java:345:in `callMethodMissing' from CachingCallSite.java:249:in `cacheAndCall' from CachingCallSite.java:71:in `call' from CallManyArgsNode.java:59:in `interpret' from NewlineNode.java:103:in `interpret' from BlockNode.java:71:in `interpret' from ASTInterpreter.java:70:in `INTERPRET_METHOD' from InterpretedMethod.java:141:in `call' from DefaultMethod.java:163:in `call' from CachingCallSite.java:103:in `call' from VCallNode.java:85:in `interpret' from CallOneArgNode.java:57:in `interpret' from LocalAsgnNode.java:123:in `interpret' from NewlineNode.java:103:in `interpret' from BlockNode.java:71:in `interpret' from ASTInterpreter.java:70:in `INTERPRET_METHOD' from InterpretedMethod.java:184:in `call' from DefaultMethod.java:179:in `call' from CachingCallSite.java:137:in `call' from FCallOneArgNode.java:36:in `interpret' from NewlineNode.java:103:in `interpret' from ASTInterpreter.java:70:in `INTERPRET_METHOD' from InterpretedMethod.java:184:in `call' from DefaultMethod.java:179:in `call' from CachingCallSite.java:137:in `call' from FCallOneArgNode.java:36:in `interpret' from CallNoArgNode.java:61:in `interpret' from NewlineNode.java:103:in `interpret' from ASTInterpreter.java:70:in `INTERPRET_METHOD' from InterpretedMethod.java:184:in `call' from DefaultMethod.java:179:in `call' from CachingCallSite.java:137:in `call' from FCallOneArgNode.java:36:in `interpret' from NewlineNode.java:103:in `interpret' from WhenOneArgNode.java:49:in `when' from CaseNode.java:133:in `interpret' from NewlineNode.java:103:in `interpret' from BlockNode.java:71:in `interpret' from ASTInterpreter.java:70:in `INTERPRET_METHOD' from InterpretedMethod.java:227:in `call' from DefaultMethod.java:195:in `call' from CachingCallSite.java:302:in `cacheAndCall' from CachingCallSite.java:173:in `call' from jruby_bug.rb:8:in `__file__' from jruby_bug.rb:-1:in `load' from Ruby.java:667:in `runScript' from Ruby.java:571:in `runNormally' from Ruby.java:420:in `runFromMain' from Main.java:275:in `doRunFromMain' from Main.java:198:in `internalRun' from Main.java:164:in `run' from Main.java:148:in `run' from Main.java:128:in `main' -- 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