Segmentation faults
Hi everyone,
I'm kind of new to Linux (though I have some programming background), and I keep getting this annoying "segmentation faults" when I run some programs that I've downloaded. I use the configure scripts, make gives some warnings but no errors, make install reports nothing... but when I try to run the application I get a segmentation fault. BTW: what is a segmentation fault? Is is some kind of protected mode exception (yeah, my programming skills REALLY are outdated) under linux? The last two examples I remember are E-UAE and Ur-Quan Masters 0.4. For example, the latter gives me this : ------------------------------------------ The Ur-Quan Masters v0.4.0 (compiled Oct 12 2005 13:26:53) This software comes with ABSOLUTELY NO WARRANTY; for details see the included 'COPYING' file. Initializing base SDL functionality. Using SDL version 1.2.9 (compiled with 1.2.9) Warning: There's no 'packages/addons' directory in the 'content' directory; '--addon' options are ignored. Initializing Pure-SDL graphics. SDL driver used: x11 SDL initialized. Initializing Screen. Set the resolution to: 640x480x32 0 joysticks were found. Initializing SDL audio subsystem. SDL audio subsystem initialized. Opening SDL audio device. using dsp at 44100 Hz 16 bit stereo, 4096 samples audio buffer Initializing mixer. Mixer initialized. Initializing sound decoders. Sound decoders initialized. 'lbm/title.ani' -- 19 bytes Segmentation fault ------------------------------------------- I'm running SuSE 9.3 on a Athlon 64 3000+. Any idea how can I solve this recurring problem :confused: ? Thanks! |
I'm not sure how to solve the specific problem you have.. but I can explain what a Segmentation fault is.
A segfault occurs when a piece of memory is access in a method not allowed. Usually, but not always, this involves even access/loading an uninitialized pointer or a NULL pointer. |
Hello
Segmentation fault happens when a program uses memory that it can't use. Have you recently installed any memory? The problem may be that your memory is too slow or you have different memory speeds. Try running a memtest for some hours and see what happens. |
Thanks for the answers!
@dinolux As for having installed new memory, the answer's no. And the memtest programs I've run didn't detect any kind of failure. Besides, it's deterministic: no matter how many programs I have loaded into memory, they only ones that produce segfaults are the one who always did. @jtshaw Why would some programs that compile on other machines generate a segfault when compiled on mine? Can it be some kind of problem/obsolescence with GCC/glibc/SDL/whatever? The only "common points" between both programs are GCC/glibc/make and I think SDL. |
Quote:
Quote:
|
Quote:
But now I've managed to get a different kind of error! I've installed the latest version of GCC, and recompiled the game in question. Well, no more segfaults, but the game can't open the data files (which are in .zip format) anymore. Actually, even the linker doesn't want to link libz anymore, saying it is "outdated or something". This compiling stuff is getting quite frustrating!!!:cry: |
All times are GMT -5. The time now is 03:06 PM. |