MainView.qml:257: TypeError: Cannot call method 'hasOwnProperty' of null

Bug #1244660 reported by Olivier Tilloy
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
Medium
Tim Peeters
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Undecided
Tim Peeters

Bug Description

I’ve seen the following error message printed out in the console in a variety of situations for applications using a MainView:

    file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/MainView.qml:257: TypeError: Cannot call method 'hasOwnProperty' of null

It might be harmless (seems so at a first glance, at least the applications’ functionality doesn’t seem affected), but either way it should be easy to add a check in order to avoid the error message.

One way to reliably reproduce is with webbrowser-app, reveal the toolbar and click the activity button to show the activity view, then reveal the toolbar and click the activity button again to hide the view.

Related branches

Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

I can confirm that following the steps suggested by Olivier I get the error to show up in the application output.

Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

After some more testing, I can also reliably reproduce this problem using dialer-app simply by alternating between the three tabs of the app.

Changed in ubuntu-ui-toolkit:
status: New → Confirmed
Revision history for this message
Kai Mast (kai-mast) wrote :

I have this too in the friends app. It seems to happen when the content is moved and the Header calls isPage.

Stupid idea, just check null?

Revision history for this message
Tim Peeters (tpeeters) wrote :

yeah, I'll go for the stupid idea suggested above :D

Changed in ubuntu-ui-toolkit:
assignee: nobody → Tim Peeters (tpeeters)
importance: Undecided → Medium
status: Confirmed → In Progress
Revision history for this message
Tim Peeters (tpeeters) wrote :
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-ui-toolkit at revision None, scheduled for release in ubuntu-ui-toolkit, milestone Unknown

Changed in ubuntu-ui-toolkit:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-ui-toolkit - 0.1.46+14.04.20131108.3-0ubuntu1

---------------
ubuntu-ui-toolkit (0.1.46+14.04.20131108.3-0ubuntu1) trusty; urgency=low

  [ Leo Arias ]
  * Add a check for the autopilot version on the emulator init. (LP:
    #1248570)
  * Ensure the toolbar is opened when clicking a toolbar in autopilot
    tests. (LP: #1248487)

  [ Nicolas d'Offay ]
  * Reverted API break on the selectors. (LP: #1248646)

  [ tpeeters ]
  * Ensure the toolbar is opened when clicking a toolbar in autopilot
    tests. (LP: #1248487)
  * before fixing the actual bug, the test gives me these errors: QWARN
    : tst_MainView::testNoWarnings_bug186065()
    unity::action::ActionManager::ActionManager(QObject*): Could not
    determine application identifier. HUD will not work properly.
    Provide your application identifier in $APP_ID environment variable.
    QWARN : tst_MainView::testNoWarnings_bug186065()
    file:///home/tim/dev/ubuntu-ui-
    toolkit/fix1244660/modules/Ubuntu/Components/MainView.qml:257:
    TypeError: Cannot call method 'hasOwnProperty' of null **
    (process:27191): CRITICAL **: Unable to get session bus: Operation
    was cancelled QWARN : tst_MainView::testNoWarnings_bug186065() Don't
    know how to handle 'QList<QQmlError>', use qRegisterMetaType to
    register it. PASS : tst_MainView::testNoWarnings_bug186065() PASS :
    tst_MainView::cleanupTestCase() Totals: 8 passed, 0 failed, 0
    skipped ********* Finished testing of tst_MainView ********* I get
    the same when I execute unit_x11/tst_orientation/tst_orientation:
    QWARN : tst_OrientationTest::test_defaults() Don't know how to
    handle 'QList<QQmlError>', use qRegisterMetaType to register it.
    PASS : tst_OrientationTest::test_defaults() Should I execute the
    tests in a different way?. (LP: #186065, #1244660)

  [ Robert Bruce Park ]
  * (no message)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 828
 -- Ubuntu daily release <email address hidden> Fri, 08 Nov 2013 22:02:57 +0000

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
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.