Opened 17 years ago
Closed 13 years ago
#2103 closed defect (wontfix)
Missing IGNORE_MISSING_DATA #ifndef in mapshape.c cause DM Solutions US Streetmaps to throw exceptions
Reported by: | enfos | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | 5.6 release |
Component: | MapServer C Library | Version: | 4.10 |
Severity: | normal | Keywords: | |
Cc: | umberto, jmckenna, dmorissette |
Description
The symptom is that even configuring mapserver with the “--enable-ignore-missing-data” option exceptions can still be thrown when using the Java Mapscript library.
The bug is that the mapserver/mapshape.c file is missing an #ifndef on line 1442, and this affects the java mapscript build when used with street maps.
The fix is
if(!shpfile->hSHP) { #ifndef IGNORE_MISSING_DATA
msSetError(MS_IOERR, "(%s)", "msSHPOpenFile()", filename);
#endif ENFOS
return(-1);
}
Change History (13)
comment:1 by , 17 years ago
Cc: | added |
---|
follow-up: 3 comment:2 by , 17 years ago
comment:3 by , 17 years ago
Replying to hobu:
This is really an error if the shapefile can't be opened, right?
The message is a warning, so this isn't a bug but a feature. It's there for informational/debugging purposes and could be supressed if it's causing problems (e.g. apply the patch).
Steve
comment:4 by , 17 years ago
Should the open still return -1, or should the entire open block be inside the #ifdef?
comment:5 by , 17 years ago
Martin, since you reported this, can you comment on what you think is missing in the current code?
jeff
comment:6 by , 17 years ago
Milestone: | 4.10.3 release → 5.0.1 release |
---|
I think we are done with 4.10 .. moving to 5.0.1.
comment:7 by , 16 years ago
Cc: | added |
---|
comment:8 by , 16 years ago
Status: | new → assigned |
---|
comment:9 by , 16 years ago
Cc: | added |
---|
Hmmm... Trying to close this one out. I'm assuming we're talking about the code near line 1350 in mapshape.c. The problem that IGNORE_MISSING_DATA applies only to tiled sources an this change would suppress the error message in all cases which isn't what we want. I was hoping we could clear the error stack in msTiledSHPOpenFile() but I think the exception is thrown as soon as msSetError() is called. We could also just return -1 (should really change that to MS_FAILURE) and let the calling code set the error message if appropriate but then we loose a bit of granularity in the different types of errors that function detects (e.g. missing .dbf file)
Cc'ing Umberto for his thoughts.
comment:10 by , 16 years ago
Milestone: | 5.0.1 release → 5.2 release |
---|
Well, for the sake of getting 5.0.1 out the door I'm going to defer this until 5.2 since the fix is likely not trivial.
Steve
comment:12 by , 15 years ago
Cc: | added; removed |
---|
comment:13 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Closing. Please reopen if that's really still an issue in MS 6.x
This is really an error if the shapefile can't be opened, right?