tst_pagestack_deprecated_toolbar unit test warnings with qt56

Bug #1622577 reported by Tim Peeters
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Critical
Tim Peeters

Bug Description

ubuntu@xenial1:~/dev/ubuntu-ui-toolkit/staging/tests/unit/components$ qmltestrunner -import ../../../qml/ -input tst_pagestack_deprecated_toolbar.qml
qml: Page.tools is a deprecated property. Please use Page.head instead.
qml: Page.tools is a deprecated property. Please use Page.head instead.
qml: WARNING! Do not put Page/Tabs/PageStack inside another Page because that causes confusion which is the active page that sets the title and actions.
qml: WARNING! Do not put Page/Tabs/PageStack inside another Page because that causes confusion which is the active page that sets the title and actions.
********* Start testing of qmltestrunner *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.4.0 20160609)
PASS : qmltestrunner::PageStackAPI::initTestCase()
PASS : qmltestrunner::PageStackAPI::test_active_bug1260116()
QDEBUG : qmltestrunner::PageStackAPI::test_active_bug1260116() qml: Page.tools is a deprecated property. Please use Page.head instead.
PASS : qmltestrunner::PageStackAPI::test_currentPage()
PASS : qmltestrunner::PageStackAPI::test_depth()
PASS : qmltestrunner::PageStackAPI::test_pop_to_tabs_bug1316736()
PASS : qmltestrunner::PageStackAPI::test_tabs_inside_stack_bug1187850()
PASS : qmltestrunner::PageStackAPI::test_title_bug1143345_bug1317902()
PASS : qmltestrunner::PageStackAPI::test_tools_bug1126197()
QDEBUG : qmltestrunner::PageStackAPI::test_tools_bug1126197() qml: Page.tools is a deprecated property. Please use Page.head instead.
PASS : qmltestrunner::PageStackAPI::cleanupTestCase()
QWARN : qmltestrunner::UnknownTestFunc() file:///home/ubuntu/dev/ubuntu-ui-toolkit/staging/qml/Ubuntu/Components/Themes/Ambiance/1.2/TabBarStyle.qml:144: TypeError: Cannot read property 'count' of null
QWARN : qmltestrunner::UnknownTestFunc() file:///home/ubuntu/dev/ubuntu-ui-toolkit/staging/qml/Ubuntu/Components/Themes/Ambiance/1.2/TabBarStyle.qml:144: TypeError: Cannot read property 'count' of null
QWARN : qmltestrunner::UnknownTestFunc() file:///home/ubuntu/dev/ubuntu-ui-toolkit/staging/qml/Ubuntu/Components/Themes/Ambiance/1.2/TabBarStyle.qml:144: TypeError: Cannot read property 'count' of null
QWARN : qmltestrunner::UnknownTestFunc() file:///home/ubuntu/dev/ubuntu-ui-toolkit/staging/qml/Ubuntu/Components/Themes/Ambiance/1.2/TabBarStyle.qml:144: TypeError: Cannot read property 'count' of null
QWARN : qmltestrunner::UnknownTestFunc() file:///home/ubuntu/dev/ubuntu-ui-toolkit/staging/qml/Ubuntu/Components/Themes/Ambiance/1.2/TabBarStyle.qml:144: TypeError: Cannot read property 'count' of null
QWARN : qmltestrunner::UnknownTestFunc() file:///home/ubuntu/dev/ubuntu-ui-toolkit/staging/qml/Ubuntu/Components/Themes/Ambiance/1.2/TabBarStyle.qml:144: TypeError: Cannot read property 'count' of null
Totals: 9 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of qmltestrunner *********

Tags: qt5.6

Related branches

Tim Peeters (tpeeters)
summary: - tst_pargestack_deprecated_toolbar unit test failures with qt56
+ tst_pargestack_deprecated_toolbar unit test warnings with qt56
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Tim Peeters (tpeeters)
summary: - tst_pargestack_deprecated_toolbar unit test warnings with qt56
+ tst_pagestack_deprecated_toolbar unit test warnings with qt56
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Undecided → High
importance: High → Critical
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Confirmed
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Critical → High
Revision history for this message
Tim Peeters (tpeeters) wrote :

I can take this bug later, but I un-assign myself for now so I won't prevent anyone else from working on it while I work on another Qt 5.6 bug.

Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: Tim Peeters (tpeeters) → nobody
Revision history for this message
Andrea Bernabei (faenil) wrote :

What I'm seeing here:
- the problem appears when cleanupTestCase() tries to destroy the components
- cleanupTestCase() destroys Tabs
- TabBar is somehow destroyed before its style.
- tabsModel in TabBarStyle becomes null because styledItem becomes null
- isVisible() in TabBarStyle tries to access tabsModel.count and that triggers the error.

Adding
"if (!tabsModel) return false"
is enough to fix the test, although I'm not sure that's the way we want to go. We should investigate why that wasn't needed before Qt5.6 and why, for instance, the "selected" property binding (which still relies on tabsModel.count) does not fire any error.

Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: High → Critical
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Tim Peeters (tpeeters)
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → In Progress
Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.4 KiB)

This bug was fixed in the package ubuntu-ui-toolkit - 1.3.2135+16.10.20161003.1

---------------
ubuntu-ui-toolkit (1.3.2135+16.10.20161003.1) yakkety; urgency=medium

  [ Christian Dywan ]
  * Fix warning about using implicit char* to QString conversion.
  * __styleInstance may be null, when doesn't handle that. Fixes LP: #1586013
  * Focus ring, arrow keys and space to expand OptionSelector.
    Fixes LP: #1514860
  * Use QStringLiteral with QString.replace. Fixes LP: #1625507
  * Use displayText to determine if the clear button should show.
    Fixes LP: #1461571
  * && escapes an ampersand used in a mnemonic label. Fixes LP: #1587580
  * Try harder to pass an item to QuickUtils.rootItem. Fixes LP: #1586013

  [ Timo Jyrinki ]
  * Enable arm64 unit tests on xenial and newer. Fixes LP: #1580172.
  * Add initial snapcraft.yaml

  [ Marco Trevisan ]
  * UCSlotsLayout: update the size of the element when top/bottom paddings change.
    Fixes LP: #1628161

  [ Tim Peeters ]
  * Ensure that the model in TabBarStyle is a list and not null.
    Fixes LP: #1622577.
  * Initialize the 'window' context property with null and add MainView 1.3 unit
    tests. Fixes LP: #1610231, LP: #1621509, LP: #1625993.
  * Fix libpng sRGB profile warnings on Yakkety. Fixes LP: #1625137.
  * Disable layouts unit test to work around bug 1625137 on Yakkety.

  [ Zsombor Egri ]
  * Fix AdaptivePageLayout behavior on Qt5.6. Fixes LP: #1585996.
  * Fix property binding restore on theme palette values. Fixes LP: #1570478.
  * Move activeFocusOnTab from style into components. Fixes LP: #1590005.

  [ Loïc Molinari ]
  * Added public headers extra robustness checks. Made use of the qmake
    headersclean feature to check the robustness of our public headers.
  * Excluded LTTng features from non-Linux builds.
  * Moved common C++ configs to ubuntu_common.prf. The common config file
    doesn't add -Werror directly to QMAKE_CXXFLAGS anymore, it sets the
    warnings_are_errors variable so that it is correctly handled by different
    compilers (not just GCC). That allows to remove the
    -Werror=deprecated-declarations flag since warnings_are_errors defines it
    for us. Removed the DEFINES += QT_USE_QSTRINGBUILDER lines since it's
    already handled by qt_module.prf. Set the -Wsuggest-override warning to
    QMAKE_CXXFLAGS_WARN_ON instead of QMAKE_CXXFLAGS directly.
  * Cleaned up qmake Ubuntu packaging variables. The qtbase packaging for Ubuntu
    exports the CFLAGS, CXXFLAGS and LFLAGS variables in the environment before
    running configure so that the qtbase shared libraries can be compiled with
    the required distribution defined compiler flags. That is fine (though I
    guess that could be handled better at the qtbase packaging level with maybe
    a dedicated prf) but it results in qt_build_config.prf defining the
    QMAKE_CFLAGS, QMAKE_CXXFLAGS and QMAKE_LFLAGS variables with these
    distribution specific flags. Since we load this prf, these variables end up
    being defined when building the toolkit for development purpose. This is
    problematic because -O2 and -g are always defined (whatever the debug or
    release config chosen by the developer), al...

Read more...

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.