Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2915 closed defect (fixed)

SLD: generate sld crashes when large class/layer names are used

Reported by: assefa Owned by: assefa
Priority: normal Milestone: 5.4 release
Component: WMS Server Version: unspecified
Severity: normal Keywords:
Cc: stephan.holl@…

Description

Was using a static buffer but run into class name > 100 chars.

Modifying this to use dynamically allocated buffer.

Change History (6)

comment:1 by assefa, 15 years ago

Cc: stephan.holl@… added
Status: newassigned

fix committed in trunk r8635.

stephan,

This is fixed in mapserver-svn and would be available for 5.4. If possible, I would appreciate if you can build from svn and test again.

If you need, I can port the change to the 5.2.x branch but since we do not intend to release the 5.2.x series, I rather not do it and concentrate on the 5.4.x releases

Thanks

comment:2 by sholl, 15 years ago

OK, compiled, but it still segfaults later on (layer

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7faa6c0 (LWP 27626)]
0x00810069 in FLTArraysAnd ()
from /home/gis2/intevation/wms-migration/apps/lib/python2.4/site-packages/_mapscript.so
(gdb) bt #0  0x00810069 in FLTArraysAnd ()
from /home/gis2/intevation/wms-migration/apps/lib/python2.4/site-packages/_mapscript.so
Cannot access memory at address 0x6666666a

Also, the resulting SLDs are invalid, since the have the Tag NamedLayer doubled now:

[gis2@gis2 wms-migration]$ grep -irn NamedLayer slds/*|head -9
slds/Amt_10132_Grenzen_Kompakt.sld:2:<NamedLayer>
slds/Amt_10132_Grenzen_Kompakt.sld:3:<NamedLayer>
slds/Amt_10132_Grenzen_Kompakt.sld:28:</NamedLayer>
slds/Amt_Beschriftung.sld:2:<NamedLayer>
slds/Amt_Beschriftung.sld:3:<NamedLayer>
slds/Amt_Beschriftung.sld:29:</NamedLayer>
slds/Amt_Kompakt_Beschriftung.sld:2:<NamedLayer>
slds/Amt_Kompakt_Beschriftung.sld:3:<NamedLayer>
slds/Amt_Kompakt_Beschriftung.sld:30:</NamedLayer>

xmllint complains now.

Could you look into this again please?

comment:3 by assefa, 15 years ago

Stepahn

committed the change in trunk re the NamedLayer (r8646)

correct couple of non validating things r8647.

Could not reproduce the crash though.

I did generate an sld on you entire map (I had to remove all symbols though).

Is it possible to test these changes (from the trunk) and also identify which layer.

crashes.

I will also add these changes to the 5.4 branch so It will be available for next beta or release candidate

comment:4 by assefa, 15 years ago

last changes were also added in 5.4 branch (r8648)

comment:5 by sholl, 15 years ago

Resolution: fixed
Status: assignedclosed

Assefa,

I have tested your commits with trunk (from r8650) and it seems that everything works smoothly now. I also did not receive any crashes when writing the SLDs from my MapFile

Thanks very much for your quick and cooperative help!

comment:6 by assefa, 15 years ago

Thx a lot for testing.

Note: See TracTickets for help on using tickets.