Comment 46 for bug 827414

Revision history for this message
Remdul (buijs512) wrote :

This is most likely not related to Unity, for the same problem occurs for me with Linux Mint 13 XFCE.

If gedit is started from terminal (just "gedit", no arguments passed), it doesn't show up, nothing is printed in terminal and thus effectively hangs in limbo. Task Manager sees it sitting around consuming 0% CPU, it doesn't terminate on it's own.
When gedit is then started again, either via desktop shortcut/menu or another terminal window, it causes the first gedit instance to terminate with this message:

** (gedit:3900): CRITICAL **: _gedit_app_get_window_in_viewport: assertion `GEDIT_IS_WINDOW (window)' failed

The second instance then shows up normally. If a filename was passed as argument, it opens the file as expected.

If gedit is run with --standalone option, it always starts normally without fault, no matter what I tried.

The above is 100% reliably reproducable for me.

Now there are some oddities. For example when I start gedit from a panel (FYI: xfce4-panel 4.10.0), it always starts normally (launcher command: "gedit %U", or just "gedit").
When I doubleclick to open a text file in Thunar, the bug also occurs. When I do the same in Nautilus, the same works without the problem.

By the looks of it, this is a gedit bug. Obviously, gedit tries to find a running instance so it can open a new tab in the existing instance. It probably lacks a robust handler for the condition where it fails -- for whatever reason -- to find a running instance.

Hope that helps.