[Lazarus] SIGSEGV with Debug only
Martin
lazarus at mfriebe.de
Fri Mar 30 22:27:06 CEST 2012
On 30/03/2012 20:54, Daniel Simoes de Ameida wrote:
> Martin,
>
> Even doesn't changing the Owner, the problem still..
>
> O forgot to mention the content of ChangeOwner function
>
> procedure ChangeOwner(AComponente, NewOwner: TComponent);
> begin
> AComponente.Owner.RemoveComponent(AComponente);
> NewOwner.InsertComponent(AComponente);
> end;
>
> I suppose this function will handle all Notification changes, isn't ?
>
That is not that easy to answer. That depends on who owns what... Maybe
even which classes are involved. To answer that I would have to read
through some of the RTL/LCL rcode myself.
It is not even sure that the bug is related to this. Though with the bug
in place, I would avoid changing owners. It is possible with
workarounds, but I can't foresee all the pitfalls.
I had a quick look at the LCL code. Anchors to not seem to use FreeNotify
When the app crashes, use the debugger, open the stack and make sure the
frame selected is pointing to the source you posted (it may already be)
Then evaluate self and/or self.fname to see which components refers to
the missing anchor.
That should help you find out which control the anchor pointed to.
Maybe that holds some clue.
Then you can debug again, and set breakpoints (in TControl.Destroy / wit
condition on FName), and trying to find when the other control gets
destroyed (if that is the problem, there are other possibilities...)
Sorry this answer may appear a bit vague. But tracking that kind of
issue can be very hard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120330/2e81277e/attachment-0003.html>
More information about the Lazarus
mailing list