I got exactly
that bug with Xubuntu 18.04 & Lazarus 1.8.2. It occurs on Lazarus IDE itself and also compiled programs, but not on other programs on my pcs.
On 16.04 I didn't had this bug, but I can't remember my Lazarusversion (was 1.8something).
Has the bug reoccured or is it just my systems?