I’m on ubuntu 18.04 and get another segmentation fault (core dumped) error when I try to run my snap.
$ facebookbuddy.fbuddy
(process:6447): Gtk-WARNING **: Locale not supported by C library.
Using the fallback ‘C’ locale.
Gtk-Message: Failed to load module “gail”
Gtk-Message: Failed to load module “atk-bridge”
Gtk-Message: Failed to load module “canberra-gtk-module”
I’m ok
I’m still ok
Segmentation fault (core dumped)
python startup-script looks like:
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
...
os.environ["TCL_LIBRARY"] = "/snap/facebookbuddy/x1/usr/share/tcltk/tcl8.6/"
os.environ["TK_LIBRARY"] = "/snap/facebookbuddy/x1/usr/share/tcltk/tcl8.6/"
print "I'm ok"
root = Tk()
print "I'm still ok"
gui = FriendsListWindow(root)
print "I'm still still ok"
tksupport.install(root)
root.protocol("WM_DELETE_WINDOW", on_closing)
root.mainloop()
class FriendslistWindow look like:
class FriendsListWindow:
items = []
buttons = []
buttontexts = []
pageurls = []
current_ids = []
_reactor_running = False
_helper = None
_current_page = 0
_username = ""
_password = ""
def __init__(self, master):
self._helper = Helper()
self.master = master
master.title("The Facebook Buddy")
conn = db.connect('database/friends.db')
c = conn.cursor()
c.execute('''CREATE TABLE IF NOT EXISTS
...
…it creates a table with some columns and builds up the interface using tkinter…thats about it what’s inside __ init__(self,master):
strace facebookbuddy.fbuddy gives:
stat("/root/snap/facebookbuddy/x1/.local/share/fonts", 0x7ffec9167f60) = -1 ENOENT (No such file or directory)
stat("/root/snap/facebookbuddy/x1/.fonts", 0x7ffec9167ef0) = -1 ENOENT (No such file or directory)
stat("/root/snap/facebookbuddy/x1/.fonts", 0x7ffec9167f60) = -1 ENOENT (No such file or directory)
readlink("/proc/self/exe", "/snap/facebookbuddy/x1/usr/bin/p"..., 4096) = 40
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="b\0\4\0\6\0 \4", iov_len=8}, {iov_base="RENDER", iov_len=6}, {iov_base="\0\0", iov_len=2}], 3) = 16
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0(\0\0\0\0\0\1\213\0\216\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\213\0\3\0\0\0\0\0\v\0\0\0\213\1\1\0", iov_len=16}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 16
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0)\0\0\0\0\0\0\0\0\0\v\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 2548
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/X11/locale/locale.dir", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/X11/locale/locale.dir", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/X11/locale/locale.dir", O_RDONLY) = -1 ENOENT (No such file or directory)
uname({sysname="Linux", nodename="rolonso-T410", ...}) = 0
open("/root/snap/facebookbuddy/x1/.Xdefaults-rolonso-T410", O_RDONLY) = -1 ENOENT (No such file or directory)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=NULL} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault
I’ve built the snap using snapcraft --debug cleanbuild:
Here my part’s definition inside my snapcraft.yaml:
...
grade: devel
confinement: devmode
icon: images/fbuddy.png
apps:
facebookbuddy:
command: bin/facebookbuddy
#plugs [network, x11]
#desktop usr/share/applications/fbuddy.desktop
parts:
fbuddy:
source: .
plugin: python
python-version: python2
requirements: requirements.txt
stage-packages: [python-tk, python-gobject-2, python-notify]
Any help would be greatly appreciated!