简体   繁体   中英

Segmentation fault after installation

I know there are a log of questions with this subject, however I can't find an answer for my problem. I have a program that I build on a linux-VM without any problems. I can run the program. I have created an installation file for this program. In this installation-structucture I can find my build program. On this location everything runs without a problem.

If I install my program on another linux-VM I get the error "Segmantation fault (core dumped)". This error occurs also when I run my program from the temporary folder where my original project is copied to for installation. It contains the same files as on the first VM in the installation structure.

The only answer I found so far is a problem with pointer pointing to the wrong peace of memory. But I can't believe this is it, because my program runs fine on the first VM. Can anybody help me where I should start looking?

try to debug it or use strace:

strace ./nameOfYourBinary

(sudo apt-get install strace if you have not it)

this should help in finding what is going wrong with your program. Maybe the VM where the program fails have not enough memory (or whatever) to run your program. Check also all your malloc, if you have them in your code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM