We discussed this a while back in regards to 1.9.1:
http://groups.google.com/group/rubyinstaller/browse_thread/thread/e5e47aabf09aff98/c328be9e67f9f391?lnk=gst&q=win32ole#c328be9e67f9f391
The verdict at the time was that it didn't affect 1.9.2. If you can
reproduce then definitely file a bug against 1.9.2 for this.
pete
Also, the workaround I found was just to call CoInitialize every time
I created a thread that needed win32ole:
https://gist.github.com/407804
pete
Yes, I saw both those. The problem here is that if three threads (1, 2 & 3) call CoInitialize() in that order, then thread 1 must call CoUnintialize() last of all, after all other COM activity has finished.
The effect for me was an access violation during ole_free, triggered in the GC.
James.
I would ask you to check against ruby trunk codebase. To be able to
test this will require the following:
1) Use Git to checkout ruby:
git clone git://github.com/ruby/ruby.git
That will put the trunk (1.9.3) branch as default. It will take a few
minutes to download (Ruby is big)
2) Checkout rubyinstaller
git clone git://github.com/oneclick/rubyinstaller.git
3) Use rake to buidl Ruby source:
cd rubyinstaller
rake ruby19 LOCAL=C:\Path\To\Cloned\Ruby
4) Test using the sandbox environment:
cd sandbox\ruby19_mingw
set PATH=%CD%\bin;%PATH%
ruby -v
5) Run your script and report back.
Regards,
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
--
Cool, and for the record, I reported this to Ruby-Core long ago:
http://redmine.ruby-lang.org/issues/show/2618
The issue described there seems to work for me with 1.9.2-p0
Please let me know so I can either update the ticket or mark it as close.
Thank you.
No, the Thread.main check (and the Thread block method monkey patch) will only be evaluated at the time of the 1st require.
I suspect this would prevent the use of " load 'win32ole' " though.
Thanks,
James.
Thankyou,
You've pointed out the reason I had no trouble running against 1.8.7 builds (non-native threads).
James.
>