QCoreApplication::postEvent: Unexpected null receiver when calling .addwaypoint function of RouteModel in embedded device.
-
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? -
Solved the issue by upgrading Qt from 5.5 to 5.9.
-
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 Foundso 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,
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.
-
Solved the issue by upgrading Qt from 5.5 to 5.9.