← Back to team overview

touch-packages team mailing list archive

[Bug 1436088] Re: Launcher crashes in console.warn() with Qt.Test import

 

when I have "when: windowShown" in the UbuntuTestCase, the crash does
not seem to happen.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1436088

Title:
  Launcher crashes in console.warn() with Qt.Test import

Status in ubuntu-ui-toolkit package in Ubuntu:
  Confirmed

Bug description:
  Launching this app with launcher:

  import QtQuick 2.4
  import Ubuntu.Test 1.0

  UbuntuTestCase {
      function test_something() {
          console.warn("hello");
      }
  }

  
  will dump core, like this:

  tim@ubuntu:~/dev/ubuntu-ui-toolkit/m/35-tstHeaderActions/tests/unit/tst_components$ ../../launcher/launcher tst_header_sections.qml 
  ASSERT: "QTest::TestLoggers::loggerCount() != 0" in file qtestlog.cpp, line 274
  Aborted (core dumped)

  
  Note that you don't have to call console.warn() directly, but it may be called by changing a parameter for testing. The original test (tst_header_sections.qml) crashes because it has this function:

      function test_warn_when_too_many_sections() {
          ignoreWarning("It is not recommended or supported to use more than three sections in Page.head.sections.model.")
          page.head.sections.model = ["1", "2", "3", "4"];
      }

  which crashes because PageHeadSections currently has this warning
  printed:

      onModelChanged: {
          if (model && model.length > 3) {
              console.warn("It is not recommended or supported to use more than three sections in Page.head.sections.model.");
          }
      }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1436088/+subscriptions


References