mapscript crashes on getFeature

Steve Lime steve.lime at DNR.STATE.MN.US
Thu Nov 17 23:25:08 EST 2005


Hmmm.... The geometry member is initialized to NULL and not used unless you do something like a buffer or a convex hull. The code to free the geometry does check to make sure the geometry is not NULL before unallocating it. This leads me to believe the problem is not GEOS per se but elsewhere in the query or MapScript code- perhaps someplace that doesn't use msInitShape() to initialize a shapeObj structure, which could lead to an unitialized geometry pointer. I guess we should try the same code snippet in another MapScript flavor to make sure it's not a java specific issue.

Steve

>>> Donovan <donovan at FUNCTIONFOUR.CA> 11/16/05 12:07 PM >>>
>You've got my attention. Donovan do you have any more specific information
regarding the GEOS crash?   --Steve

Sure,

I'm using mapserver 4.8.0beta - but 4.6.0 breaks too
--geos-2.1.1 from rpm (gdal-1.2.6 and proj-4.4.9 also)
--FedoraCore3 with java1.5 (glibc-2.3.5)

I think the crash occurs any time a shapeObj is returned.

I modified the java mapscript example class DrawMap from the mapserver
source tree to demonstrate the problem - Query.java is attached.

Without GEOS, Query.java generates the png but with GEOS, it looks like this:
# cd ~/mapserver-4.8.0-beta1/mapscript/java
# javac -classpath ./:examples/:./mapscript.jar -d examples/ examples/*.java
# java -classpath ./:examples/:./mapscript.jar -Djava.library.path=. Query
../../tests/test.map ./map.png

> The map will be drawn to:./map.png
> *** glibc detected *** malloc(): memory corruption: 0xb1c11ee8 ***
> Aborted



More information about the mapserver-users mailing list