Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. OSM plugin is not working on deployed target
Forum Updated to NodeBB v4.3 + New Features

OSM plugin is not working on deployed target

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 1.2k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MuratUrsavas
    wrote on 31 Mar 2019, 12:15 last edited by
    #1

    Hi,

    I'm using OSM plugin in a QmlWidget and it is running just fine on my machine. But if I deploy it to another machine (like my test virtual box machine) it is not showing anything at all, even the copyright information.

    Both machines are Ubuntu but dev machine is 18.10 and target is 18.04. The deployed image does not give log any dependency error messages but I'm receiving an error message from map widget which is taken via onErrorChanged QML signal:

    qml: Map error: 1
    

    Any idea how to fix this?

    Here's the code of the QmlWidget:

    import QtQuick 2.0
    import QtQuick.Window 2.0
    import QtLocation 5.12
    import QtPositioning 5.12
    
    Rectangle
    {
        width: 1000
        height: 550
        visible: true
    
        Plugin
        {
            id: mapPlugin
            name: "osm"
        }
    
        Map
        {
            id: map
            anchors.fill: parent
            plugin: mapPlugin
            zoomLevel: 12
    
            onErrorChanged: {
            console.log("Map error: " + map.error)
            }
        }
    
        function centerPos(lat, lon)
        {
            map.center = QtPositioning.coordinate(lat, lon);
        }
    
        function setZoomLevel(level)
        {
            map.zoomLevel = level;
        }
    }
    

    Qt 5.12.0

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MuratUrsavas
      wrote on 29 Apr 2019, 10:21 last edited by
      #2

      For those, who may face this kind of issue in the future:

      I've solved the case, but partially. Even though nothing whines about a missing library, something should be definitely missing. I've copied all of the lib folder (which resides in 'Qt/5.X.Y/gcc_64/lib' directory) into the deployed target and everything started to work as expected.

      This tells me that QML engine could have issues with missing libraries, but sometimes it doesn't tell us what's going on.

      Cheers,

      R 1 Reply Last reply 29 Apr 2019, 10:35
      0
      • M MuratUrsavas
        29 Apr 2019, 10:21

        For those, who may face this kind of issue in the future:

        I've solved the case, but partially. Even though nothing whines about a missing library, something should be definitely missing. I've copied all of the lib folder (which resides in 'Qt/5.X.Y/gcc_64/lib' directory) into the deployed target and everything started to work as expected.

        This tells me that QML engine could have issues with missing libraries, but sometimes it doesn't tell us what's going on.

        Cheers,

        R Offline
        R Offline
        raven-worx
        Moderators
        wrote on 29 Apr 2019, 10:35 last edited by raven-worx
        #3

        @MuratUrsavas
        the common way for such issues is:

        1. set QT_DEBUG_PLUGINS=1 env variable
        2. check if the desired plugin is loaded (by inspecting the console output during application start)
        3. if the plugin is not loaded check if it's dependencies can be found and loaded (e.g. with ldd on Linux, DependencyWalker on Windows)
        4. if the plugin is loaded there should be either a console output, error property or a possible logging rule for the corresponding module

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved