<html>
<head>
<meta content="text/html; charset=UTF-8"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi,<br>
<br>
I have such error: the GDAL compiled with VS2010-VS2013 in s57
driver loose all additional fields values. But the same code
compiled with gcc or previous VS works fine.<br>
I found the root of problems here
(ogr\ogrsf_frmts\s57\s57reader.cpp:932):<br>
<blockquote>const char *pszAcronym =
poRegistrar->GetAttrAcronym(nAttrId);<br>
iField =
poFeature->GetDefnRef()->GetFieldIndex(pszAcronym);<br>
<br>
</blockquote>
The pszAcronym always empty.<br>
<br>
The problem comes from this function
(ogr\ogrsf_frmts\s57\s57.h:140):<br>
<blockquote>const char *GetAttrAcronym( int i )<br>
{ return GetAttrInfo(i) == NULL ? NULL :
aoAttrInfos[i]->osAcronym; }<br>
</blockquote>
It seems to me that during execution this function I have <code>situation
when</code><code style="margin: 0px; padding: 1px 5px; border:
0px; font-size: 14px; vertical-align: baseline;
background-color: rgb(238, 238, 238); font-family: Consolas,
Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace,
serif; color: rgb(0, 0, 0); font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: 18px; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-position: initial initial; background-repeat: initial
initial;">c_str()</code><span style="color: rgb(0, 0, 0);
font-family: Arial, 'Liberation Sans', 'DejaVu Sans',
sans-serif; font-size: 14px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: 18px; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); display: inline
!important; float: none;"><span class="Apple-converted-space"> </span>result
becomes invalid (the<span class="Apple-converted-space"> </span></span><code
style="margin: 0px; padding: 1px 5px; border: 0px; font-size:
14px; vertical-align: baseline; background-color: rgb(238, 238,
238); font-family: Consolas, Menlo, Monaco, 'Lucida Console',
'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans
Mono', 'Courier New', monospace, serif; color: rgb(0, 0, 0);
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 18px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-position: initial
initial; background-repeat: initial initial;">std::string</code><span
style="color: rgb(0, 0, 0); font-family: Arial, 'Liberation
Sans', 'DejaVu Sans', sans-serif; font-size: 14px; font-style:
normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 18px; orphans: auto;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); display: inline !important; float: none;"><span
class="Apple-converted-space"> </span>is destroyed or a
non-const member function of the string is called).<span
class="Apple-converted-space"> </span></span><br>
<br>
If I change function <br>
<blockquote>const char *GetAttrAcronym( int i )<br>
{ return GetAttrInfo(i) == NULL ? NULL :
aoAttrInfos[i]->osAcronym.c_str(); }<br>
</blockquote>
the problem gone.<br>
<br>
So I need some confirmation/verification my ideas.<br>
If I'm right, I can make changes to s57 driver. <br>
<pre class="moz-signature" cols="72">Best regards,
Dmitry
</pre>
</div>
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
<tr>
<td style='border:none;padding:0px 15px 0px 8px'>
<a href="http://www.avast.com/">
<img border=0 src="http://static.avast.com/emails/avast-mail-stamp.png" />
</a>
</td>
<td>
<p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
Это сообщение свободно от вирусов и вредоносного ПО благодаря <a href="http://www.avast.com/">avast! Antivirus</a> защита активна.
</p>
</td>
</tr>
</table>
<br />
</body>
</html>