# Segmentation Fault on running program



## zecapeta (Jun 3, 2016)

Hi, how are you?

I cannot run synfigstudio on a fresh install. 
The splashscreen progress bar loads almost to the end then it suddenly closes.
Please I'd like to ask you for help or advice.

when I run `gdb synfigstudio`

```
...
(synfigstudio:1651): Gtk-WARNING **: new: missing action new
(synfigstudio:1651): Gtk-WARNING **: open: missing action open

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 811006400 (LWP 100935/synfigstudio)]
0x0000000803457a04 in gtk_menu_item_get_submenu ()
   from /usr/local/lib/libgtk-3.so.0
(gdb) next
Single stepping until exit from function gtk_menu_item_get_submenu, 
which has no line number information.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
```

`uname -a` returns

```
FreeBSD raf.lek 10.3-RELEASE-p4 FreeBSD 10.3-RELEASE-p4 
#0: Sat May 28 12:23:44 UTC 2016
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
```

System is up to date.
There are attached to this message:
gdb_log.txt output of `gdb synfigstudio`
pkg_info.txt output of `pkg version`
portmaster_info.txt output of `portmaster -l`
/etc/rc.conf

If there is any further info I missed I'd be glad to provide.

Thanks a lot.


----------



## fossette (Jun 12, 2016)

Rafael, are you installing from a package or from a port.  If it's from a port, what I'm going to propose is a very *very* long shot.  But first, you have to be absolutely sure that all your ports are up to date.  Odd things happen if not.  I'm more a if-it-aint-broke personality, but that's not compatible with FreeBSD.  So, to find out if any port needs an upgrade, I use:
`portsnap fetch update` then `portmaster -L | grep New | sort`

All ports in the ports tree are supposed to work because they would be purged otherwise.  If they don't work, chances are that it's a small detail that has been overlooked.  I had a segmentation fault on a fresh install of news/pan last week, and got it fixed with a compilation tip from a different forum topic here, but a few years back.  Here goes:

Go to the port directory
Open the Makefile file (also make a copy of it to cancel any change made)
Add `-static-libgcc -static-libstdc++` to the end of the `LDFLAGS+=` line.
`make deinstall`
`make clean`
`make`
and if no error: `make reinstall`

I was lucky!  Maybe you will be too!

Dominique.


----------



## tankist02 (Jun 13, 2016)

Corresponding PR 208763  was created 2 months ago (2016-04-13). The fix is simple, well known and tested. But somehow still is not submitted. BTW the same fix for the previous version of pan took around 9 months to get submitted to the ports tree.


----------



## talsamon (Jun 14, 2016)

The easiest way, to get a commit  is to post it at  https://lists.freebsd.org/pipermail/freebsd-ports/. There are always committer, would  help you.


----------

