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

Suppress new Jammy warnings #404

Merged
merged 20 commits into from
Aug 28, 2023
Merged

Suppress new Jammy warnings #404

merged 20 commits into from
Aug 28, 2023

Conversation

mjcarroll
Copy link
Contributor

@mjcarroll mjcarroll commented May 24, 2022

  • Test files should have the .cc extension, CMake is more strict now b4c2a46
  • QML wants explicit functions now rather than implicit properties: 3b0ad2f
  • There is a whole bunch of log spew related to the QML engine, there was a related bug: https://bugreports.qt.io/browse/QTBUG-81247.
    • It appears to be largely a sequencing error, and the QML engine needs to be stopped/destroyed first to stop binding reevaluation.
    • I broke apart some of the Application plugin tests to try to narrow down where the remaining warnings were coming from. I managed to get to the TestBadInheritancePlugin, but couldn't determine what is wrong with that particular test.

Signed-off-by: Michael Carroll michael@openrobotics.org

@github-actions github-actions bot added the 🌱 garden Ignition Garden label May 24, 2022
@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #404 (005212e) into main (7c4c683) will decrease coverage by 0.02%.
The diff coverage is 77.77%.

❗ Current head 005212e differs from pull request most recent head ff7646e. Consider uploading reports for the commit ff7646e to get more accurate results

@@            Coverage Diff             @@
##             main     #404      +/-   ##
==========================================
- Coverage   68.12%   68.10%   -0.02%     
==========================================
  Files          38       38              
  Lines        5364     5367       +3     
==========================================
+ Hits         3654     3655       +1     
- Misses       1710     1712       +2     
Files Changed Coverage Δ
src/Application.cc 84.09% <71.42%> (-0.41%) ⬇️
src/plugins/minimal_scene/MinimalSceneRhiOpenGL.cc 90.62% <100.00%> (+0.09%) ⬆️

@mjcarroll mjcarroll marked this pull request as draft May 26, 2022 17:11
@mjcarroll
Copy link
Contributor Author

@osrf-jenkins retest this please

@xlla
Copy link

xlla commented May 28, 2022

  • It appears to be largely a sequencing error, and the QML engine needs to be stopped/destroyed first to stop binding reevaluation.

hi @mjcarroll , before merge this PR, it has many QML warnings while quit from gazebo gui.

...
[GUI] [Dbg] [MinimalScene.cc:662] Destroy scene [scene]
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:52: TypeError: Cannot read property 'dialogOnExitText' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:54: TypeError: Cannot read property 'exitDialogShowCloseGui' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:53: TypeError: Cannot read property 'exitDialogShowShutdown' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:246: TypeError: Cannot read property 'showDrawer' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:/qml/SideDrawer.qml:93: TypeError: Cannot read property 'showDefaultDrawerOpts' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:/qml/GzSplit.qml:56: TypeError: Cannot read property 'pluginCount' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:41: TypeError: Cannot read property 'toolBarColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:42: TypeError: Cannot read property 'toolBarTextColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:43: TypeError: Cannot read property 'toolBarColorDark' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:44: TypeError: Cannot read property 'toolBarTextColorDark' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:45: TypeError: Cannot read property 'pluginToolBarColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:46: TypeError: Cannot read property 'pluginToolBarTextColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:47: TypeError: Cannot read property 'pluginToolBarColorDark' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:48: TypeError: Cannot read property 'pluginToolBarTextColorDark' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:50: TypeError: Cannot read property 'defaultExitAction' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:51: TypeError: Cannot read property 'showDialogOnExit' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:55: TypeError: Cannot read property 'exitDialogShutdownText' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:56: TypeError: Cannot read property 'exitDialogCloseGuiText' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:66: TypeError: Cannot read property 'toolBarColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:76: TypeError: Cannot read property 'toolBarTextColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:214: TypeError: Cannot read property 'showPluginMenu' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:197: TypeError: Cannot read property 'showDrawer' of null
[GUI] [Wrn] [Application.cc:813] [QT] qrc:qml/Main.qml:183: TypeError: Cannot read property 'showDrawer' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:128: TypeError: Cannot read property 'pluginToolBarColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:139: TypeError: Cannot read property 'pluginToolBarTextColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:128: TypeError: Cannot read property 'pluginToolBarColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:139: TypeError: Cannot read property 'pluginToolBarTextColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:128: TypeError: Cannot read property 'pluginToolBarColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:139: TypeError: Cannot read property 'pluginToolBarTextColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:128: TypeError: Cannot read property 'pluginToolBarColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:139: TypeError: Cannot read property 'pluginToolBarTextColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:128: TypeError: Cannot read property 'pluginToolBarColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:139: TypeError: Cannot read property 'pluginToolBarTextColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:128: TypeError: Cannot read property 'pluginToolBarColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:139: TypeError: Cannot read property 'pluginToolBarTextColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:128: TypeError: Cannot read property 'pluginToolBarColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:139: TypeError: Cannot read property 'pluginToolBarTextColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:128: TypeError: Cannot read property 'pluginToolBarColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:139: TypeError: Cannot read property 'pluginToolBarTextColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:128: TypeError: Cannot read property 'pluginToolBarColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:139: TypeError: Cannot read property 'pluginToolBarTextColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:128: TypeError: Cannot read property 'pluginToolBarColorLight' of null
[GUI] [Wrn] [Application.cc:813] [QT] file::qml/IgnCard.qml:139: TypeError: Cannot read property 'pluginToolBarTextColorLight' of null

after apply this PR, those warnings was gone, but new warnings appear.

[GUI] [Dbg] [MinimalScene.cc:662] Destroy scene [scene]
[GUI] [Wrn] [Application.cc:819] [QT] file::/Gazebo/GazeboDrawer.qml:264: TypeError: Cannot read property 'width' of null
[GUI] [Wrn] [Application.cc:819] [QT] file::/Gazebo/GazeboDrawer.qml:265: TypeError: Cannot read property 'height' of null
[GUI] [Wrn] [Application.cc:819] [QT] file::/Gazebo/GazeboDrawer.qml:181: TypeError: Cannot read property 'width' of null
[GUI] [Wrn] [Application.cc:819] [QT] file::/Gazebo/GazeboDrawer.qml:182: TypeError: Cannot read property 'height' of null
[GUI] [Wrn] [Application.cc:819] [QT] file::/Gazebo/GazeboDrawer.qml:154: TypeError: Cannot read property 'width' of null
[GUI] [Wrn] [Application.cc:819] [QT] file::/Gazebo/GazeboDrawer.qml:155: TypeError: Cannot read property 'width' of null
[GUI] [Wrn] [Application.cc:819] [QT] file::/Gazebo/GazeboDrawer.qml:156: TypeError: Cannot read property 'height' of null

@chapulina chapulina added the bug Something isn't working label Jul 28, 2022
@chapulina chapulina changed the base branch from main to gz-gui7 August 5, 2022 19:06
@azeey azeey added the beta Targeting beta release of upcoming collection label Jul 31, 2023
Cleans up corresponding deprecation warnings

Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
This narrows the warnings to LoadBadInheritancePlugin.

Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
@mjcarroll mjcarroll changed the base branch from gz-gui7 to main August 23, 2023 21:10
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
@mjcarroll mjcarroll marked this pull request as ready for review August 24, 2023 16:04
@jennuine
Copy link
Contributor

@azeey
Copy link
Contributor

azeey commented Aug 25, 2023

MainWindow_TEST is failing: https://build.osrfoundation.org/job/ignition_gui-ci-pr_any-ubuntu_auto-amd64/2027/testReport/(root)/MainWindowTest/ApplyConfig/

We can ignore Focal builds for Harmonic.

@azeey
Copy link
Contributor

azeey commented Aug 25, 2023

There are still some warnings on Jammy. Was this meant to address all warnings?

@mjcarroll
Copy link
Contributor Author

Was this meant to address all warnings?

Just greatly reduce unfortunately, there is still a Qt sequencing issue that I haven't been able to resolve those last few.

@iche033
Copy link
Contributor

iche033 commented Aug 25, 2023

I found that if you change the TestBadInheritancePlugin to load a plugin that inherits something other than MainWindow, e.g. Dialog, the warnings for that test are gone. I think the idea behind that test remains the same, bad inheritance, but just inheriting from a different class.

diff
diff --git a/test/plugins/TestBadInheritancePlugin.cc b/test/plugins/TestBadInheritancePlugin.cc
index db360125..7feb80e6 100644
--- a/test/plugins/TestBadInheritancePlugin.cc
+++ b/test/plugins/TestBadInheritancePlugin.cc
@@ -25,7 +25,7 @@ using namespace gui;
 
 /////////////////////////////////////////////////
 TestBadInheritancePlugin::TestBadInheritancePlugin()
-  : MainWindow()
+  : Dialog()
 {
 }
 
@@ -36,4 +36,4 @@ TestBadInheritancePlugin::~TestBadInheritancePlugin()
 
 // Register this plugin
 GZ_ADD_PLUGIN(TestBadInheritancePlugin,
-              gui::MainWindow)
+              gui::Dialog)
diff --git a/test/plugins/TestBadInheritancePlugin.hh b/test/plugins/TestBadInheritancePlugin.hh
index bd301cf3..59550f1b 100644
--- a/test/plugins/TestBadInheritancePlugin.hh
+++ b/test/plugins/TestBadInheritancePlugin.hh
@@ -20,14 +20,14 @@
 
 #ifndef Q_MOC_RUN
   #include <gz/gui/qt.h>
-  #include <gz/gui/MainWindow.hh>
+  #include <gz/gui/Dialog.hh>
 #endif
 
 namespace gz
 {
   namespace gui
   {
-    class TestBadInheritancePlugin : public MainWindow
+    class TestBadInheritancePlugin : public Dialog
     {
       Q_OBJECT

Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
@mjcarroll
Copy link
Contributor Author

MainWindow_TEST is failing

So it's now only failing on focal, which we aren't targeting with main at this point. I think this is good to go.

@mjcarroll mjcarroll merged commit 181a0d5 into main Aug 28, 2023
5 of 6 checks passed
@mjcarroll mjcarroll deleted the jammy_warnings branch August 28, 2023 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Targeting beta release of upcoming collection bug Something isn't working 🌱 garden Ignition Garden
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants