From: Caleb Clausen Date: 2010-04-10T02:18:58+09:00 Subject: Re: ruby and networking crashes app on windows On 4/8/10, mortee wrote: >> Make sure to run your ruby code in only one thread at a time and only >> from the "main" thread (?) > > Well, I'm making sure to call it from a single thread, but I can't force > to do it from the main one. I'm writing an extension for a 3rd party > app, which calls my code from whatever thread it wants to, and it's > definitely not the main one. Calling out to the ruby interpreter from a program whose source you don't control and not from the program's main thread... definitely sounds dangerous. Now that redmine is back, I went and found the bug I mentioned before, but upon reading, that problems seems to have been with invoking ruby from the main thread only. So, it may not help you, directly, but maybe these bug reports will stimulate some ideas: http://redmine.ruby-lang.org/issues/show/2258 http://redmine.ruby-lang.org/issues/show/2294 > I'd be glad to, but as I've said already, I have no logs (at least not > at this level), and no terminal output from the app involved. All I get > is a dialog window from the MS Visual Runtime telling me about the > crash, without any usable details. You need to get some visibility into this problem. Maybe you can run the program within a debugger, and extract a stack dump from that when it crashes? > The weird part is that non-network code (even usong multiple ruby > threads) runs without problems.