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

Luca Olivetti luca at wetron.es
Wed Dec 31 20:45:19 CET 2014


El 31/12/14 a les 19:26, Bart ha escrit:
> 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.

OK, thank you

> 
>> 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)

Well, I'm doing a lot of other things in the method, so QueueAsyncCall
is more fitting.

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

Phew, I'm relieved. You know, the system is going to go live next week.
I simulated around six months worth of operating cycles in a virtual
machine, but this problem appeared in the real hardware with a
configuration form (which isn't going to be used much but still has to
work) that never gave problems during previous testing.


Bye, and happy new year!
-- 
Luca Olivetti
Wetron Automation Technology http://www.wetron.es
Tel. +34 935883004  Fax +34 935883007




More information about the Lazarus mailing list