You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using GraalVM rc10 with fastR to make our R-functions executable from our Scala codebase. I have made some nice progress, but I’m now stuck on what appears to be an internal issue with how graal/fastr handles R vectors.
I am trying to render a pdf using the R package pdftools, but when passing the function pdf_render_page a raw vector (as it demands) I get the stack trace printed below, saying it dies in the underlying poppler_render_page call. Apparently, somewhere internally, the raw vector gets converted to an RDoubleVector, which cannot be cast to an RAbstractIntVector (makes sense).
The same raw vector works fine when passed to pdf_info (which is from the same pdftools package).
The original data is an Array of Integers handed over from Scala code, using GraalVM, so there is nothing in the data that precludes making it an IntVector. I also explicitly convert it to raw using as.raw().
Not sure if this is relevant, but I am on MacOS and have poppler 0.72.0 installed using brew (required for the pdftools package)
Thanks in advance!
Stacktrace
at com.oracle.truffle.r.nodes.function.FunctionDefinitionNode.execute(FunctionDefinitionNode.java:325)
at <R>.poppler_render_page(Unknown)
at <R>.pdf_render_page(unknown.r:1)
at <R>.[my application]
The text was updated successfully, but these errors were encountered:
thank you for the report. I could reproduce ClassCastException involving double vector to int vector conversion using this snippet:
pdf_render_page("doc/NEWS.pdf")
the stack trace is
Caused by: java.lang.ClassCastException: com.oracle.truffle.r.runtime.data.RDoubleVector cannot be cast to com.oracle.truffle.r.runtime.data.model.RAbstractIntVector
at com.oracle.truffle.r.runtime.data.RVector.setAttr(RVector.java:209)
at com.oracle.truffle.r.ffi.impl.common.JavaUpCallsRFFIImpl.Rf_setAttrib(JavaUpCallsRFFIImpl.java:347)
at com.oracle.truffle.r.ffi.impl.upcalls.Rf_setAttribCall$Rf_setAttribCallFactory$1.execute(Rf_setAttribCall.java:61)
at com.oracle.truffle.api.impl.DefaultCallTarget.callDirectOrIndirect(DefaultCallTarget.java:81)
at com.oracle.truffle.api.impl.DefaultDirectCallNode.call(DefaultDirectCallNode.java:59)
...
Hello!
I am using GraalVM rc10 with fastR to make our R-functions executable from our Scala codebase. I have made some nice progress, but I’m now stuck on what appears to be an internal issue with how graal/fastr handles R vectors.
I am trying to render a pdf using the R package
pdftools
, but when passing the functionpdf_render_page
a raw vector (as it demands) I get the stack trace printed below, saying it dies in the underlyingpoppler_render_page
call. Apparently, somewhere internally, the raw vector gets converted to anRDoubleVector
, which cannot be cast to anRAbstractIntVector
(makes sense).The same raw vector works fine when passed to
pdf_info
(which is from the samepdftools
package).The original data is an Array of Integers handed over from Scala code, using GraalVM, so there is nothing in the data that precludes making it an IntVector. I also explicitly convert it to raw using
as.raw()
.Not sure if this is relevant, but I am on MacOS and have poppler 0.72.0 installed using brew (required for the pdftools package)
Thanks in advance!
Stacktrace
The text was updated successfully, but these errors were encountered: