In mono, if a thread from the thread pool uses the REngine, several errors about a limited stack size appear. This is described in section 8.1.5 of http://cran.r-project.org/doc/manuals/R-exts.pdf
One option is to disable the thread checking as described there, or check the stack size in .NET
Comments: As of revision 237, branch 'jperraud', I do the following for unix platforms, by mimicking at what other programs embedding R are doing. Should the setting of R_CStackLimit be done for all platforms including Windows? Is there a reproducible unit test to check this has an effect indeed? ```C# switch (NativeUtility.GetPlatform ()) { case PlatformID.MacOSX: case PlatformID.Unix: SetDangerousInt32 ("R_SignalHandlers", 0); // RInside does that for non WIN32 SetDangerousInt32 ("R_CStackLimit", -1); // Don't do any stack checking, see R Exts, '8.1.5 Threading issues' break; } ```
One option is to disable the thread checking as described there, or check the stack size in .NET
Comments: As of revision 237, branch 'jperraud', I do the following for unix platforms, by mimicking at what other programs embedding R are doing. Should the setting of R_CStackLimit be done for all platforms including Windows? Is there a reproducible unit test to check this has an effect indeed? ```C# switch (NativeUtility.GetPlatform ()) { case PlatformID.MacOSX: case PlatformID.Unix: SetDangerousInt32 ("R_SignalHandlers", 0); // RInside does that for non WIN32 SetDangerousInt32 ("R_CStackLimit", -1); // Don't do any stack checking, see R Exts, '8.1.5 Threading issues' break; } ```