Opened 17 years ago
Last modified 13 years ago
#1994 assigned defect
msLoadMap does not properly close map files on parse error
Reported by: | Owned by: | sdlime | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | hobu |
Description (last modified by )
We use C# mapscript on Windows and have been seeing behavior where a map file is locked by the process that calls msLoadMap. Thus the file cannot be delete until the process is finished. This is only occurs on parse error, and is because fclose() is not properly called in these circumstances. Attached is a patch which rectifies this by calling fclose() in all circumstances.
Attachments (4)
Change History (13)
by , 17 years ago
Attachment: | fclose.patch added |
---|
comment:2 by , 17 years ago
Status: | new → assigned |
---|
Scott: Applying the patch failed for me for both 4.10 and CVS HEAD. What version are you using? Steve
comment:3 by , 17 years ago
attachments.isobsolete: | 0 → 1 |
---|
comment:4 by , 17 years ago
attachments.isobsolete: | 0 → 1 |
---|
comment:5 by , 17 years ago
There's still a problem. Looks like the patch contains some extraneous stuff that must be custom for you. The patch applies ok but won't compile (against CVS HEAD). I'm getting: mapfile.c:2636: error: `MS_SQLSPATIAL' undeclared (first use in this function) mapfile.c:2636: error: (Each undeclared identifier is reported only once mapfile.c:2636: error: for each function it appears in.) mapfile.c: In function `loadMapInternal': mapfile.c:4571: warning: unused variable `i' mapfile.c:4571: warning: unused variable `j' mapfile.c:4571: warning: unused variable `k' mapfile.c:4572: warning: unused variable `szPath' mapfile.c:4572: warning: unused variable `szCWDPath' mapfile.c: In function `ParseMap': mapfile.c:4604: error: argument `filename' doesn't match prototype mapfile.c:229: error: prototype declaration mapfile.c:4604: error: argument `new_mappath' doesn't match prototype mapfile.c:229: error: prototype declaration mapfile.c:4629: warning: passing arg 1 of `strdup' makes pointer from integer without a cast mapfile.c:4631: warning: passing arg 1 of `getPath' makes pointer from integer without a cast mapfile.c: In function `msLoadMap': mapfile.c:4835: warning: unused variable `starttime' mapfile.c:4835: warning: unused variable `endtime' Steve
comment:6 by , 17 years ago
attachments.isobsolete: | 0 → 1 |
---|
comment:7 by , 17 years ago
Cc: | added |
---|---|
Description: | modified (diff) |
Steve,
What's the status on this one? I know you've been reworking a lot of things for the 5.0 release, and I was wondering if these patches or something like it have made it into trunk yet.
Howard
comment:8 by , 17 years ago
comment:9 by , 13 years ago
I've no clue if this is still an issue. I'd love to close if anyone knows definitively...
Steve
Note:
See TracTickets
for help on using tickets.
patch