Skip to content

*** caught segfault *** error

2 messages · Juanjo Abellan, Brian Ripley

#
Dear all,

The shapefile was generated with ArcGIS 9.0 running on Windows XP. It  
can be can be found in www.uv.es/~abellan/districts_ok.zip.

Re running sessionInfo() before the error occurres as suggested by  
Prof. Ripley:

 > library(spdep)
Loading required package: tripack
Loading required package: maptools
Loading required package: foreign
Loading required package: sp
Loading required package: SparseM
Package SparseM (0.71) loaded.  To cite, see citation("SparseM")
Loading required package: boot
 > library(maptools)
 > sessionInfo()
R version 2.4.0 (2006-10-03)
i386-apple-darwin8.8.1

locale:
es_ES.UTF-8/es_ES.UTF-8/es_ES.UTF-8/C/es_ES.UTF-8/es_ES.UTF-8

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

other attached packages:
    spdep     boot  SparseM maptools       sp  foreign  tripack
"0.3-32" "1.2-26"   "0.71"  "0.6-3"  "0.9-4" "0.8-17" "1.2-10"
 > district.shp <- read.shape("~/Documents/SAHSU/MD/data/Carthography/ 
districts_ok.shp")
Shapefile type: Polygon, (5), # of Shapes: 354
 > plot(district.shp)

*** caught segfault ***
address 0xc00006d5, cause 'memory not mapped'

Traceback:
1: polygon(theMap$Shapes[[ii]]$verts, col = fg[i], border = ol,     ...)
2: plot.Map(district.shp)
3: plot(district.shp)
4: plot(district.shp)

Possible actions:
1: abort (with core dump)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:



Re trying maptools "example(read.shape)" as suggested by Dr Bivand:

 > example(read.shape)

rd.shp> x <- read.shape(system.file("shapes/sids.shp", package =  
"maptools")[1])
Shapefile type: Polygon, (5), # of Shapes: 100

rd.shp> length(x$Shapes)
[1] 100

rd.shp> unlist(lapply(x$att.data, class))
      AREA PERIMETER     CNTY_   CNTY_ID      NAME      FIPS     
FIPSNO  CRESS_ID     BIR74     SID74
"numeric" "numeric" "numeric" "numeric"  "factor"  "factor" "numeric"  
"numeric" "numeric" "numeric"
   NWBIR74     BIR79     SID79   NWBIR79
"numeric" "numeric" "numeric" "numeric"

rd.shp> str(getinfo.shape(system.file("shapes/fylk-val.shp",
     package = "maptools")[1]))
List of 5
$ : chr "/Library/Frameworks/R.framework/Versions/2.4/Resources/ 
library/maptools/shapes/fylk-val.shp"
$ : int 3
$ : int 97
$ : num [1:4]   -4868 6456207       0       0
$ : num [1:4] 1084722 7841997       0       0
- attr(*, "class")= chr "shapehead"
 > plot(x)
Warning message:
'plot.Map' is deprecated.
Use 'plot.Spatial' instead.
See help("Deprecated") and help("maptools-deprecated").

The maps is plotted.

Sorry, I didn't understand the issue about the locale and the C  
locale that Prof Ripley mentioned. Where could I learn about that?

Thanks,

Juanjo



El 30/11/2006, a las 11:41, Prof Brian Ripley escribi?:
#
On Fri, 1 Dec 2006, Juanjo Abellan wrote:
[...]
In the R-admin manual (but Roger will understand).