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 jmckenna, 17 years ago

Cc: jmckenna@… added

comment:2 by hobu, 17 years ago

This is really an error if the shapefile can't be opened, right?

in reply to:  2 comment:3 by sdlime, 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 hobu, 17 years ago

Should the open still return -1, or should the entire open block be inside the #ifdef?

comment:5 by jmckenna, 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 warmerdam, 17 years ago

Milestone: 4.10.3 release5.0.1 release

I think we are done with 4.10 .. moving to 5.0.1.

comment:7 by dmorissette, 16 years ago

Cc: dmorissette added

comment:8 by sdlime, 16 years ago

Status: newassigned

comment:9 by sdlime, 16 years ago

Cc: umberto 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 sdlime, 16 years ago

Milestone: 5.0.1 release5.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:11 by sdlime, 16 years ago

Milestone: 5.2 release5.4 release

Moving to 5.4...

Steve

comment:12 by jmckenna, 15 years ago

Cc: jmckenna added; jmckenna@… removed

comment:13 by dmorissette, 13 years ago

Resolution: wontfix
Status: assignedclosed

Closing. Please reopen if that's really still an issue in MS 6.x

Note: See TracTickets for help on using tickets.