Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in qtm() causes R session to crash on macOS Sierra #120

Closed
pboesu opened this issue Jun 22, 2017 · 4 comments
Closed

Bug in qtm() causes R session to crash on macOS Sierra #120

pboesu opened this issue Jun 22, 2017 · 4 comments

Comments

@pboesu
Copy link

pboesu commented Jun 22, 2017

I was looking to try out tmap for the first time today, but the qtm() fails catastrophically, terminating the R session in the process. The error appears to be related to C++ functions from geos:

> qtm(Europe)
Assertion failed: (0), function query, file ../../../../src/geos-3.6.1/src/index/strtree/AbstractSTRtree.cpp, line 287.
Abort trap: 6 

I'm running R 3.4.0 on macOS 10.12.5 with homebrew 1.2.3
gdal (2.1.3_3), geos (3.6.1) and proj.4 (4.9.3) are all installed via homebrew.
Full session info and call sequence below.

> library(tmap)
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.5

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] tmap_1.10

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.11       lattice_0.20-35    deldir_0.1-14      png_0.1-7         
 [5] class_7.3-14       gtools_3.5.0       digest_0.6.12      foreach_1.4.3     
 [9] V8_1.5             mime_0.5           R6_2.2.1           plyr_1.8.4        
[13] stats4_3.4.0       coda_0.19-1        e1071_1.6-8        spdep_0.6-13      
[17] curl_2.6           geojsonlint_0.2.0  gdata_2.18.0       geosphere_1.5-5   
[21] raster_2.5-8       gmodels_2.16.2     R.utils_2.5.0      R.oo_1.21.0       
[25] Matrix_1.2-9       splines_3.4.0      webshot_0.4.1      rgdal_1.2-7       
[29] udunits2_0.13      htmlwidgets_0.8    RCurl_1.95-4.8     munsell_0.4.3     
[33] shiny_1.0.3        compiler_3.4.0     rmapshaper_0.2.0   httpuv_1.3.3      
[37] tmaptools_1.2-1    base64enc_0.1-3    rgeos_0.3-23       htmltools_0.3.6   
[41] expm_0.999-2       codetools_0.2-15   mapview_2.0.1      XML_3.98-1.9      
[45] viridisLite_0.2.0  jsonvalidate_1.0.0 sf_0.5-0           MASS_7.3-47       
[49] bitops_1.0-6       R.methodsS3_1.7.1  grid_3.4.0         nlme_3.1-131      
[53] jsonlite_1.5       satellite_0.2.0    xtable_1.8-2       DBI_0.6-1         
[57] magrittr_1.5       units_0.4-5        scales_0.4.1       KernSmooth_2.23-15
[61] LearnBayes_2.15    leaflet_1.1.0      sp_1.2-4           boot_1.3-19       
[65] osmar_1.1-7        RColorBrewer_1.1-2 iterators_1.0.8    tools_3.4.0       
[69] gdalUtils_2.0.1.7  dichromat_2.0-0    crosstalk_1.0.0    colorspace_1.3-2  
[73] classInt_0.1-24   
> data(Europe)
> qtm(Europe)
Assertion failed: (0), function query, file ../../../../src/geos-3.6.1/src/index/strtree/AbstractSTRtree.cpp, line 287.
Abort trap: 6
[at this point the R session is terminated]
@mtennekes
Copy link
Member

This is related to rgeos. Try to run some of its examples, e.g. from the documentation of gIntersection.

@pboesu
Copy link
Author

pboesu commented Jun 26, 2017

The rgeos examples for gIntersection work fine. Some throw errors (which is by design, I believe), others warnings, but in both cases those are handled gracefully by R.

I've also tried debugging the call to qtm(Europe), and the catastrophic error occurs only at the very end, when the plot object g is returned (https://github.com/mtennekes/tmap/blob/master/R/qtm.R#L259).
I'm not sure how to further debug the return of the plot object itself, I'm afraid.

@pboesu pboesu closed this as completed Jun 26, 2017
@pboesu pboesu reopened this Jun 26, 2017
@tim-salabim
Copy link

Recently, there were similar error messages for Mac OS reported at
r-spatial/sf#394
and
r-spatial/sf#389
maybe these help debugging the issue at hand.

@mtennekes
Copy link
Member

See new central issue #149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants