gvim produces error when hitting the close window
vim-gnome
has this problem, but vim-gtk
does not, so this is a quick fix for the problem:
sudo apt remove vim-gnome
sudo apt install vim-gtk
Normally, GLib-GObject-WARNING
while running gtk applications in the command line, are normally ignored by developers and demonstrate a poorly written applications. If you report a bug against the package, it would be the best, but don't act surprised if developers ignore or say that "is ok" in your bug report.
TL;dr: They are normally safe to be ignored.