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. QCoreApplication::postEvent: Unexpected null receiver when calling .addwaypoint function of RouteModel in embedded device.

QCoreApplication::postEvent: Unexpected null receiver when calling .addwaypoint function of RouteModel in embedded device.

Scheduled Pinned Locked Moved Solved QML and Qt Quick
qtquickqtlocationqml
3 Posts 1 Posters 2.0k 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.
  • S Offline
    S Offline
    Sam_George
    wrote on 14 Jun 2019, 05:48 last edited by
    #1

    Hi,

    So I am using Qtlocation 5.6 to generate map and route between 2 points using RouteModel. The program works perfectly on PC but when running on embedded device the route doesn't update at all. And it throws warning like "QCoreApplication::postEvent: Unexpected null receiver". The function which throws this warning is:
    function updateRoute() {
    routeQuery.clearWaypoints();
    routeQuery.addWaypoint(startMarker.coordinate);
    routeQuery.addWaypoint(endMarker.coordinate);
    routeModel.update()
    }
    What can be the issue and how to resolve it?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sam_George
      wrote on 31 Jul 2019, 08:05 last edited by
      #3

      Solved the issue by upgrading Qt from 5.5 to 5.9.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sam_George
        wrote on 18 Jun 2019, 10:52 last edited by Sam_George
        #2

        Hi All,

        I found that the url which my embedded device use to get the route is older one.
        http://router.project-osrm.org/viaroute?instructions=true&loc=8.5686,76.8731&loc=8.5241,76.9366 - server replied: Not Found

        so i tried to change the url by giving,

                        PluginParameter {
                            name: "osm.routing.host"
                            value: "http://router.project-osrm.org/route/v1/driving/"
        }
        

        but the new url which was generated by device is,

        http://router.project-osrm.org/route/v1/driving/?instructions=true&loc=8.5686,76.8731&loc=8.5241,76.9366 - server replied: Not Found

        the required url should be something like,

        http://router.project-osrm.org/route/v1/driving/76.8731,8.5686;76.9366,8.5241?overview=full&steps=true&geometries=polyline&alternatives=true

        because of the incorrect format the JSON respone which I receive is "Not Found"

        I was able to recreate the issue in PC by giving

                        PluginParameter {
                            name: "osm.routing.apiversion"
                            value: "v4"
                        }
        

        so i thought if i update the osm.routing.apiversion to v5, I may succeed but i still i got the same error. Please help.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Sam_George
          wrote on 31 Jul 2019, 08:05 last edited by
          #3

          Solved the issue by upgrading Qt from 5.5 to 5.9.

          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