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

Luca Olivetti luca at wetron.es
Wed Dec 31 16:47:58 CET 2014


Hello,

I was having a random SIGSEV ("random" meaning it didn't happen every
time) in an OnClick event, the sigsev being always on the MouseUp
instruction in TControl.DoMouseUp (include/control.inc). It happened
both in windows and linux.
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.
Now I use Application.QueueAsyncCall to fire the method after the event
has been executed and the SIGSEV seems to be gone, however, since it was
random, it may still reappear, unless the above hypothesis is true.
Is it possible that destroying the control was the cause of the SIGSEV?

TIA

Bye
-- 
Luca Olivetti
Wetron Automation Technology http://www.wetron.es
Tel. +34 935883004  Fax +34 935883007




More information about the Lazarus mailing list