<div dir="ltr"><div><div><div><div>Jonas, <br><br>I ran heaptrc AND Dr memory and there are definitely some issues. I posted a separate thread to focus on baseline Dr Memory errors for lazarus/freepascal<br><br></div>One of my problems is the stack reported by the results.txt file shows the same code point: rpzstring.pas:193.<br>
<br></div>Any ideas on how to improve the reported code location. I can promise you that fpc_ansistr_setlength is not located in rpzstring.pas. It's in the RTL!!!<br><br></div>Project compiled with CMEM, Dwarf2 (-gw2) and requested by Dr Memory docs.<br>
<br></div>Cheers,<br><br>marco<br><div><div><div><div><br><br>Error #62: POSSIBLE LEAK 26 direct bytes 0x05183f70-0x05183f8a + 0 indirect bytes<br># 0 replace_malloc [d:\drmemory_package\common\alloc_replace.c:2320]<br>
# 1 CMEM_CGETMEM$LONGWORD$$POINTER [../rpzlib/rpzstring.pas:193]<br># 2 SYSTEM_GETMEM$POINTER$LONGWORD [../rpzlib/rpzstring.pas:193]<br>
# 3 fpc_ansistr_setlength [../rpzlib/rpzstring.pas:193]<br># 4 LAZUTF8_UTF16TOUTF8$UNICODESTRING$$ANSISTRING [../rpzlib/rpzstring.pas:193]<br>
# 5 LCLPROC_UTF16TOUTF8$UTF16STRING$$ANSISTRING [../rpzlib/rpzstring.pas:193]<br># 6 WIN32PROC_GETCONTROLTEXT$LONGWORD$$ANSISTRING [../rpzlib/rpzstring.pas:193]<br>
# 7 WIN32WSSTDCTRLS_TWIN32WSCUSTOMEDIT_$__GETTEXT$TWINCONTROL$ANSISTRING$$BOOLEAN [../rpzlib/rpzstring.pas:193]<br># 8 CONTROLS_TWINCONTROL_$__REALGETTEXT$$TTRANSLATESTRING [../rpzlib/rpzstring.pas:193]<br>
# 9 CONTROLS_TCONTROL_$__GETTEXT$$TTRANSLATESTRING [../rpzlib/rpzstring.pas:193]<br>#10 MAINFM_TFMMAIN_$__RXLISTENCLICK$TOBJECT [C:/pdev/rpztestudphv//mainfm.pas:94]<br>
#11 CONTROLS_TCONTROL_$__CLICK [../rpzlib/rpzstring.pas:193]<br><br><br><br><br></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 9, 2014 at 3:34 PM, Jonas Maebe <span dir="ltr"><<a href="mailto:jonas.maebe@elis.ugent.be" target="_blank">jonas.maebe@elis.ugent.be</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 09/08/14 20:06, mark diener wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So with the memory manager changed out, the exception now occurs in the<br>
GUI main thread instead of the TThread and clearly the<br>
fpc_ansistr_decr_ref function is failing.<br>
<br>
The lines in question in .\include\application.inc:1079 are as follows:<br>
<br>
// call event<br>
Event(Data);<br>
<br>
This Event variable is a pointer to a function with a single pointer to<br>
integer argument.<br>
<br>
Anybody got some ideas about this?<br>
</blockquote>
<br></div>
Your program probably contains a memory corruption bug that messes up the heap state. To find it, you can try enabling range and class type checking (-CRr) and enabling heaptrc (-gh), or using the C memory manager and running the program through Dr Memory (<a href="http://www.drmemory.org" target="_blank">http://www.drmemory.org</a> )<br>
<br>
<br>
Jonas<br>
______________________________<u></u>_________________<br>
fpc-devel maillist - <a href="mailto:fpc-devel@lists.freepascal.org" target="_blank">fpc-devel@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel" target="_blank">http://lists.freepascal.org/<u></u>cgi-bin/mailman/listinfo/fpc-<u></u>devel</a><br>
</blockquote></div><br></div>