-
Notifications
You must be signed in to change notification settings - Fork 453
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
Total GUI freeze when loading the Map with Qt 5.15.3 #1169
Comments
My main question is: Do you have any idea on what could be happening and how could I fix it ? |
No idea, I'm afriad - QSGBatchRenderer::Renderer::buildRenderLists is within the Qt library. The only unusual thing I can see, is you are using Qt 5.15.3, which I think is the commercial version of Qt - so probably hasn't been used previously. Might be worth trying Qt 5.15.2 if possible. |
I'll try, I don't know if I can easily downgrade a package in Alpine without breaking everything ^^' Anyways, this is really weird, because it seems like it blocks the main event loop, because even the API on port I don't have a lot of experience with Qt, but couldn't it be due to a missing dependency of some sort ? Maybe a QML dependency ? |
Generally when there's a missing QML dependency, you'll see that in the log and the map will just be grey. |
Actually, the only time I got |
After some investigation, I found this not-too-old SO post: https://stackoverflow.com/questions/52663856/qwidget-ui-freezes-when-using-a-qquickwidget, it says:
I see that the Map in |
What specific changes did you make? Do you have a diff? |
I made no change whatsoever to the source code, I took the latest available version tag from the releases, I was just saying that removing the QML dependency Edit: Ah, I get what you meant, I only quoted the StackOverflow post, I didn't do anything myself. |
I have the same problem on Gentoo. I tested qt-5.15.2 and qt-5.15.3 it doesn't change anything. The only map that works is mapboxgl, but you can't run it in sdrangel without changing the source code. I wrote a patch for version 6.17.3 that changes the default map from osm to mapboxgl. But unfortunately my patches don't work with the new sdrangel version. The problem is the qt library. |
My patch to change the default map from osm to mapboxgl for sdrangel-6.17.3:
|
Thanks, but we can't apply that patch, as mapboxgl isn't supported on Windows (but of course map be useful to others with this issue) |
This patch works with the latest version of sdrangel-6.20.2:
|
Hello @janczeresnia, thank you for this patch, I'll try it locally with Alpine !
Couldn't we branch in the |
You can probably do it. Need to add a preprocessor macro to the source code like this:
Or easier:
|
Thanks, I'll look into it :) |
There is only a small problem that QML files do not support preprocessor macros. But it can be done. |
Yes, but we don't have to modify the QML files at all, since this is done in the C++ code, thus overriding the QML I think I'll just disable the |
You can do that for your own build - but osm does work on other Linux distributions. |
@srcejon does it for Qt 3.15.3+ ? (Commercial distribution) @janczeresnia was suggesting this was an upstream bug in Qt. |
I wrote a test application in qt-creator to check if the problem is really in the qt library. It looks like there is a bug in qt. |
It works fine in 5.15.2 in Ubuntu for me. I haven't tried 5.15.3, although I see it is now available as open-source, so maybe I can when builds are available. |
I am not a QT specialist but in Gentoo the osm maps do not work with qt-5.15.2 and qt-5.15.3. |
@srcejon: Would it be manageable for you if I provided an option (via a PR) in the for now I did this, and it seems to work: diff --git a/plugins/channelrx/demodadsb/adsbdemodgui.cpp b/plugins/channelrx/demodadsb/adsbdemodgui.cpp
index 37e8084de..8a979cbe8 100644
--- a/plugins/channelrx/demodadsb/adsbdemodgui.cpp
+++ b/plugins/channelrx/demodadsb/adsbdemodgui.cpp
@@ -3590,7 +3590,7 @@ void ADSBDemodGUI::applyMapSettings()
}
// Create the map using the specified provider
- QQmlProperty::write(item, "mapProvider", "osm");
+ QQmlProperty::write(item, "mapProvider", "mapboxgl");
QVariantMap parameters;
// Use our repo, so we can append API key and redefine transmit maps
parameters["osm.mapping.providersrepository.address"] = QString("http://127.0.0.1:%1/").arg(m_osmPort);
diff --git a/plugins/feature/map/mapsettings.cpp b/plugins/feature/map/mapsettings.cpp
index 732e58502..24e250bcf 100644
--- a/plugins/feature/map/mapsettings.cpp
+++ b/plugins/feature/map/mapsettings.cpp
@@ -47,7 +47,6 @@ const QStringList MapSettings::m_pipeURIs = {
// GUI combo box should match ordering in this list
const QStringList MapSettings::m_mapProviders = {
- QStringLiteral("osm"),
QStringLiteral("esri"),
QStringLiteral("mapbox"),
QStringLiteral("mapboxgl"),
@@ -83,7 +82,7 @@ MapSettings::~MapSettings()
void MapSettings::resetToDefaults()
{
m_displayNames = true;
- m_mapProvider = "osm";
+ m_mapProvider = "mapboxgl";
m_thunderforestAPIKey = "";
m_maptilerAPIKey = "";
m_mapBoxAPIKey = "";
@@ -166,7 +165,7 @@ bool MapSettings::deserialize(const QByteArray& data)
QByteArray blob;
d.readBool(1, &m_displayNames, true);
- d.readString(2, &m_mapProvider, "osm");
+ d.readString(2, &m_mapProvider, "mapboxgl");
d.readString(3, &m_mapBoxAPIKey, "");
d.readString(4, &m_mapBoxStyles, "");
d.readString(8, &m_title, "Map");
diff --git a/plugins/feature/map/mapsettingsdialog.ui b/plugins/feature/map/mapsettingsdialog.ui
index 30cc95f37..963a5e289 100644
--- a/plugins/feature/map/mapsettingsdialog.ui
+++ b/plugins/feature/map/mapsettingsdialog.ui
@@ -135,11 +135,6 @@
<property name="toolTip">
<string>Select map provider</string>
</property>
- <item>
- <property name="text">
- <string>OpenStreetMap</string>
- </property>
- </item> The only problem I might face is conditionally removing the item in the |
It would be very nice to add this functionality to the next version of sdrangel :) |
You're right ADS-B demodulator and VOR localizer is not working properly sdrangel freezes when loading the map. Hmmm and after crash plugin ADS-B disappeared, it is not in the plug-in list. Very strange. Even after the changes to the plugin's QML files, it seems that the map doesn't change to mapboxgl and the osm map still works.
Patch for sdrangel-6.20.2 working ADS-B plugin:
|
edge
)
Created a Qt bug for this: https://bugreports.qt.io/browse/QTBUG-103592 (as even the Qt Map Viewer example program doesn't work on Qt 5.15.3) |
Workaround implemented in 7.3.2. |
Hello :)
Context
I'm trying to provide a package to pkgs.alpinelinux.org for
sdrangel
, because I think this would be cool for this project to be available out of the box in Alpine.My specs (from
neofetch
):Also, this issue happens with or without a SDR connected to the computer, for reference I own a HackRF.
Actual behavior
Note: The project is build from sources using the MUSL (default in Alpine Linux). (with Qt:
5.15.3_git20220217
)When launching the program, and adding anything related to a Map (either Channel -> ADS-B or Feature -> Map), the program instantly freezes, nothing responds, and 1 CPU core has a 100% usage for an undefined time (I waited for 10mn and it didn't unfreeze).
After some investigations, using
gdb
, when adding the Map element, the code blocks in a recursive call to:Also, below are the full logs when launching the project and adding the Map Feature until it freezes.
Expected behavior
This shouldn't freeze the GUI.
Steps to reproduce
Build, launch the project, and add the Map feature in the right panel.
Log Files
Note: I added a dash separator for when I clicked the Apply button in the Add feature dialog.
Thanks !
The text was updated successfully, but these errors were encountered: