Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 26, 2014
Merged

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

merged 1 commit into from
Aug 26, 2014

Conversation

tbonfort
Copy link
Member

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
Copy link
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?

@ianwalberg
Copy link
Author

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
Copy link
Member

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

@ianwalberg
Copy link
Author

Sent email directly to you with DB attached.

@tbonfort tbonfort merged commit e5c2e65 into MapServer:master Aug 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants