Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1752 closed defect (fixed)

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 (3)

comment:1 by hobu, 18 years ago

Resolution: fixed
Status: newclosed
fixed in 4.8 and HEAD

comment:2 by sdlime, 18 years ago

Cc: sgillies@… added

comment:3 by sdlime, 18 years ago

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.