Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

Closed Issue: InvalidOperationException on retrieving a data frame [22]

$
0
0
Sample program attached for repro.
Source code as of 2012-04-27, with local minor and a priori unrelated modifications.

The root cause is in SymbolicExpression.GetAttribute. After a few successful retrieval of data frames, a call to Rf_getAttrib finds that it is RNilPointer.
Context: enable optimisation schemes.

IntPtr attribute = Engine.GetFunction<Rf_getAttrib>("Rf_getAttrib")(handle, symbol.handle);
if (Engine.CheckNil(attribute))
{
return null;
}

> RDotNet.dll!RDotNet.SymbolicExpression.GetAttribute(RDotNet.SymbolicExpression symbol) Line 145 C#
RDotNet.dll!RDotNet.Vector<RDotNet.DynamicVector>.Names.get() Line 116 + 0x12 bytes C#
RDotNet.dll!RDotNet.Vector<RDotNet.DynamicVector>.this[string].get(string name) Line 80 + 0xd bytes C#
[Lightweight Function]
SampleOne.exe!SampleOne.Program.convert(RDotNet.DataFrame dataFrame) Line 52 + 0x4d2 bytes C#
SampleOne.exe!SampleOne.Program.GetDataFrame(string sexpression) Line 45 + 0xa bytes C#
SampleOne.exe!SampleOne.Program.Main(string[] args) Line 38 + 0x12 bytes C#


A few more execution steps then lead to:

System.InvalidOperationException occurred
HResult=-2146233079
Message=Operation is not valid due to the current state of the object.
Source=RDotNet
StackTrace:
at RDotNet.Vector`1.get_Item(String name) in c:\src\R\rdotnet\R.NET\Vector.cs:line 85
InnerException:



Viewing all articles
Browse latest Browse all 1634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>