CallbackOnCollectedDelegate was detected erorr

Dec 17, 2012 at 5:46 PM
Edited Dec 17, 2012 at 5:48 PM

I have created some VB code that imports a dataframe into a datagridview, allows the users to edit the datagridview, save the changes back to the dataframe in R, and then write out an outfile of the dataframe using write.csv.  Everything seems to work perfectly, except for my last Sub that writes out the outfile.  I continue to receive the following error and can't seem to determine what's causing it:

A callback was made on a garbage collected delegate of type 'R.NET!RDotNet.Internals.blah3::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called.

Here is the sub that fails -- I've modified it to make it simple and it still generate this error message.  Any ideas what might be happening here?


Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        engine.EagerEvaluate("write.csv(mylist1, ""c:/foo.txt"")")
    End Sub



I'm using the latest version of RdotNet and R x 64 2.15.2.


Dec 17, 2012 at 5:55 PM
Edited Dec 18, 2012 at 4:05 PM

In my previous post, I think I was actually using RdotNet 1.4.  I downloaded RdotNet 1.5, but now this version doesn't seem to recognize EagerEvaluate -- only Eager.  Does anyone know why this is or how to resolve this?  I apologize if these are basic questions, I'm new to programming in RDotNot and can't seem to figure out what I'm doing wrong.

I was able to download version 1.4.1 of the 64 bit source code and get this working.  Is there a 64-bit version of RdotNet 1.5?