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

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

I am hope for your help.

I thoughts all snaps should be targeted to Ubuntu 16.04? If you need newer Qt library you should bundle it in the snap package as a internal dependency.

as far as I understand it is not necessary.

what do you mean ? can you describe this in more detail?

actually here is the package collected in 18 04

Refer to Get started with snapcraft - Snaps are universal Linux packages:

Snaps are built to run against a base snap containing a minimal common runtime environment. Currently the most popular of those is based around Ubuntu 16.04, and is called core. In the future there may be other base snaps built from subsequent releases, or other Linux distributions. For now, all snaps should be built to run against the ‘Series 16’ core.

It’s crucial therefore that snaps are built on an Ubuntu 16.04 base machine, VM or container to be fully compatible with the currently available series 16 core.

It is technically possible to build on a newer release of Ubuntu, or on a different Linux distribution. However this will likely result in incompatibile libraries being incorporated in the snap causing the snapped application to malfunction.

1 Like

I have a binding to core18, theoretical problems with packages should not be, but they are (

1 Like

I understand the error here in core 18. Help me get a bug report on this error.