[Xastir] Crash when reading shapefile

Jason Godfrey godfreja at gmail.com
Fri Jun 19 18:50:39 EDT 2009


Hello.

I've been trying to get xastir to display a shapefile that was created
by an online KML to shapefile converter. After figuring out a dbfawk
file and fixing some coordinate problems with my converted shapefile I
finally got xastir to try to draw based on the shapefile. However,
xastir crashes. I've had issues with both 1.9.2 and 1.9.5.

Below is some output from my troubles. I ran in gdb to get a backtrace:

*** Done with WX Alert log files
  ENOENT ERROR
Fri Jun 19 16:16:15 CDT 2009:
  Interface Error!  Error opening interface 0 Hard Fail

ERROR 3: Error in fseek() or fread() reading object from .shp file.
ERROR 3: Error in fseek() or fread() reading object from .shp file.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000028
build_rtree (root=0x2373424, sHP=0x2373360) at shp_hash.c:302
302            bbox_shape.boundary[0]=(RectReal) psCShape->dfXMin;
(gdb) where
#0  build_rtree (root=0x2373424, sHP=0x2373360) at shp_hash.c:302
#1  0x00127af9 in add_shp_to_hash (filename=0xbfffbb20
"/opt/local/share/xastir/maps/xfiles/polylines8.shp", sHP=0x2373360)
at shp_hash.c:247
#2  0x000f2d01 in draw_shapefile_map (w=0x23561f0, dir=0x321300
"/opt/local/share/xastir/maps", filenm=0x2ba4c00
"xfiles/polylines8.shp", alert=0x0, alert_color=0 '\0',
destination_pixmap=0, mdf=0xbfffe878) at map_shp.c:1521
#3  0x000d3c99 in draw_map (w=0x23561f0, dir=0x321300
"/opt/local/share/xastir/maps", filenm=0x2ba4c00
"xfiles/polylines8.shp", alert=0x0, alert_color=0 '\0',
destination_pixmap=0, draw_flags=0xbfffe878) at maps.c:5840
#4  0x000d793e in load_maps (w=0x23561f0) at maps.c:8968
#5  0x000831f3 in create_image (w=0x23561f0) at main.c:3384
#6  0x00083db7 in new_image (da=0x23561f0) at main.c:12911
#7  0x000b6946 in UpdateTime (clientData=0x23561f0, id=3221221596) at
main.c:11380
#8  0x004c3e71 in DoOtherSources ()
#9  0x004c3f64 in XtAppNextEvent ()
#10 0x004b91f3 in XtAppMainLoop ()
#11 0x000cc9f4 in main (argc=1, argv=0xbffffb3c, envp=0xbffffb44) at
main.c:27825

Am I running into a known issue? If not I am willing to do some debugging.

Thanks
- Jason

PS: I can dump the shapefile with shpdump. I'm not sure if that says
anything about the correctness of the shapefile.

-- 
I have learned to use the word 'impossible' with the greatest caution.
 -- Wernher von Braun



More information about the Xastir mailing list