canonical / core18

The core18 base snap
14 stars 26 forks source link

Crash qt gui aplication (build with core 18 on ubuntu 18.04(LXD)) #4

Closed EndrII closed 6 years ago

EndrII commented 6 years ago

I build the qt application in the lxd container (image ubuntu 18.04). I'm using ubuntu 18 04, because my applications have a dependency on qt 5.9 but after startup, my application has an error:

QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/run/user/1000/snap.hanoi-tower', please create it with 0700 permissions.
Qt: Session management error: None of the authentication protocols specified are supported
QApplication: invalid style override passed, ignoring it.
dbus[28516]: The last reference on a connection was dropped without closing the connection. This is a bug in an application. See dbus_connection_unref() documentation for details.
Most likely, the application was supposed to call dbus_connection_close(), since this is a private connection.
  D-Bus not built with -rdynamic so unable to print a backtrace

my snapcraft file

name: hanoi-tower
version: '1.4.testBuild8' 
summary: Hanoi Towers Game
description: |
  The Hanoi Tower is one of the most popular puzzles of the 19th century. Three bars are given, on one of which eight rings are strung, the rings differ in size and lie smaller on larger ones. The problem is to transfer the pyramid from eight rings for the least number of moves to another rod. At a time, only one ring is allowed to carry, and you can not put a larger ring on less.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
base: core18

icon: source/res/icon.png

apps:
  hanoi-tower:
    command: qt5-launch opt/hanoi-towers/bin/hanoi-towers
#    desktop: usr/share/applications/desc.desktop
    plugs: [desktop, home, opengl, x11, wayland]

parts:
  hanoi-tower:
    plugin: qmake
    source: source/
    build-packages:
      - qtdeclarative5-dev
    stage-packages:
      # Here for the plugins-- they're not linked in automatically.
      - libqt5gui5
      - libqt5qml5
      - libqt5quick5
      - qml-module-qtquick2
      - qml-module-qtquick-dialogs
      - qml-module-qtquick-controls
      - qml-module-qtquick-controls2
      - qml-module-qtgraphicaleffects
      - qml-module-qtquick-extras

after: [qt5conf] # A wiki part

actually here is the package collected in 18 04

After analyzing this problem, I came to the conclusion that the most likely error is in core 18 I really hope for your help

ahayzen commented 6 years ago

This seems potentially the same as trying to run Qt apps inside a 18.04 Docker container https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1774739

zyga commented 6 years ago

This is most likely caused by a denial for the system call statx due to snapd sandboxing. I am implementing a remedy now.

EndrII commented 6 years ago

Now I'm not using qtConf but desktop-qt5 everything is working