<div dir="ltr">Hi Devs,<div><br></div><div>I got a crash log which shows that the access violation is happening in the following location:</div><div><br></div><div><pre style="white-space:pre-wrap"><i style=""><font color="#ff0000">mapserver!yylex+0x1b5 [e:\builds-t1\src\mapserver-intramaps\vc15x64\mapparser.y @ 858]
                mapserver!yyparse+0x247 [e:\home\even\mapserver\mapserver\mapparser.c @ 1461]
                mapserver!msEvalContext+0x178 [e:\builds-t1\src\mapserver-intramaps\maputil.c @ 442]
                mapserver!msDrawVectorLayer+0xb0 [e:\builds-t1\src\mapserver-intramaps\mapdraw.c @ 918]
                mapserver!msDrawLayer+0x3a3 [e:\builds-t1\src\mapserver-intramaps\mapdraw.c @ 813]
                mapserver!msDrawMap+0x415 [e:\builds-t1\src\mapserver-intramaps\mapdraw.c @ 403]
                mapscript!CSharp_mapObj_draw+0xd</font></i></pre>By looking into the corresponding code, the problem has happened in the following location in yylex():<pre style="white-space:pre-wrap"><i style=""><font color="#ff0000"> case MS_TOKEN_BINDING_INTEGER:<br>    token = NUMBER;<br> ---->   (*lvalp).dblval = atof(p->shape->values[p->expr->curtoken->tokenval.bindval.index]);<br>    break;</font></i><font color="#000000"><br></font></pre>In maputil.c the call stack location is here (msEvalContext):<pre style="white-space:pre-wrap"><i style=""><font color="#ff0000">msTokenizeExpression(&e, NULL, NULL);<br><br>  p.shape = NULL;<br>  p.expr = &e;<br>  p.expr->curtoken = p.expr->tokens; /* reset */<br>  p.type = MS_PARSE_TYPE_BOOLEAN;<br><br>----->  status = yyparse(&p);<br><br>  msFreeExpression(&e);</font></i><font color="#000000"><br></font></pre>And in mapdraw.c<pre style="white-space:pre-wrap"><i style=""><font color="#ff0000"> /* TODO TBT: draw as raster layer in vector renderers */<br><br>----->  annotate = msEvalContext(map, layer, layer->labelrequires);<br>  if(map->scaledenom > 0) {<br>    if((layer->labelmaxscaledenom != -1) && (map->scaledenom >= layer->labelmaxscaledenom)) annotate = MS_FALSE;<br>    if((layer->labelminscaledenom != -1) && (map->scaledenom < layer->labelminscaledenom)) annotate = MS_FALSE;<br>  }</font></i><font color="#000000"><br></font></pre>I'm not sure if the LABELREQUIRES option supports attribute binding (probably not) and in that case the p->expr->curtoken->tokenval.bindval.index would probably have undefined value. I don't have any information about the corresponding LABELREQUIRES expression , but if I assume it doesn't contain attribute binding, then this crash might probably happen due to a missing parser lock around <i style="color:rgb(0,0,0);white-space:pre-wrap">yyparse(&p). </i>What do you think about the problem and how could we work around this?</div><div><br></div><div>Thanks,</div><div><br></div><div>Tamas<br><pre style="color:rgb(0,0,0);white-space:pre-wrap"><br></pre></div></div>