Segmentation Fault (core dumped) error during mt_prep_snap

Sorry for that, but there is an option, could be done, since you have only six images, I think it is easy to apply all the steps manually, to checking up the proper result of each one, and then rerun mt_prep_sanp

I solved the issue by formatting my hard drive and reinstalling LINUX. Thanks again for your assistance.

So happy to hear that :smiley:, it also good to take in the future consideration the effect of LINUX on the processing,

Which LINUX did you install in your machine?

hello, I met a same problem like you ,how can I slove it? Just reinstalling Linux?
thank you

1 Like

The problem is the gcc compiler versión. You must compile stamps with gcc v7

To Installing Multiple GCC Versions follow this link:

https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/

then select the gcc-7

“sudo update-alternatives --config gcc” select the correct one

check gcc version (command: gcc -v)
and then install stmaps (go to src and “make” “make install”)

1 Like

@JeroBande is right, the problem is the compiler version. StaMPS has to be compiled with gcc-7 (gcc-9 was installed in my case and used for the compilation of StaMPS which led to incorrectly compiled scripts)

So this is what it solved the problem in my case (partially copied from here). I cannot grant that it will solve all problems, but changing the compiler makes a difference. If you get stuck at one of these steps, please try to continue searching the web, because I have no clue how to troubleshoot most of these steps in case something goes wrong.

Adding ubuntu-toolchain-r/test PPA

sudo apt install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test

Install several compilers

(we add 7, 8 and 9 so we have a list to chose from)
sudo apt install gcc-7 g++-7 gcc-8 g++-8 gcc-9 g++-9

Configure alternative compilers

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 80 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7 --slave /usr/bin/gcov gcov /usr/bin/gcov-7

Select preferred compiler

(here we want gcc-7)
sudo update-alternatives --config gcc

this prints this table

There are 3 choices for the alternative gcc (providing /usr/bin/gcc).

  Selection    Path            Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gcc-9   90        auto mode
  1            /usr/bin/gcc-7   70        manual mode
  2            /usr/bin/gcc-8   80        manual mode
  3            /usr/bin/gcc-9   90        manual mode

Press <enter> to keep the current choice[*], or type selection number:

This means, that gcc-9 is used to compile code unless another is selected. To confirm that we want to use gcc-7 for the compilation of StaMPS, type

1

and hit Enter

Now, without closing the command shell, nagivate to the StaMPS directory and inside the src folder
type
make
and then
make install

This will compile all scripts required for PS processing. It should look like this

Now, the Segmentation fault (core dumped) error will no longer occur when you run mt_prep_snap again. I recommend to run this command in an empty folder (not the same as the INSAR folder exported by SNAP and also using the tcsh instead of the standard command line. Also, don’t forget to modify and source StaMPS_config.tcsh before you can run all scripts.

11 Likes

Dear all,
thank you very much for the solution you find for the problem of segmentation Fault(core dumped). I solved the problem with the installation of gcc-7. Thank you again

Happy to hear that.

Hi @ABraun,
same problem here and your solution has been perfect for me too.
Thank you always for your help and advice.

S. Savastano

@ABraun Your solution has been perfect.
Thanks for your help!

Very nice solution.

worked like a charm. thanks

1 Like

It doesn’t work for Ubuntu 20.1

It will work, but Ubuntu 18.04 is very comfortable (as per my suggestion) compared to Ubuntu20.1. And one more advantage of Ubuntu 18.04 is, it will come python2 as a default (snap2stamps code will run only on python2).

It would be helpful to tell us the actual error. Please review the
this thread to see if your issue is covered:

Snap2stamps error - s1tbx / StaMPS - STEP Forum (esa.int)

The problem is installing gcc-7. I did not be able to run StaMPS because I get “Segmentation Fault”. I tried to install multiple gcc compiler, but the older one available for Ubuntu 21.1 is gcc-8.

I’m going to reinstall ubuntu 20.04, I successfully installed multiple gcc compilers on it.

Newer versions of linux distros generally try to support software built using “slightly older” versions, unless the changes that cause your segmentation fault were needed for security reasons. Posting the details of the segmentation fault on an Ubuntu forum may lead to a quick fix (sometimes as simple as
copying a library from an older release to your system).

It is generally not difficult to install older or newer gcc versions from source, so that is generally preferable to doing a full install of an older version.

It may be useful for you.

pleease I have this proplem


Try this, excellent explanation by @ABraun