This project is read-only.

StackOverflowException unhandled

Feb 1, 2013 at 1:14 AM

I have a program that uses R.NET (wonderful library BTW), that I've been working on for a while. Recently, the program started having problems connecting to my SQLite database. I have not made any changes to this section for a long time, but now when pass the string "m <- dbDriver('SQLite', max.con=25)" through R.NET a StackOverflow Exception occurs in DirectNativeMethods.generated.cs within:
public System.IntPtr R_tryEval(System.IntPtr statement, System.IntPtr environment, out bool errorOccurred) 
    return DirectNativeMethods._R_tryEval(  statement,   environment, out   errorOccurred);
The exception does not give me much information other than:
An unhandled exception of type 'System.StackOverflowException' occurred in R.NET.dll.

Interestingly enough, when I run this statement through a simple console app, it works just fine, I can connect to the SQLite database and manipulate the tables.

I know this is tough especially when I can't repeat the error with a simple test console app, but hoping someone might have some ideas to test or fix this?

Feb 10, 2013 at 10:27 PM

The stack trace of the exception (possibly of the InnerException property of the System.StackOverflowException would be helpful to diagnose the problem.

Apr 3, 2013 at 12:29 AM
I wish I could get a hold of the InnerException property. I have tried surrounding my code with try { ... } catch (StackOverflowException) to get inner exception property, but the exception is thrown in the code. I tried surrounding that code with try catch, but I don't have access to the StackOverflowException there.

Any suggestions? Thank you!