I had posted previously
https://forum.lazarus.freepascal.org/index.php/topic,50590.0.html about my problem, and marked it as solved, but further testing on Ubuntu 16.04 shows it again, and it's not bound to just the first debug of a new form. Will try to summarize my experience step by step, as it's quite simple. I'm using Lazarus 2.0.10, but the problem AFAIKT was the same with Lazarus 2.0.8.
Hit menu [Project / New project ...]
Select [Project / Application] from the [Create a new project] form.
Hit [OK], a new, empty form is shown.
Hit Ctrl+s, save the project and unit in a new folder (I use the [Create Folder] button top right, give the new folder the name 'x_hang', and name the project 'x_hang', the unit 'ux_hang'. This way, I have a this folder
$ cd test/lazarus/
$ ls -l x_hang
total 296
drwxrwxr-x 2 carlo carlo 4096 ago 2 13:48 backup
-rw-rw-r-- 1 carlo carlo 125 ago 2 13:48 ux_hang.lfm
-rw-rw-r-- 1 carlo carlo 236 ago 2 13:48 ux_hang.pas
-rw-rw-r-- 1 carlo carlo 137040 ago 2 13:48 x_hang.ico
-rw-rw-r-- 1 carlo carlo 1873 ago 2 13:48 x_hang.lpi
-rw-rw-r-- 1 carlo carlo 407 ago 2 13:48 x_hang.lpr
-rw-rw-r-- 1 carlo carlo 939 ago 2 13:48 x_hang.lps
-rw-rw-r-- 1 carlo carlo 139052 ago 2 13:48 x_hang.res
Now, in Lazarus hit F9. It does build and the empty form shows up. So far, so good.
I click the close window button (the small x top left in form caption).
Then I hit F9 again - the form does come out, but 'frozen'. It doesn't display its content (to be true, in this case it has nothing to display, but the same applies to more usual cases as well), and even the close window button doesn't work. Clicking it, Ubuntu says me 'This window is not responding' (see attachment), after I click [Force Quit] I see the [Execution Stopped] modal dialog, after [OK] I have a modal error dialog saying [Project x_hang raised exception class 'External: SIGKILL'.].
End of game, but if I click on the executable (it's x_hang, obviously), it starts and close normally...
Please forgive if there is something obvious I'm missing.
I usually works on Windows for my current customer, where this problem doesn't exist, but I value high Lazarus' portability, and cannot explain/debug the problem. Also, I would understand if the problem were tagged as 'inexplicable', because I'm the only one it's occurring. It happened me several time in the past, to find a bug that none of my coworkers incurred into, even on commercial SW. Eventually, I'll byte the bullet and install Ubuntu 20.04...
Thanks for your attention,
Carlo