Ticket #1752 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

msSearchDiskTree() throws MS_IOERR in debug mode on missing .qix files

Reported by: schuyler@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer C Library Version: 4.8
Severity: normal Keywords:
Cc: sgillies@…

Description

msSearchDiskTree() throws MS_IOERR in debug mode on missing .qix files, which
causes mserror.i to throw an exception in MapScript in 4.8.3. I have confirmed
this behavior with Python MapScript. I think that the existing behavior is a bit
aggressive for what is to all intents and purposes a simple warning.

The following patch changes the error type of this warning to MS_NOTFOUND, which
has the exact same result in the mapserv CGI, but will not cause mserror.i to
throw an exception.

---------

diff -Naur mapserver.orig/maptree.c mapserver/maptree.c
--- mapserver.orig/maptree.c    2005-08-25 10:20:16.000000000 -0400
+++ mapserver/maptree.c 2006-04-18 19:46:00.000000000 -0400
@@ -530,7 +530,7 @@
   if(!disktree) {

     /* only set this error IF debugging is turned on, gets annoying otherwise */
-    if(debug) msSetError(MS_IOERR, "Unable to open spatial index for %s. In
most cases you can safely ignore this message, otherwise check file names and
permissions.", "msSearchDiskTree()", filename);
+    if(debug) msSetError(MS_NOTFOUND, "Unable to open spatial index for %s. In
most cases you can safely ignore this message, otherwise check file names and
permissions.", "msSearchDiskTree()", filename);

     return(NULL);
   }

Change History

Changed 7 years ago by hobu

  • status changed from new to closed
  • resolution set to fixed
fixed in 4.8 and HEAD

Changed 7 years ago by sdlime

  • cc sgillies@… added

Changed 7 years ago by sdlime

That's not the purpose of MS_NOTFOUND, not that it's a big deal. Perhaps we
should just supress the error altogether...

Steve
Note: See TracTickets for help on using tickets.