<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><br><div>Martin,</div><div><br></div><div> I use a <a href="http://blog.djsystem.com.br/">Tab Style interface</a>... (TDI)... so, I change the Owner/Parent in this function:</div><div><br></div><div><br></div><div>procedure TFormDJ_Main.ShowFormInPage(const AForm : TForm ;<br> const ImageIndex : Integer) ;<br>var<br> APage : TFormPage ;<br>begin<br> nbForms.Visible := True ; { Shows NoteBook }<br> FecharAba1.Enabled := True ; { Habilita Opão no Menu Principal }<br>{$IFDEF MSWINDOWS}<br> btFechaAba.Visible := True ; { Shows Close Buttom on TopRight }<br>{$ENDIF}<br><br> //Create a new Page<br> APage :=
TFormPage.Create(nbForms) ; // This will call TFormPage.SetAForm<br> APage.ImageIndex := ImageIndex;<br> APage.AForm := AForm;<br><br> //activate the Page<br> nbForms.ActivePage := APage;<br>end;<br></div><div><br></div><div><br></div><div>procedure TFormPage.SetAForm(const AValue : TForm) ;<br>begin<br> fsAForm := AValue ;<br><br> Caption := fsAForm.Caption;<br> Color := fsAForm.Color;<br><br> fsAForm.BorderStyle := bsNone ; <br> fsAForm.Align := alClient ; <br><br> // Change Aform Owner and Parent<br> fsAForm.Parent := Self;<br> ChangeOwner(fsAForm, Self);<br> // AForm.FreeNotification(APage);<br><br> fsAForm.Visible := True ;<br>end;</div><div><br></div><div>Thanks for your help<br></div><div><br></div><div><span style=""><div
dir="ltr"><div>[]s Daniel<br>
<br>Conheça o <a rel="nofollow" href="http://acbr.sourceforge.net/" target="_blank">Projeto ACBr - Automaçao Comercial Brasil</a><br><a rel="nofollow" href="http://www.djsystem.com.br/" target="_blank"><span style="font-weight:bold">DJSystem</span> a Loja Patrocinadora do ACBr</a><br><br></div>
</div></span><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <div style="font-family: Courier New, courier, monaco, monospace, sans-serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight:bold;">De:</span></b> Martin <lazarus@mfriebe.de><br> <b><span style="font-weight: bold;">Para:</span></b> Daniel Simoes de Ameida <dopidaniel@yahoo.com.br>; Lazarus mailing list <lazarus@lists.lazarus.freepascal.org> <br> <b><span style="font-weight: bold;">Enviadas:</span></b> Sexta-feira, 30 de Março de 2012 12:55<br> <b><span style="font-weight: bold;">Assunto:</span></b> Re: [Lazarus] SIGSEGV with Debug only<br> </font> </div> <br><div id="yiv1056075723">
<div>
On 30/03/2012 16:11, Daniel Simoes de Ameida wrote:
<blockquote type="cite">
<div style="color:rgb(0, 0, 0);background-color:rgb(255, 255,
255);font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt;">
<div>Bingo...<br>
<br>
Is the HeapTrace.. I just removed HeapTrace Unit from Linking
and the problem has gone... <br>
</div>
</div>
</blockquote>
<br>
No it has not gone.<br>
<br>
It is only hidden. That means you lowered the likelihood of it
happening.<br>
<br>
The code still accesses an object that does not exist. That means
random memory.<br>
Without heaptrc, you simple got better likelihood, that this random
memory contains data, that does not cause a crash. <br>
But the bug is still there. It may still crash...<br>
<br>
Since it happens at form close, maybe you freed some component in
your code?<br>
Changed owner of a component (moving to other form)?<br>
</div>
</div><br><br> </div> </div> </blockquote></div> </div></body></html>