Comments (4)
Hello Nathan,
it seems that we've seen this issue before and we believe that this time it is a problem on the side of R package Rcpp
used by pdftools
. The issue was reported here: RcppCore/Rcpp#935. In the meantime as a workaround you can patch Rcpp
sources:
--- a/inst/include/Rcpp/protection/Shelter.h
+++ b/inst/include/Rcpp/protection/Shelter.h
@@ -26,7 +26,7 @@ namespace Rcpp {
Shelter() : nprotected(0){}
inline SEXP operator()(SEXP x){
- nprotected++;
+ if ( x != R_NilValue ) nprotected++;
return Rcpp_protect(x) ;
}
in case you're not that familiar with R ecosystem: you'll have to download the Rcpp
sources (e.g., to ~/Rcpp
), apply the patch and then install the patched Rcpp
via R CMD INSTALL ~/Rcpp
and then re-install pdftools
via install.packages("pdftools")
so that it's built with the new Rcpp
headers.
With the patched version of Rcpp
, the provided example gives me:
[1] 1
[1] 2
[1] 3
[1] 4
[1] 5
[1] 6
[1] 7
[1] 8
[1] 9
[1] 10
[1] 11
<std::runtime_error in poppler_render_page(loadfile(pdf), page, dpi, opw, upw, antialiasing, text_antialiasing): Invalid page.>
[1] "Yah, finished!"
which seems to be the same as GNU-R.
but it is a work around we were trying for other issues in RC11
if you can, please report those issues as well even if you have a workaround. It will be appreciated. (Including how you worked around the issue would be great too).
from fastr.
The "other issues" for which this is a workaround can all be traced back to #49, so we expect them to disappear with the next GraalVM RC.
Thanks for the local fix of the RCCP
-issue. Patching local sources and reinstalling pdftools
does indeed make the problem go away! 👍
from fastr.
FYI, we changed the behavior and FastR is now tolerant to unbalanced protect/unprotect, you only get a warning instead of an error, so if you don't mind that warning, you can use unpatched version of Rcpp.
from fastr.
Good to know!
from fastr.
Related Issues (20)
- fastR slower than GNU R HOT 2
- Error installing quadprog HOT 3
- Runtime error - com.oracle.truffle.r.runtime.RInternalError: com.oracle.truffle.api.dsl.UnsupportedSpecializationException: Unexpected values provided HOT 2
- Any plan for a Darwin aarch64 of FastR ? HOT 1
- Error installing tidyr HOT 2
- Implement the radixsort builtin
- FastR internal error: java.lang.NullPointerException HOT 10
- UnsupportedSpecializationException in polyglot evaluation of the R mean function HOT 2
- install.packages("mosaic") failed HOT 5
- install.packages("parsnip") fails on FASTR 22.2 on Linux HOT 1
- Broken link to FastR installation webpage. HOT 1
- Stackoverflow at FunctionDefinitionNode.execute(FunctionDefinitionNode.java:342) HOT 1
- tibble: unexpected type: RRawVector instead of CharSXPWrapper
- Packe READXL can be installed but not used: unimplemented .Internal unz
- java interop with R error? HOT 2
- fail while trying to install package ("devtools") HOT 2
- Microsoft MRAN is no more, what are the alternatives? HOT 4
- Apple Silicon support for FastR
- Support for macOS on Apple Silicon HOT 1
- Incorrect Tax calculation for Australia orders in Connector HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastr.