msyyin / mapfile.c

Frank Warmerdam warmerdam at POBOX.COM
Thu Jun 28 15:00:03 EDT 2007


Steve,

I was doing a bit of mapscript work today and found that things were
crashing.  I tracked it down to fclose() being called on msyyin.  Digging
a bit deeper it seems that the END processing in mapfile.c is closing
msyyin but this code in msLoadMap() was also trying to close it.

   if(loadMapInternal(map) != MS_SUCCESS) {
     msFreeMap(map);
     msReleaseLock( TLOCK_PARSER );
     fclose(msyyin);
     return NULL;
   }

In normal use I think it might not have been a serious error, but in
my case a failed attempt to open a symbol file meant that msyyin was
set to NULL.  Anyways, I've applied the following patch which I think
is safe, and helped my case:

   http://trac.osgeo.org/mapserver/changeset/6243

But it seems possible there are other aspects of the same problem that
aren't addressed.  I presume this is related to the parse-from-string
refactoring done recently?

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapserver-dev mailing list