From: Caleb Clausen Date: 2010-04-09T05:35:13+09:00 Subject: Re: ruby and networking crashes app on windows On 4/5/10, mortee wrote: > What I'm trying is to embed a ruby interpreter into a (multi-threaded) > 3rd party app (using its scripting interface and its ability to load > DLLs through it), and run my ruby code by it. After much trial and > error, I've managed to have it work to the extent that I can call into > my own ruby code without having it crash the app. > > However, anytime I try to access any networking abilities from ruby, it > crashes the host app immediately, with a MS Visual C++ Runtime dialog > telling me that it's requested to terminate the app in an unusual way, > and a sole OK button. There's no logs, standard output, anything. This is just a wild guess, but it's possible that embedding in a multi-threaded program is what gives you grief. Suraj Kurapatni (sp?) was having problems with it a while ago. I don't remember the exact details, but it seems that ruby likes the stack(s) to be where _it_ wants them to be... he eventually came up with some patches to let you at least tell ruby where the stacks actually are, but I don't think they were accepted. I'd point you at the relevant bug report on redmine, but it's seemingly down for repairs right now. :(