Opened 18 years ago
Closed 18 years ago
#1654 closed defect (wontfix)
Antialias causes segmentation fault
Reported by: | Owned by: | sdlime | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapServer CGI | Version: | 4.8 |
Severity: | normal | Keywords: | |
Cc: |
Description
Attachments (1)
Change History (4)
by , 18 years ago
comment:1 by , 18 years ago
Hi all, I keep running into a "segmentation fault" when using antialiased lines. Attached to the report is a minimal test case including test data (streets) and a mapfile. After some experiments I found that the segfault may be related to something particular in the underlying shapefile data. The mapfile includes a different map extent where the segfault does not happen. Also a funny thing is that the segfault is not triggered if the line width is set to 2. The bug occurs both in mapserver CGI and PHP mapscript (4.8.1), so I expect it to be related to mapserver core and/or side libraries. My main context: - mapserver 4.8.1 (compiled from Mapserver site sources) - gdal/ogr 1.3.1 (GDAL site sources) - libgd2 2.0.33 (mandrake RPMs) (Sorry for the fragmented report, this is my first time here.) Mapserver is great, thanks so much for your help. Mik
comment:2 by , 18 years ago
GD only support "true" antialiasing with width=1 lines. With width > 1 fuzzy brushes are used create the antialiasing affect. Bottom line is that there is a problem (a big problem) in GD itself where bounds checking is not done (aa lines only). The fix is simple, but must be applied to GD itself, not MapServer. I'll post in this bug later today. Steve
comment:3 by , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
In gd.c, gdImageSetAAPixelColor() change: int dr,dg,db,p,r,g,b; p = gdImageGetPixel(im,x,y); to: int dr,dg,db,p,r,g,b; if (!gdImageBoundsSafeMacro (im, x, y)) return; p = gdImageGetPixel(im,x,y); It's a one line change to gd.c. Marking as WONTFIX for now... Steve
Note:
See TracTickets
for help on using tickets.
Mapfile and data to reproduce bug