konstructs / client

A voxel based game client.
http://www.konstructs.org
MIT License
48 stars 8 forks source link

Snap version not work #210

Closed pharaone closed 7 years ago

pharaone commented 7 years ago

The konstructs's snap version doesn't work on mine Ubuntu computer.

petterarvidsson commented 7 years ago

@FaraoneLele Thanks for the bug report. I can reproduce the problem on my set up (I am using ubuntu 16.04) so I'll see if I can solve it and make an update.

@nsg I am getting a segfault when running the snap from the official source, but it works when I install the one that I build locally.

petterarvidsson commented 7 years ago

Stopping the process before it crashes and then attaching gdb to it before continuing yields that it segfaults in glfwCreateWindow. Seems to be related to open gl initialization code.

petterarvidsson commented 7 years ago

I get the following in my syslog when it crashes:

Oct 20 10:31:51 xyz kernel: [22544.715299] audit: type=1400 audit(1476952311.828:44): apparmor="DENIED" operation="open" profile="snap.konstructs-client.konstructs-client" name="/usr/share/glib-2.0/schemas/" pid=27195 comm="desktop-launch" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 20 10:31:52 xyz kernel: [22545.643136] konstructs[27262]: segfault at 0 ip 000000000060c8b8 sp 00007ffef227e740 error 4 in konstructs[400000+2ad000]
nsg commented 7 years ago

I got this, and it works for me.

Oct 20 10:23:02 narsil kernel: [  588.818578] audit: type=1400 audit(1476951782.531:35): apparmor="DENIED" operation="open" profile="snap.konstructs-client.konstructs-client" name="/usr/share/glib-2.0/schemas/" pid=5614 comm="desktop-launch" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 20 10:23:03 narsil kernel: [  589.792681] audit: type=1400 audit(1476951783.507:36): apparmor="DENIED" operation="sendmsg" profile="snap.konstructs-client.konstructs-client" pid=5697 comm="konstructs" family="unix" sock_type="dgram" protocol=0 requested_mask="send" denied_mask="send" addr=none peer_addr="@6E7669646961383434396166373200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" peer="unconfined"

@petterarvidsson What if you download the snap manually and install it with --devmode (no apparmor/security)? store snap: https://068ed04f23.site.internapcdn.net/download-snap/vz0NCdgBzBeFaDlSVYCv7zC08ikS6ImI_3.snap?t=2016-10-21T08:40:51Z&h=c9293608e787ee061f708e784a4818767fa82fe5 (source: https://uappexplorer.com/app/konstructs-client.nsg)

nsg commented 7 years ago

For security, and to prove that they are the same files:

$ sha1sum Downloads/vz0NCdgBzBeFaDlSVYCv7zC08ikS6ImI_3.snap code/konstructs/client/package/konstructs-client_7_amd64.snap 
23a301e8b1e2c0908069a527936f1b66071d0f81  Downloads/vz0NCdgBzBeFaDlSVYCv7zC08ikS6ImI_3.snap
23a301e8b1e2c0908069a527936f1b66071d0f81  code/konstructs/client/package/konstructs-client_7_amd64.snap
nsg commented 7 years ago

Oh! I forgot about the download command:

$ snap download konstructs-client
$ sha1sum konstructs-client_3.snap
23a301e8b1e2c0908069a527936f1b66071d0f81  konstructs-client_3.snap
petterarvidsson commented 7 years ago

Same problem. So basically it seems I can not run a snap built on your set-up but I can run one built on mine. I thought this was the problem that snap was built to fix?

The sha of the snap I build does not match the sha of yours.

nsg commented 7 years ago

I did a cleanbuild (built inside a container) and released it to the candidate channel, you can try it with:

snap install --candidate konstructs-client

It's just a experiment at the moment, this release is broken on my nvidia based system, but it work on my intel based laptop.

petterarvidsson commented 7 years ago

@nsg The candidate version works perfectly for me.

pharaone commented 7 years ago

The candidate version doesn't work for me. I give an error: No protocol specified Caught a fatal error: Could not initialize GLFW!

nsg commented 7 years ago

@FaraoneLele What type of GPU do you have? Intel, Nvidia, AMD, ...?

pharaone commented 7 years ago

Intel (an intel atom n450)

nsg commented 7 years ago

I have spent some time to read about snaps and OpenGL and it looks like there are plenty of people with trouble. I can't for example run this on my Nvidia card at the moment, haven't found a working solution yet.

I will upload a new version to stable, it is built on the same way like the candidate version, but with a few extra tweaks and plenty of debug output. I haven't had the time to research your specific problem yet.

petterarvidsson commented 7 years ago

@FaraoneLele I think the graphics card integrated into your CPU might be too old: https://en.wikipedia.org/wiki/Intel_GMA#GMA_3150 It seems to only support up to open gl 2.0 and konstructs requires at least open gl 3.3