Skip to content

Poor error message on GDAL library issues #7409

Description

@Zardozz

OS Alma Linux 9.7
The EPEL repository has a broken GDAL package (see https://issues.redhat.com/browse/RHEL-136706 )
Has a broken version of GDAL that has no file type drivers, to it fails to parse any graphics files like GTiff files.

When Mapserver is generating output from Map layers that use images it gives miss leading error messages and does not point to a problem in the GDAL library.

e.g. on Mapserver 8.4.1 with the broken GDAL 3.10.3 package the MS_ERRORFILE out put gives:-

[Wed Dec 24 00:12:23 2025].167620 CGI Request 1 on process 324
[Wed Dec 24 00:12:23 2025].167815 msDrawMap(): rendering using outputformat named jpeg (AGG/JPEG).
[Wed Dec 24 00:12:23 2025].167820 msDrawMap(): WMS/WFS set-up and query, 0.000s
[Wed Dec 24 00:12:23 2025].167825 msDrawRasterLayerLow(Layer): entering.
[Wed Dec 24 00:12:23 2025].176244 msDrawRasterLayerLow(): Unable to access file. Corrupt, empty or missing file '/path_to/somefilename.tif' for layer 'Layer'. `/path_to/somefilename.tif' not recognized as being in a supported file format.
[Wed Dec 24 00:12:23 2025].176255 msDrawMap(): Image handling error. Failed to draw layer named 'Layer'.
[Wed Dec 24 00:12:23 2025].176306 mapserv request processing time (msLoadMap not incl.): 0.009s
[Wed Dec 24 00:12:23 2025].176315 msFreeMap(): freeing map at 0x5569bdc34e80.

The error says first that the tiff file is "Corrupt, empty or missing file" which is not actually the case.
The actual error is that GDAL error output is that the tiff file is "not recognized as being in a supported file format"

It would be helpful is Mapserver identified errors that come from external libraries like GDAL and not have miss leading error messages.

e.g. "gdalinfo" command line only says the following

ERROR 4: `/opt/mapserver/osdata//MiniScale/MiniScale_with_grid_R14.tif' not recognized as being in a supported file format.
gdalinfo failed - unable to open '/opt/mapserver/osdata//MiniScale/MiniScale_with_grid_R14.tif'

Nothing about being corrupt, empty or missing.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions