More googling conclude this is a bug with x11vnc server and not caused by the VNC viewer. A solution of the bug is to recomplie with stack protection option: https://gist.github.com/mangoliou/407d6a39a60d128610c20c4143f39f0d Please close this ticket.
Disconnect by resizing a window in remote Ubuntu 18.04 host