1

On Ubuntu 14.04, I often experience the following: open an application, and within 15 seconds or so the application window simply disappears from screen. If I ps aux | grep nameOfApplication it will not show up, so something has closed/killed it. This only happens once per session just after startup, and doesn't happen every time. So far it has happened with Firefox, Thunderbird, and gnome-terminal. In my recollection it has never happened with Nautilus, and I just experienced it happening to gnome-terminal after having opened Nautilus first and browsed to a folder, so it's not necessarily the first application launched that gets killed. My desktop environment is cairo-dock, not Unity, though I don't have an a priori reason to suspect cairo-dock as the culprit.

My question: where can I look for clues as to what is happening and why? These crashes aren't triggering apport or whoopsie, so presumably if I figure out the cause my next stop should be Launchpad?


update

The problem didn't happen for a few days, but this morning it recurred. I booted up, started firefox, started gnome-terminal and ran tail -f .xsession-errors, switched focus back to firefox, then a few seconds later firefox disappeared. Here is the initial tail of .xsession-errors; unfortunately nothing was added when firefox vanished:

[~] $ tail -f .xsession-errors
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated. please move it to /home/dan/.config/fontconfig/fonts.conf manually

** (gnome-terminal:2600): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-x4UUa9owca: Connection refused

(gnome-terminal:2600): GLib-GIO-CRITICAL **: g_settings_get: the format string may not contain '&' (key 'monospace-font-name' from schema 'org.gnome.desktop.interface'). This call will probably stop working with a future version of glib.
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated. please move it to /home/dan/.config/fontconfig/fonts.conf manually

** (gnome-user-share:2696): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-x4UUa9owca: Connection refused

** (telepathy-indicator:2698): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-x4UUa9owca: Connection refused

To me these all look unrelated, but I'm hoping more experienced users will see something that I don't.

3

I'd start by running it from a terminal. You've already said that your graphical terminal is a problem application, so use a TTY:

  1. Control+Alt+F1 to get to TTY1
  2. Log in.
  3. Run DISPLAY=:0 gnome-terminal to launch a problem application on your display (obviously change the display number if you're running more than one).
  4. Switch back to the X server with Control+Alt+F7 and use the Gnome Terminal until it crashes.
  5. Switch back to TTY1 and view the error message.

In my experience, things dying off for no reason usually comes down to RAM issues or graphics drivers. Either of these two have just enough fingers in just enough pies to cause many headaches.

Assuming you don't find a nice Googleable error message, I'd run a memtest (from grub or a LiveCD/USB) and look at whether there are more stable drivers for the graphics card. Then change kernel version. By this point it's just as much about reproducing the error and noticing what you changed.

2

The output of programs invoked through the GUI is sent to the file .xsession-errors in your home directory, so you should look here for clues.

Since the output of all the programs goes to the same place, it might be hard to tell what is coming from the crashing program. If you want to be able to get the output of a specific program, start it from a terminal. Either type the name of the executable on the command line, e.g. type firefox at the shell prompt, or redirect the output to a file:

{ firefox; echo $?; } </dev/null >~/firefox-$(date).log 2>&1 & disown

You can close the terminal once you've issued this command.

All the output from Firefox will be logged into a file called firefox-DATE.log in your home directory. Once Firefox exits, the last line in the log file will be the status code: 0 for a normal exit, 1–127 for an error, and 128–255 if Firefox died due to a signal (e.g. 139 for a segmentation violation, i.e. an invalid pointer access).

There are two main culprits for frequent crashes:

  • Video driver bugs. If you're using a 3D environment such as Unity (the default), try using a 2D environment instead, such as LXDE without Compiz.
  • Defective RAM. RAM can go bad over time. Test your RAM. Reboot your computer and press and hold Shift as soon as you see a message about the keyboard being initialized; you should see a Grub boot menu after a few seconds. (If you can't see the boot menu, see Pressing shift does not get me into any grub menu.) Let the test run for at least one full pass. If it reports an error, change your RAM immediately and verify all your data — bad RAM can lead to insidious data corruption.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.