Skip to content

Missing LABEL TEXT attribute bind causes crash in shp2img #5558

@geographika

Description

@geographika

On MapServer 7.0.4, Windows x64 I am getting the following error / crash when using more than one iteration of shp2img, and referring to a field name that does not exist for LABEL text:

Unhandled exception thrown: write access violation.
msyystring_buffer was nullptr.

This occurs in mapfile.c - line 6751:

  msyystate = MS_TOKENIZE_FILE;
  msyylex(); /* sets things up, but doesn't process any tokens */

  msyyrestart(msyyin);  // crash here

Running one iteration of shp2img works:

shp2img -m test.map -c 1 -o test.png

Running two iterations causes a crash:

shp2img -m test.map -c 2 -o test.png

Test Mapfile below.

MAP    
    EXTENT 0 0 100 100
    SIZE 100 100
    LAYER
        TYPE POINT
        STATUS ON
        FEATURE
            POINTS
                50 50
            END
        END
        CLASS
            LABEL
                TEXT "[Missing]"
            END
        END
    END
END

Metadata

Metadata

Assignees

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