Opened 19 years ago
Closed 19 years ago
#1559 closed defect (fixed)
pdf segfault on annotation layer when no style is set
Reported by: | Owned by: | mapserverbugs | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Output-PDF | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
from the example given a few days ago on the mailing list: LAYER NAME 'copyright' TYPE ANNOTATION STATUS DEFAULT TRANSFORM FALSE # coordinates are in pixels FEATURE POINTS 10 10 END END CLASS LABEL SIZE MEDIUM COLOR 0 0 0 OUTLINECOLOR 255 255 255 POSITION CR END TEXT 'Copyright 2005' END END when outputype is pdf, we get a segfault here on the call to msGetMarkerSize(&map->symbolset, &(cachePtr->styles[0]), &marker_width, &marker_height, layerPtr->scalefactor) in the function int msDrawLabelCachePDF(imageObj *image, mapObj *map) (sorry for not giving a patch directly, I'm waiting for the patch to bug 492 to be commited so I can get back in sync ;-) solution is to add a test for cachePtr->numstyles so this becomes /* TO DO: at the moment only checks the bottom style, perhaps should check all of them */ if(cachePtr->numstyles==0) { marker_width = marker_height = 1; } else if(msGetMarkerSize(&map->symbolset, &(cachePtr->styles[0]), &marker_width, &marker_height, layerPtr->scalefactor) != MS_SUCCESS) return(-1);
Note:
See TracTickets
for help on using tickets.