<br><font size=2 face="sans-serif">Hallo List</font>
<br>
<br><font size=2 face="sans-serif">We are using MapScript/Java inside Tomcat.</font>
<br><font size=2 face="sans-serif">We encountered a crash in webObj.cloneMap()
when </font>
<br><font size=2 face="sans-serif">a PROCESSING-statement was used inside
a Layer-Block.</font>
<br>
<br><font size=3>My impression is, that there is a bug in mapcopy.c/msCopyLayer
(?)</font>
<br>
<br><font size=3>I think: After the line</font>
<br><font size=3>&nbsp; &nbsp; &nbsp; MS_COPYSTELEM(numprocessing);</font>
<br><font size=3>and before the loop</font>
<br><font size=3>&nbsp; &nbsp; &nbsp; for (i = 0; i &lt; dst-&gt;numprocessing;
i++) {...}</font>
<br><font size=3>a memory-allocation for dst-&gt;processing is missing.</font>
<br>
<br><font size=3>I made a change:</font>
<br><font size=3>&nbsp; MS_COPYSTELEM(numprocessing); &nbsp;//OLD</font>
<br><font size=3>&nbsp; // Allocating an initializing memory for processing-array.</font>
<br><font size=3>&nbsp; // Must be dst-&gt;numprocessing+1 to be 0-terminated.</font>
<br><font size=3>&nbsp; dst-&gt;processing = numprocessing ? </font>
<br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (char*) calloc(dst-&gt;numprocessing+1,sizeof(char*))
: </font>
<br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0;</font>
<br><font size=3>&nbsp; for (i = 0; i &lt; dst-&gt;numprocessing; i++)
{ &nbsp; //OLD</font>
<br><font size=3>&nbsp; ...</font>
<br>
<br><font size=3>I hope this is helpful. Greetings</font>
<br><font size=3>Benedikt Rothe</font>