Opened 17 years ago
Closed 17 years ago
#2227 closed defect (fixed)
AGG:incorrect lookup of symbol in symbolset
Reported by: | cph | Owned by: | tbonfort |
---|---|---|---|
Priority: | normal | Milestone: | 5.0 release |
Component: | AGG | Version: | unspecified |
Severity: | critical | Keywords: | |
Cc: | hobu, sdlime |
Description
when using dynamic symbols there is a lookup in the symbolset but the symbol should be looked up in the mapfile.
This problem only happens with the AGG driver.
Attachments (1)
Change History (13)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
I use PCL to generate the mapserver object hierarchy. The attached works for the GD driver but not for the AGG driver. Note that if you change the line 341 from "SYMBOL 1" to "SYMBOL 0" it does not crash.
comment:4 by , 17 years ago
am I missing something or does symbol 1 not exist?
why are you talking about inline symbols? there are no inline symbol definitions here
"works with gd": what kind of output do you get
"crash with agg": segmentation fault, or wrong style applied, or nothing drawn ?
comment:6 by , 17 years ago
tbonfort: as I mentioned I use mapserver only thru PCL, not generally using a mapfile definition directly. Symbol 1, does indeed not exist in the mapfile provided, but this is because that symbol is defined by PCL and added to the mapfile object.
When I change line 104 from "0" to "1", the AGG driver does not cause mapserver to segfault. When the value is "0" there is a segmentation fault in mapagg.cpp at line : 1414
comment:7 by , 17 years ago
ok... found it. GD just skips drawing when symbol>numsymbols will fix in next commit
comment:9 by , 17 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
When I have "SYMBOL 1" I still get a core dump in mapagg.cpp line 1418
1417: symbolObj *symbol = symbolset->symbol[style->symbol];; 1418: if(!MS_VALID_COLOR(style->color) && MS_VALID_COLOR(style->outlinecolor) && symbol->type != MS_SYMBOL_PIXMAP)
as symbol is NULL
comment:10 by , 17 years ago
steve:
the test posing problem is
if(style->symbol > symbolset->numsymbols || style->symbol < 0) return; /* no such symbol, 0 is OK */
This is code that isn't specific to the agg renderer, so I wonder why there's no segfault with gd. changing the > to >= should fix this. I think the gd code should be updated too, but waiting on your comments on this as this is puzzling me.
comment:11 by , 17 years ago
You are correct. Amazing... I suspect it hasn't come up for a couple of reasons: 1) people use symbol names, 2) you get the crash, fix the mistake and move on. Only a situation like this one would cause the error. Anyway, I've fixed in both AGG and GD code. (r6586)
Steve
comment:12 by , 17 years ago
Milestone: | → 5.0 release |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
Closing...
please be more specific (layer type, symbol definition, style definition, etc) I cannot reproduce this here