Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't open Nav Sat Map plugin (crashes) #482

Open
ijnek opened this issue Sep 5, 2022 · 11 comments
Open

Can't open Nav Sat Map plugin (crashes) #482

ijnek opened this issue Sep 5, 2022 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@ijnek
Copy link

ijnek commented Sep 5, 2022

Environment

  • OS Version: Ubuntu22.04
  • Source or binary build? Binary (version: 6.6.1)

Description

  • Expected behavior: Nav Sat Map plugin opens correctly
  • Actual behavior: Ignition Gazebo crashes with the following messages
[GUI] [Dbg] [Application.cc:426] Loading plugin [NavSatMap]
[GUI] [Wrn] [Application.cc:797] [QT] file::/NavSatMap/NavSatMap.qml:160:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:797] [QT] QObject::connect(QQuickWindow, QDeclarativeGeoMap): invalid nullptr parameter
[GUI] [Msg] Added plugin [Navigation satellite map] to main window
[GUI] [Msg] Loaded plugin [NavSatMap] from path [/usr/lib/x86_64-linux-gnu/ign-gui-6/plugins/libNavSatMap.so]
[GUI] [Wrn] [Application.cc:797] [QT] QGeoTileProviderOsm: Tileserver disabled at  QUrl("http://maps-redirect.qt.io/osm/5.8/satellite")
[GUI] [Wrn] [Application.cc:797] [QT] QGeoTileFetcherOsm: all providers resolved

Steps to reproduce

  1. ign gazebo -v 4
  2. Go to add a Nav Sat Map plugin from the right-top menu
  3. Crashes, when Nav Sat Map plugin is clicked

Output

image

@jennuine
Copy link
Contributor

jennuine commented Sep 6, 2022

Hi @ijnek I have tried both fortress from source and binaries and am not able to reproduce the crash (I've tried launching ign gazebo -v 4 then adding the plugin manually and also ign gazebo -v 4 spherical_coordinates.sdf). I suggest double checking your installation and make sure it's set up correctly. An option is to uninstall then reinstall fortress: https://gazebosim.org/docs/fortress/install_ubuntu

@jennuine jennuine closed this as completed Sep 6, 2022
@jennuine jennuine closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2022
@jennuine
Copy link
Contributor

jennuine commented Sep 6, 2022

I just realized you're on jammy not focal, re-opening issue since this wasn't tested appropriately

@jennuine jennuine reopened this Sep 6, 2022
@vincentrou
Copy link

I can confirm, I have the same issue with navsatmap gui plugin with same config (gazebo Fortress and Ubuntu 22.04)

@JaouadROS
Copy link

Any news about this bug?

@azeey
Copy link
Contributor

azeey commented Mar 7, 2023

There's some discussion here about a change in map providers which might be causing the issue. I tried playing with the configuration options mentioned there and in https://forum.sailfishos.org/t/using-qml-map-osm-not-working/7261 with no luck

@jennuine
Copy link
Contributor

jennuine commented Mar 7, 2023

I was able to get a little further with the below patch but the GUI will eventually freeze. Unfortunately, I don't have time to continue looking at this but here are the steps in case anyone does (On Jammy, using Gazebo Garden):

  1. Apply below patch, rebuild
  2. gz sim -v 4 -r spherical_coordinates.sdf
  3. Add the Nav Sat Map from the plugin menu
  4. Translate the box somewhere, this is when the GUI freezes
diff --git a/src/plugins/navsat_map/NavSatMap.qml b/src/plugins/navsat_map/NavSatMap.qml
index 3e7659b2..3145e1ed 100644
--- a/src/plugins/navsat_map/NavSatMap.qml
+++ b/src/plugins/navsat_map/NavSatMap.qml
@@ -18,8 +18,8 @@ import QtQuick 2.9
 import QtQuick.Controls 2.2
 import QtQuick.Layouts 1.3
 import QtQuick.Controls.Material 2.1
-import QtLocation 5.6
-import QtPositioning 5.6
+import QtLocation 5.15
+import QtPositioning 5.15
 
 Item {
   id: navSatMap
@@ -92,6 +92,16 @@ Item {
   Plugin {
     id: mapPlugin
     name: "osm"
+
+    PluginParameter {
+      name: "osm.mapping.providersrepository.disabled"
+      value: "true"
+    }
+
+    PluginParameter {
+      name: "osm.mapping.providersrepository.address"
+      value: "http://maps-redirect.qt.io/osm/5.6/"
+    }
   }
 
   Map {
@@ -159,7 +169,7 @@ Item {
 
   Connections {
     target: NavSatMap
-    onNewMessage: {
+    function onNewMessage(_latitudeDeg, _longitudeDeg) {
       latitude = _latitudeDeg
       longitude = _longitudeDeg
     }

The following warning may be related:

[GUI] [Wrn] [Application.cc:845] [QT] QObject::connect(QQuickWindow, QDeclarativeGeoMap): invalid nullptr parameter

@iche033
Copy link
Contributor

iche033 commented Mar 8, 2023

possibly related Qt issues:

@JaouadROS
Copy link

@jennuine I've tried your patch and I've got the same output, the GUI freezes.
@iche033 5.15.11 looks like a commercial release. If it does solve the issue, what do you suggest to try it out?

@iche033
Copy link
Contributor

iche033 commented Mar 9, 2023

You could try other map plugins that are listed in this page:
https://doc.qt.io/qt-5/qtlocation-index.html#plugin-references-and-parameters

I don't know how well they work though.

@iche033
Copy link
Contributor

iche033 commented Mar 9, 2023

the mapboxgl plugin works for me. I created a PR: #520

Update: closed PR as it's not clear if we can use the mapboxgl plugin and it still freezes. Gazebo users are free to sign up to map box's free tier account and get an access token to use.

@23pointsNorth
Copy link

I'm on humble + garden (7.6) and just adding the navsat plugin in an empty scene creates a crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

7 participants