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

Using POLYLINE_NO_CLIP with Inline feature can result in a seg fault #4676

Closed
aboudreault opened this Issue Jun 28, 2013 · 6 comments

Comments

Projects
None yet
3 participants
@aboudreault
Member

aboudreault commented Jun 28, 2013

When using a inline layer with the POLYLINE_NO_CLIP processing option, AGG crashes if the feature X and Y are completely outside the extend requested.

  • There is no bounds check in msLayerWhichShape for a inline layer.
  • Using POLYLINE_NO_CLIP disable the shape clipping, so the renderer tries to draw the shape.

Solution: For a INLINE layer, the searchrect will be stored in the layerinfo and a bounds check will be added in msLayerNextShape().

@ghost ghost assigned aboudreault Jun 28, 2013

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Jun 29, 2013

Member

Please provide a backtrace of the crash, or a testcase. I think this should be investigated at the AGG level rather than looking for a workaround.

Member

tbonfort commented Jun 29, 2013

Please provide a backtrace of the crash, or a testcase. I think this should be investigated at the AGG level rather than looking for a workaround.

@aboudreault

This comment has been minimized.

Show comment
Hide comment
@aboudreault

aboudreault Jun 29, 2013

Member

The solution is not a workaround, but something that is missing with inline layers. All other drivers already skip the feature that are not in the map extent (in WhichShape). Currently, all inline features are drawn, which is very not optimal. That said, I'll also attach a testcase to allow you to fix the agg crash.

Member

aboudreault commented Jun 29, 2013

The solution is not a workaround, but something that is missing with inline layers. All other drivers already skip the feature that are not in the map extent (in WhichShape). Currently, all inline features are drawn, which is very not optimal. That said, I'll also attach a testcase to allow you to fix the agg crash.

@aboudreault

This comment has been minimized.

Show comment
Hide comment
@aboudreault

aboudreault Jul 2, 2013

Member

I've committed the improvement in master. @tbonfort let me know if you have any objection if I backport this in branch-6-2. About the AGG crash, you can reproduce it by downloading the following mapfile and shp2img (checkout the revision before my patch):

http://dl.mapgears.com/ab-tmp/4676.map

# success
shp2img -m 4676.map -l layer1 -s 256 256 -o out.png 
# agg crash
shp2img -m 4676.map -l layer1 -e -85.25390625 30.2783203125 -85.2099609375 30.322265625 -s 256 256 -o out.png
Member

aboudreault commented Jul 2, 2013

I've committed the improvement in master. @tbonfort let me know if you have any objection if I backport this in branch-6-2. About the AGG crash, you can reproduce it by downloading the following mapfile and shp2img (checkout the revision before my patch):

http://dl.mapgears.com/ab-tmp/4676.map

# success
shp2img -m 4676.map -l layer1 -s 256 256 -o out.png 
# agg crash
shp2img -m 4676.map -l layer1 -e -85.25390625 30.2783203125 -85.2099609375 30.322265625 -s 256 256 -o out.png
@aboudreault

This comment has been minimized.

Show comment
Hide comment
@aboudreault

aboudreault Jul 2, 2013

Member

Will check the msautotest failure...

Member

aboudreault commented Jul 2, 2013

Will check the msautotest failure...

aboudreault pushed a commit that referenced this issue Jul 2, 2013

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Jul 23, 2013

Member

Keeping this one open as there clearly is an issue with AGG when shape coordinates are magnitudes out of image bounds. Low priority though, demilestoning.

Member

tbonfort commented Jul 23, 2013

Keeping this one open as there clearly is an issue with AGG when shape coordinates are magnitudes out of image bounds. Low priority though, demilestoning.

@ghost ghost assigned tbonfort Jul 23, 2013

@mapserver-bot

This comment has been minimized.

Show comment
Hide comment
@mapserver-bot

mapserver-bot Feb 23, 2016

This is an automated comment

This issue has been closed due to lack of activity. This doesn't mean the issue is invalid, it simply got no attention within the last year. Please reopen with missing/relevant information if still valid.

Typically, issues fall in this state for one of the following reasons:

  • Hard, impossible or not enough information to reproduce
  • Missing test case
  • Lack of a champion with interest and/or funding to address the issue

This is an automated comment

This issue has been closed due to lack of activity. This doesn't mean the issue is invalid, it simply got no attention within the last year. Please reopen with missing/relevant information if still valid.

Typically, issues fall in this state for one of the following reasons:

  • Hard, impossible or not enough information to reproduce
  • Missing test case
  • Lack of a champion with interest and/or funding to address the issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment