<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META name=GENERATOR content="MSHTML 9.00.8112.16470"></HEAD>
<BODY>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013>Hi,</SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013></SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN class=226195519-15032013>I've get the
following error and I don't know how to solve it:</SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial>*** glibc detected *** ./rfm: free(): invalid
pointer: 0xb6d0a01c ***</FONT>
</DIV>
<DIV><FONT size=2 face=Arial></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013>code-pieces:</SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013>##############################################</SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013>type </SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN class=226195519-15032013></SPAN></FONT><FONT
size=2 face=Arial><SPAN class=226195519-15032013>T_IniFileDesc =
record<BR>
inifilbuf :
TStringList;<BR>
caching,<BR>
blockchange,<BR>
inifildirty,<BR>
inifilavail :
boolean;<BR>
inifilename : string;<BR>
end; </SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013></SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013>var IniFileDescriptor:T_IniFileDesc;
</SPAN></FONT><FONT size=2 face=Arial><SPAN
class=226195519-15032013>name_idx:longint;</SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013>...</SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013></SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN class=226195519-15032013>with
IniFileDescriptor do</SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013>begin</SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN class=226195519-15032013>
inifilbuf:=TStringList.create;</SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN class=226195519-15032013> for
name_idx:= 1 to 220 inifilbuf.add('something');</SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013> name_idx:=5;</SPAN></FONT>
</DIV>
<DIV><FONT face=Arial><FONT size=2> inifilbuf.insert<SPAN
class=226195519-15032013> </SPAN>(name_idx-1,<SPAN class=226195519-15032013>
'someOTHERstring'</SPAN>); <BR>
inifilbuf.delete(name_idx);
// <- <SPAN class=226195519-15032013>this creates the glibc error
</SPAN></FONT></FONT>
</DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=226195519-15032013>end;</SPAN></FONT></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013>##############################################</SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013></SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN class=226195519-15032013>I'm runnig fpc
on:</SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN class=226195519-15032013>Free Pascal Compiler
version 2.6.0-7+rpi1 [2013/01/23] for arm<BR>
Copyright (c) 1993-2011 by Florian
Klaempfl and others<BR>
Target OS: Linux for ARMHF<BR>
</SPAN></FONT><FONT size=2
face=Arial><SPAN class=226195519-15032013></SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN class=226195519-15032013>uname -a gives:
Linux raspberrypi 3.6.11+ #393 PREEMPT Fri Mar 8 16:36:28 GMT 2013 armv6l
GNU/Linux<BR>
</DIV></SPAN></FONT>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013></SPAN></FONT>
</DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=226195519-15032013> </SPAN></FONT>
</DIV></BODY></HTML>