Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-95638

Use of QML Map component with OSM, Esri plugins freezes UI

    XMLWordPrintable

Details

    • Linux/Wayland, Linux/X11

    Description

      Using a Map component in a QML application freezes the UI and locks up the app, forcing the user to kill the process.

      This happens when new tiles need to be loaded in; upon opening and reopening the map, more tiles will appear before each crash, until enough are loaded to allow the user to move around and zoom until new tiles need to be loaded, leading to further crashes.

      This afflicts both OSM and Esri map plugins. Curiously, this does not affect the MapBoxGL plugin - maybe due to a different rendering method?

      Would appreciate any insight on a fix/workaround. Thank you!

      EDIT: This is the console output:

      QObject::connect(QQuickWindow, LocationMap_QMLTYPE_0): invalid nullptr parameter
      
      qml:  
      QGeoTileProviderOsm: Tileserver disabled at  QUrl("http://maps-redirect.qt.io/osm/5.8/satellite")
      
      QGeoTileFetcherOsm: all providers resolved
      
      Killed
      

      Here is the QML code:

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      import QtLocation 5.15
      import QtPositioning 5.15
      
      Map {
          id: map
          anchors.fill: parent    
           property alias pluginComponent: mapPlugin    
      
          //center: QtPositioning.coordinate(0,0)
          //zoomLevel: 15
          gesture.enabled: true
          plugin: Plugin {
              id: mapPlugin
              name: "osm"
          }
          onCopyrightLinkActivated: {
              Qt.openUrlExternally(link)
          }
          Component.onCompleted: console.log(errorString)
      }
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              ivan.solovev Ivan Solovev
              claucambra Claudio Cambra
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes