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. QtLocation examples running with exceptions
Forum Update on Monday, May 27th 2025

QtLocation examples running with exceptions

Scheduled Pinned Locked Moved Solved QML and Qt Quick
6 Posts 2 Posters 555 Views
  • 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
    mireiner
    wrote on 22 Apr 2019, 11:53 last edited by mireiner
    #1

    Hi there,

    I'm on Windows 10 64bit desktop and know how to write Qt C++ Widgets code. But Qt QML is completely new to me - the same is QtLocation.

    I like to include OSM maps into my Qt C++ programm. So I tried the QtLocation examples Qt came with to see how it works using Qt 5.12.3 and MSVC2017 64bit compiler.

    In the QtLocation documentation I read that I have to install OpenSSL first to be able to use QtLocation. And learned it must be OpenSLL 1.0.2x if the prebuild Qt Libraries are used as I do. So I installed the latest OpenSLL v1.0.2r libraries and set the Windows enviroment PATH variable to that folder.

    Now if I try to run the QtLocation examples:

    Places (QML)
    Map Viewer (QML)

    Both programs show the OSM maps. Map zooming in and out works also flawlessly. Also the map type can be changed without problems in Map Viewer (QML). But if some of the menus are used for example in

    Map Viewer (QML): Tools / Geocode, Reverse Geocode, Route with coordinates or Route with address etc...
    or
    Places (QML): Settings / Search Center, Search Bounding Box, Search Bounding Circle or Search Options - or if a place search is done

    An exception happens:
    "Exception at 0x0, code: 0x0c0000005: write access violation at: 0x0".

    I have no idea what the reason for this exception might be. Is it possible that there is something wrong with my OpenSSL installation? Or do I have to install additional libraries or plugins to run the QtLocation example code without problems? Never had any trouble before running any (normal) Qt C++ Widgets examples.

    Again Qt QML and QtLocation is completely new to me. So I might miss some very basic stuff. Can someone please help me running these QtLocation examples?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 22 Apr 2019, 20:08 last edited by
      #2

      Hi,

      Did you try to run a debug build and check what the backtrace tells you what is happening ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mireiner
        wrote on 23 Apr 2019, 16:23 last edited by mireiner
        #3

        Hi SGaist,

        the exception happens inside the file stackView.qml and its function stackView.push(...). For example:

        stackView.push({ item: Qt.resolvedUrl("forms/SearchCenter.qml") ,
        properties: { "coordinate": map.center}});

        Inside stackView.push(..) the function __performTransition(transition) is called. And in that function __performTransition(transition) the exception happens when __loadElement(transition.inElement) is called.

        Before __loadElement(transition.inElement) is called. The debugger shows the local vaiables:

        transition object
        immediate undefined undefined
        inElement object
        index 1 number
        itemComponent object
        item "qrc:/forms/SearchCenter.qml" string
        properties object
        coordinate object
        altitude NaN number
        isValid true boolean
        latitude 59.9485 number
        longitude 10.7686 number

        Do you have an idea what the problem might be?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 23 Apr 2019, 19:03 last edited by
          #4

          Not from the top of my head.

          Can you check if you have the same problem with an previous version like the latest 5.11 ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • M Offline
            M Offline
            mireiner
            wrote on 23 Apr 2019, 21:41 last edited by mireiner
            #5

            Problem solved! Your presumption was right that it might be a bug. And it is a regression bug in Qt 5.12.3.
            I didn't expect a bug because Qt 5.12.3 is alrealy the third release of Qt 5.12.

            With all prior Qt releases I tested the QtLocation example code runs without any problem:
            Qt 5.9.7
            Qt 5.9.8
            Qt 5.11.3
            Qt 5.12.0
            Qt 5.12.1
            Qt 5.12.2

            So I have to write another Qt bug report and say thank you for your help SGaist!
            https://bugreports.qt.io/browse/QTBUG-75370

            1 Reply Last reply
            1
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 24 Apr 2019, 21:46 last edited by
              #6

              Thanks for the report.

              Fixing a bug sometimes unveils a new / old one.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              1/6

              22 Apr 2019, 11:53

              • Login

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