This project is read-only.
1
Vote

REngine.GetInstance() method goes in infinite loop when clicked on button second time.

description

I am using R.Net with my web application. I have hosted site in IIS 7 and written below simple code on click event of a button
protected void btnGetData_Click(object sender, EventArgs e)
{
    //Get instance of REngine
    REngine.SetEnvironmentVariables();
    REngine engine = REngine.GetInstance();
    //engine.Dispose();
}
My problem is, above code works fine for first time, but when I again click on the button, then the line engine = REngine.GetInstance(); goes into infinite loop.
I have also tried using engine.Dispose() method, but then it gives below error.

The single REngine instance has already been disposed of (i.e. shut down). Multiple engine restart is not possible.

Can any body please help me out?.

comments