<DIV>Hi, Frank, welcome to China. I'd like to see you in Beijing, i'm sure that you're the joss of many young students, hehe.</DIV>
<DIV> I have found the reason why failed to deal styles with ver1.5.2. Compared with ver1.4.1, CPLSPrintf() is replaced the CPLString().Printf() , and i could trace the error to CPLString().Printf() every time debug. It might not allocate memory for the dest string in CPLString().Printf(). Of cource, if i still use CPLSPrintf(), no error occurs. Is this a bug in whole OGRFeatureStyle.cpp in ver1.5.2? </DIV>
<DIV style="FONT-SIZE: 12px; COLOR: #909090; FONT-FAMILY: Arial Narrow">------------------</DIV>
<DIV>
<DIV>To the world you're little, but to a person you're the world.</DIV>
<DIV> Chen Xuexia</DIV></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 12px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; FONT-FAMILY: Arial Narrow">------------------ Original ------------------</DIV>
<DIV style="FONT-SIZE: 12px">
<DIV id=menu_sender><B>From: </B> "Frank Warmerdam"<warmerdam@pobox.com>;</DIV>
<DIV><B>Date: </B> Mon, Aug 18, 2008 11:12 PM</DIV>
<DIV><B>To: </B> "wow"<27949218@qq.com>; </DIV>
<DIV><B>Cc: </B> "gdal-dev"<gdal-dev@lists.osgeo.org>; </DIV>
<DIV><B>Subject: </B> Re: [gdal-dev] OGRFeatureStyle update from version1.4.1 to 1.5.2;</DIV></DIV>
<DIV> </DIV>
<DIV style="FONT-WEIGHT: normal">On 8/17/08, wow <27949218@qq.com> wrote:<BR>> Hi,<BR>> When i tried to update my whole program from ver1.4.1 to 1.5.2, all worked<BR>> well except the OGRFeatureStyle module. The function<BR>> OGRStyleMgr::AddStyle() couldn't write the provided style<BR>> name and style string right with ver1.5.2, but could run smoothly with<BR>> version 1.4.1.<BR>> My code :<BR><BR>Chen,<BR><BR>There has been some work on the style string parser since 1.4 and<BR>I suspect it has been subtly broken for your case in some fashion.<BR>Could you file a ticket? Make sure you provide any additional<BR>details we might need, like the format you are trying to write to.<BR><BR>Ideally a single small self contained program demonstrating the<BR>problem would be best.<BR><BR>Best regards,<BR>-- <BR>---------------------------------------+--------------------------------------<BR>I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com<BR>light and sound - activate the windows | http://pobox.com/~warmerdam<BR>and watch the world go round - Rush | Geospatial Programmer for Rent<BR></DIV>