[Lazarus] Deleting a control in its OnClick event can cause a SIGSEV?

Bart bartjunk64 at gmail.com
Wed Dec 31 19:26:19 CET 2014


On 12/31/14, Luca Olivetti <luca at wetron.es> wrote:

> It turns out that in the OnClick event I was calling a method that freed
> the control that generated the OnClick, so I supposed that was the cause
> of the sigsev.

Probably you are right.
Been there, done that.

> Now I use Application.QueueAsyncCall to fire the method after the event

You can use Application.ReleaseComponent()
(Was offered as a solution to me when I had the same problem)

> Is it possible that destroying the control was the cause of the SIGSEV?

Yes

Bart




More information about the Lazarus mailing list