mapscript crashes on getFeature

Donovan donovan at FUNCTIONFOUR.CA
Tue Nov 15 12:10:18 EST 2005


I've been working with mapscript and tomcat for several weeks, generally
mapserver is working great but when i try to query a layer (tried a polygon
shp file, polygon tab file and a point tab file) the jvm crashes as soon as
getFeature is called.  QueryByPoint and getResults appear to work - i can
iterate over the resultset and print shape indexes but getFeature always
crashes with this message:

> *** glibc detected *** free(): invalid pointer: 0x093f6e30 ***
> 15/11/2005 10:48:04 11023 jsvc.exec error: Service did not exit cleanly

Any ideas?  I'm really stuck...

Following is a snip of the code and some more detail:

layer.queryByPoint(map,point,mapscriptConstants.MS_MULTIPLE,-1);
resultCacheObj results = layer.getResults();
layer.open();
    for (int i=0;i<results.getNumresults();i++) {
        resultCacheMemberObj result = results.getResult(i);
        shapeObj feature =
layer.getFeature(result.getShapeindex(),result.getTileindex());
    }
f.realLayer.close();

I'm using mapserver 4.8.0 but also tried 4.6.0 - same results
I compiled mapserver myself with these flags
--with-gdal --with-ogr --with-postgis --with-proj --with-threads --with-png
--with-geos --with-gd --enable-debug

gdal-1.2.6,  proj-4.4.9 and geos-2.1.1 were installed using RPMs from
mappinghacks.com
JDK 1.5.0_05
Tomcat 5.0
Fedora core 3

I tried loading the jvm in GDB but it don't have the skill to track down the
source of the memory corruption.
Searched the list, google and the documentation with no success...

Donovan



More information about the mapserver-users mailing list