How can we trace problems of crashing programs in Linux?

Is there e.g. some central log or something similar?

The normal place for system logs is /var/log/. What gets put in each log depends on the syslog configuration, but commonly everything except logins goes to /var/log/syslog.

This is no guarantee that individual applications will have left any clue there in the event of a problem. But they, or the shell, will likely spit something to the standard out/standard error streams, and if you run a troublesome application in the foreground from a terminal you'll be able to see that stuff.


On Ubuntu segfaults get written at /var/log/kern.log. I tested it by creating a program that segfaults:

void main() {
    int *a=0;
    *a=0;
}

After it segfaulted there was this line in /var/log/kern.log:

a.out[534]: segfault at 0 ip 08048432 sp bfaec8c0 error 6 in a.out[8048000+1000]