For future reference, I had applied the rpl_malloc change to the mapprimitive.c file, but this hadn't been picked up by maporaclespatial.c
I've removed the mapprimitive.c reference and put it into mapserver.h between the _WIN32 and DISABLE_CVSID #ifdef statements. 2008/6/6 Rob <[EMAIL PROTECTED]>: > Hi > > I'm trying to migrate my MapServer 4.8.6 mapscript application to 5.0.2. > > I've seen the following webpages, and this has identified a number of > things that I need to do, which I have started on > > http://mapserver.gis.umn.edu/download/previous/mapserver_4_10/migration_guide_48_410 > http://trac.osgeo.org/mapserver/browser/tags/rel-5-0-0/mapserver/MIGRATION_GUIDE.TXT > > > I've had some success so far, with shapefiles, rasters and cascaded > WMS feeds, but I've just hit a problem when trying to view an Oracle > layer. > > I am seeing the following error. > > "msOracleSpatialLayerNextShape(): OracleSpatial error : No memory > avaliable to allocate the values" [TYPO in the error message BTW] > > This seems to be for any Oracle layer, including a test layer with > only 12 points in it, so I can't believe it really is an available > memory issue. > > Looking at the MapServer code directly, this error message comes from here > > shape->values = (char **)malloc( sizeof(char*) * shape->numvalues ); > if (shape->values == NULL) > { > msSetError( MS_ORACLESPATIALERR, "No memory avaliable to > allocate the values", "msOracleSpatialLayerNextShape()" ); > return MS_FAILURE; > } > > For some background, my application is running on AIX, and I from what > I can gather thats an issue with regards to MALLOC. From our internal > documentation of how we resolved the issue on 4.8.6 > > "Malloc on AIX differs from other platforms, in particular attempting > to allocate zero bytes e.g. malloc(0) does not work on AIX. This > causes problems with mapserver, where malloc(0) is used, often to > create an empty structure then add 'points' etc to this structure. > This problem allows the mapserver to be built but executing the server > causes SIGSEGV-11 memory errors when the code attempts to reference > the memory it expects to have been allocated by malloc(0). > > To fix this malloc is replaced with some rpl_malloc.c macro so as to > handle malloc(0) > > Add rpl_malloc.o to the object list in the Makefile > > OBJS= maptemplate.o …… rpl_malloc.o $(EPPL_OBJ) > > And define the macro to override malloc with rpl_malloc in the file > mapprimitive.c > > /* Deal with AIX malloc(0) issues */ > > #define malloc rpl_malloc > > " > > We've done this again this time round, and resolved the SIGSEGV issues > that still existed. > I have no idea whether this is part of the issue, but I thought it > might be relevant given the location of the error in the code. If > not, then doesn anybody of any of the parameters needed for an > OracleSpatial layer have changed between the versions? > > MTIA > > Rob > _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users