From: "Frédéric COIFFIER" Date: 2005-12-15T17:53:25+09:00 Subject: Problem to embed Ruby in a threaded Application (Mingw) Hello, I have a problem with my application which embeds the Ruby engine. I'll try to summarize the current status of my application : I have a Qt4 Application which runs on Windows (thanks to Mingw). In one thread created by this application, I would like to use the Ruby 1.8.2 engine (to evaluate a script) [only in this thread which is created on the fly]. So, I create a thread which makes the following things : - ruby_init - rb_eval_string(my script) [encapsulated in a rb_protect mechanism] - some rb_funcalls [encapsulated in a rb_protect mechanism] - ruby_finalize And the thread is finished (and destoyed). So, the first time I run my thread, all is perfect. But, the second time, a crash occurs in the rb_eval_string function. So, I suppose something wasn't correctly cleaned by ruby_finalize after the first thread execution... Is there another way to finalize the Ruby engine ? Is something missing ? Thank you Frederic