[mapserver-dev] Multiline string error

Ian Walberg ian.walberg at airborne.aero
Thu Aug 14 09:09:48 PDT 2014


Steve,

I used points for the feature data rather than the WKT string but seem to have got the same condition.

I have added the debug line to the source to use the msPrintShape in the mapprimative.c file in the msPolylineComputeLineSegments function.

Using EXTENT -111.9 37 -110 40 

FEATURE
    POINTS
      -110.220980 38.982832
      -110.220887 38.982863
      -110.221614 38.982708
      -110.220980 38.982832
    END
    TEXT "Testing"
  END

With first and last point the same I get no shape details and nothing drawn on the map and no malloc error.

FEATURE
    POINTS
      -110.220982 38.982832
      -110.220887 38.982863
      -110.221614 38.982708
      -110.220980 38.982832
    END
    TEXT "Testing"
  END

With different first and last points I get the line drawn and the following debug :-

[Thu Aug 14 08:47:10 2014].339760 Shape contains 1 parts.
[Thu Aug 14 08:47:10 2014].339777       Part 0 contains 2 points.
[Thu Aug 14 08:47:10 2014].339790               0: (825.885602, 260.055952)
[Thu Aug 14 08:47:10 2014].339829               1: (825.886113, 260.055952)

Then msSmallMalloc(): Out of memory allocating -8 bytes.

We are happy to look further but any guidance to where to look would be great.

With mapsever 6.4.1 the line does not get drawn when the points are the same but does not give a malloc error.

Thanks

Ian


-----Original Message-----
From: Lime, Steve D (MNIT) [mailto:Steve.Lime at state.mn.us] 
Sent: Thursday, August 14, 2014 7:40 AM
To: Ian Walberg; mapserver-users at lists.osgeo.org; mapserver-dev at lists.osgeo.org
Subject: RE: Multiline string error

One quick thing to do would be to take OGR out of the mix. Just set up a mapfile with the feature in question as a WKT inline feature. Something like:

LAYER
  NAME 'badwkt'
  TYPE LINE
  STATUS DEFAULT
  FEATURE
    WKT ' MULTILINESTRING ((-110.220980 38.982832, -110.220887 38.982863, -110.221614 38.982708, -110.220980 38.982832),(-110.220980 38.982832, -110.220887 38.982863, -110.221614 38.982708, -110.220980 38.982832))'
  END
  CLASS
    STYLE COLOR 0 0 0 END
  END
END

Then try to draw... If this fails then it's a MapServer issue.

Steve

-----Original Message-----
From: Ian Walberg [mailto:ian.walberg at airborne.aero] 
Sent: Wednesday, August 13, 2014 9:38 PM
To: Lime, Steve D (MNIT); mapserver-users at lists.osgeo.org; mapserver-dev at lists.osgeo.org
Subject: RE: Multiline string error

Steve,

Version 6.4.1 built on the same machine with the same settings does not have the issue.

Regards

Ian

-----Original Message-----
From: Ian Walberg 
Sent: Wednesday, August 13, 2014 3:43 PM
To: 'Lime, Steve D (MNIT)'; 'mapserver-users at lists.osgeo.org'; 'mapserver-dev at lists.osgeo.org'
Subject: RE: Multiline string error

Steve,

We will add some debug to the OGR read later today or tomorrow.

How do I turn on the maximum debug?

Thanks

Ian

-----Original Message-----
From: Ian Walberg 
Sent: Wednesday, August 13, 2014 3:20 PM
To: 'Lime, Steve D (MNIT)'; mapserver-users at lists.osgeo.org; mapserver-dev at lists.osgeo.org
Subject: RE: Multiline string error

Steve,

OGR connection to SQLITE DB.

Regards

Ian

-----Original Message-----
From: Lime, Steve D (MNIT) [mailto:Steve.Lime at state.mn.us] 
Sent: Wednesday, August 13, 2014 8:46 AM
To: Ian Walberg; mapserver-users at lists.osgeo.org; mapserver-dev at lists.osgeo.org
Subject: RE: Multiline string error

How are you submitting the WKT to MapServer? Is it via MapScript, via inline features or some other mechanism?

Steve

-----Original Message-----
From: mapserver-dev-bounces at lists.osgeo.org [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Ian Walberg
Sent: Wednesday, August 13, 2014 10:01 AM
To: mapserver-users at lists.osgeo.org; mapserver-dev at lists.osgeo.org
Subject: Re: [mapserver-dev] Multiline string error

Devs,

The MULTILINE string below gives the following in mapprimitive.c and then as the first shape has 0 points the msSmallMalloc fails as the size passed to it is -8.

[Wed Aug 13 07:55:10 2014].618971 Shape contains 2 parts.
[Wed Aug 13 07:55:10 2014].618987       Part 0 contains 0 points.
[Wed Aug 13 07:55:10 2014].619001       Part 1 contains 3 points.
[Wed Aug 13 07:55:10 2014].619016               0: (882.383078, 511.333078)
[Wed Aug 13 07:55:10 2014].619032               1: (825.909890, 260.048026)
[Wed Aug 13 07:55:10 2014].619049               2: (882.383078, 511.333078)

Any clues what we should look at next?

This same source data file and layer work with older versions of mapserver 6.

Thanks

Ian

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ian Walberg
Sent: Monday, August 11, 2014 3:53 PM
To: mapserver-users at lists.osgeo.org; mapserver-dev at lists.osgeo.org
Subject: [mapserver-users] Multiline string error

Folks,

With Mapserver 6.5-dev from git and GDAL 1.9.1 the line below either does not draw or causes mapserv to error and not render an image without an error message.

MULTILINESTRING ((-110.220980 38.982832, -110.220887 38.982863, -110.221614 38.982708, -110.220980 38.982832),(-110.220980 38.982832, -110.220887 38.982863, -110.221614 38.982708, -110.220980 38.982832))

Changing the final digit on either of the first or last lats/longs and it draws ok!

Any ideas?

Thanks

Ian

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-dev mailing list
mapserver-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-dev


More information about the mapserver-dev mailing list