LINE layer does not draw or gives small malloc error #4972

Merged
merged 1 commit into from Aug 26, 2014

Conversation

Projects
None yet
2 participants
@tbonfort
Member

tbonfort commented Aug 19, 2014

Map file below with good and bad line feature, in this case the line does not get drawn.

Using OGR connection to sqlite db gives error msSmallMalloc(): Out of memory allocating -8 bytes.

MAP
  CONFIG "PROJ_LIB" "/tmp/navhome/lib/share/proj"
  CONFIG "PROJ_DEBUG" "OFF"
  CONFIG "CPL_DEBUG" "ON"
  #CONFIG "MS_ERRORFILE" "mapserver.log"
  CONFIG "ON_MISSING_DATA" "LOG"
  DEBUG 5

  EXTENT -110.5 38.5 -110 39.5 # fails

  FONTSET "fontset.txt"
  IMAGECOLOR 0 0 0
  IMAGETYPE "png"
  NAME "global_map"
  SIZE 1280 768
  STATUS ON
  UNITS DD

  OUTPUTFORMAT
    NAME "AGG_PNG"
    MIMETYPE "image/png"
    DRIVER "AGG/PNG"
    EXTENSION "png"
    IMAGEMODE RGBA
    TRANSPARENT TRUE
    FORMATOPTION "COMPRESSION=0"
  END # OUTPUTFORMAT

  PROJECTION
    "proj=latlong"
    "ellps=WGS84"
  END # PROJECTION

  SYMBOL
    NAME 'City'
    TYPE ELLIPSE
    POINTS 1 1 END
    FILLED FALSE
  END

LAYER
  NAME 'badwkt'
  TYPE LINE
  STATUS DEFAULT
  FEATURE
    POINTS
#      -110.220982 38.982832  #works
       -110.220980 38.982832  #fails
      -110.220887 38.982863
      -110.221614 38.982708
      -110.220980 38.982832
    END
    TEXT "Testing"
  END

  CLASS

    LABEL
      FONT "Uni"
        SIZE 10
        COLOR 255 255 255
        ENCODING "UTF-8"
        PARTIALS FALSE
        POSITION LC
      END # LABEL

    STYLE
      COLOR 255 255 255
      WIDTH 4
    END
  END
END
END # MAP

@tbonfort tbonfort added this to the 7.0 Release milestone Aug 15, 2014

@tbonfort tbonfort self-assigned this Aug 15, 2014

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Aug 15, 2014

Member

Ian,
I'm unable to reproduce anything meaningful with this mapfile. If I use the 'fails' coordinate, I effectively get no features drawn, however there are no memory errors and valgrind does not report anything suspicious. I also get no features drawn when using 6.4 instead of the master version.
Could you provide by email the sqlite db and mapfile that shows the error?

Member

tbonfort commented Aug 15, 2014

Ian,
I'm unable to reproduce anything meaningful with this mapfile. If I use the 'fails' coordinate, I effectively get no features drawn, however there are no memory errors and valgrind does not report anything suspicious. I also get no features drawn when using 6.4 instead of the master version.
Could you provide by email the sqlite db and mapfile that shows the error?

@ianwalberg

This comment has been minimized.

Show comment
Hide comment
@ianwalberg

ianwalberg Aug 15, 2014

Thomas,

The layer and the db attached, you will need a different symbol.

Regards

Ian

  LAYER
    DEBUG 5
    CONNECTION "US_Interstates.db"
    CONNECTIONTYPE OGR

     #DATA "select * from us_interstates where  RecNo  = 242" #works
     DATA "select * from us_interstates where  RecNo  = 243" #fails

    NAME "us_interstates_shields"
    PROJECTION
      "proj=latlong"
      "ellps=WGS84"
    END # PROJECTION
    STATUS DEFAULT
    TILEITEM "location"

    TYPE LINE



    UNITS METERS
    CLASS
      NAME "US Interstate Shields"
     LABEL
        TEXT '[RecNo]+[number]+[uident]'
      FONT "Uni"
        SIZE 10
        COLOR 255 255 255
        ENCODING "UTF-8"
        PARTIALS FALSE
        POSITION CC
        WRAP '+'
        STYLE
          GEOMTRANSFORM "labelpnt"
          SYMBOL istate
        END # STYLE
      END # LABEL

   STYLE
        COLOR 0 0 0
        WIDTH 4
      END # STYLE
      STYLE
        COLOR 200 200 0
        WIDTH 2
      END # STYLE
   END # CLASS
  END # LAYER

Thomas,

The layer and the db attached, you will need a different symbol.

Regards

Ian

  LAYER
    DEBUG 5
    CONNECTION "US_Interstates.db"
    CONNECTIONTYPE OGR

     #DATA "select * from us_interstates where  RecNo  = 242" #works
     DATA "select * from us_interstates where  RecNo  = 243" #fails

    NAME "us_interstates_shields"
    PROJECTION
      "proj=latlong"
      "ellps=WGS84"
    END # PROJECTION
    STATUS DEFAULT
    TILEITEM "location"

    TYPE LINE



    UNITS METERS
    CLASS
      NAME "US Interstate Shields"
     LABEL
        TEXT '[RecNo]+[number]+[uident]'
      FONT "Uni"
        SIZE 10
        COLOR 255 255 255
        ENCODING "UTF-8"
        PARTIALS FALSE
        POSITION CC
        WRAP '+'
        STYLE
          GEOMTRANSFORM "labelpnt"
          SYMBOL istate
        END # STYLE
      END # LABEL

   STYLE
        COLOR 0 0 0
        WIDTH 4
      END # STYLE
      STYLE
        COLOR 200 200 0
        WIDTH 2
      END # STYLE
   END # CLASS
  END # LAYER
@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Aug 18, 2014

Member

@ianwalberg please send the db file to me directly (i.e. not through github which does not accept attachments)

Member

tbonfort commented Aug 18, 2014

@ianwalberg please send the db file to me directly (i.e. not through github which does not accept attachments)

@ianwalberg

This comment has been minimized.

Show comment
Hide comment
@ianwalberg

ianwalberg Aug 18, 2014

Sent email directly to you with DB attached.

Sent email directly to you with DB attached.

@tbonfort tbonfort merged commit e5c2e65 into mapserver:master Aug 26, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment