<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY>
<DIV> </DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=fr dir=ltr align=left><FONT face=Tahoma
size=2>-----Message d'origine-----<BR><B>De :</B> John Repucci
[mailto:john.repucci@gmail.com] <BR><B>Envoyé :</B> dimanche 4 septembre
2011 03:47<BR><B>À :</B>
lazarus@lists.lazarus.freepascal.org<BR><B>Objet :</B> [Lazarus] App Seg
Faults when -gh is unchecked<BR><BR></FONT></DIV>
<DIV>I've had this happen to me twice now.<BR><BR>I'm developing the app in
the Lazarus IDE and all is well. Then I uncheck the -gh option ("Use
Heaptrc Unit"), run my program and I get a Segmentation Fault before any of
the program shows up. This happens both within the IDE (via F9) and when
I run the program outside of the IDE.<BR><BR>When I remove heaptrc from my
uses clause AND uncheck -gh, all is well.<BR><BR>Thoughts? Is this a bug
which I should report?<BR><BR><SPAN class=765105805-04092011><FONT face=Arial
color=#0000ff size=2> </FONT></SPAN></DIV></BLOCKQUOTE>
<DIV><SPAN class=765105805-04092011><FONT face=Arial color=#0000ff size=2>If
understand you correctly, the app crashes when heaptrc is in the uses clause and
-gh unchecked. Where do you use heaptrc ? The heaptrc unit, as all memory
managers, should be the first unit in the lpr. The -gh compiler options is doing
exactly that. Manually inserting heaptrc is discouraged.</FONT></SPAN></DIV>
<DIV><SPAN class=765105805-04092011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=765105805-04092011><FONT face=Arial color=#0000ff size=2>The
stack trace indicates that a memory block is reallocated that was allocated
before heaptrc was loaded and heaptrc doesn't find the crc for that
block.</FONT></SPAN></DIV>
<DIV><SPAN class=765105805-04092011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=765105805-04092011><FONT face=Arial color=#0000ff
size=2>Ludo</FONT></SPAN></DIV></BODY></HTML>