Autopilot tests crashing in switch_to_tab helper

Bug #1294181 reported by Nicholas Skaggs
36
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Calendar App
Fix Released
Critical
Renato Araujo Oliveira Filho
qtdeclarative-opensource-src (Ubuntu)
Fix Released
Undecided
Timo Jyrinki

Bug Description

This bug is blocking bug #1293489 fix from landing.

EDIT: It seems like the other tabs also suffer from this issue, so it's not just dayview

Have a look at the following log to see this:

http://91.189.93.70:8080/job/generic-mediumtests-trusty/1783/testReport/junit/calendar_app.tests.test_dayview/TestDayView/test_show_current_days_with_mouse_/

You can reproduce by checking out trunk and running any of the test_dayview tests. The app will hang trying to switch to the dayview tab and the test will fail.

Traceback for this looks like this. It seemingly indicates something is wrong with the toolkit helper switch_to_tab. However the toolkit tests pass on the same install and the crashing behavior seems limited to calendar and in particular the dayview tab.

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/calendar_app/tests/test_dayview.py", line 31, in setUp
    self.main_view.switch_to_tab("dayTab")
  File "/usr/lib/python2.7/dist-packages/autopilot/logging.py", line 46, in inner
    return f(instance, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/ubuntuuitoolkit/emulators.py", line 187, in switch_to_tab
    return self.switch_to_tab_by_index(tab.index)
  File "/usr/lib/python2.7/dist-packages/autopilot/logging.py", line 46, in inner
    return f(instance, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/ubuntuuitoolkit/emulators.py", line 156, in switch_to_tab_by_index
    current_tab = self.switch_to_next_tab()
  File "/usr/lib/python2.7/dist-packages/autopilot/logging.py", line 46, in inner
    return f(instance, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/ubuntuuitoolkit/emulators.py", line 127, in switch_to_next_tab
    self.get_header().switch_to_next_tab()
  File "/usr/lib/python2.7/dist-packages/autopilot/logging.py", line 46, in inner
    return f(instance, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/ubuntuuitoolkit/emulators.py", line 230, in switch_to_next_tab
    self._get_animating().wait_for(False)
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/types.py", line 158, in wait_for
    _, new_state = self.parent.get_new_state()
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/dbus.py", line 560, in get_new_state
    return self.get_state_by_path(self.get_class_query_string())[0]
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/dbus.py", line 540, in get_state_by_path
    data = self._backend.introspection_iface.GetState(piece)
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/backends.py", line 101, in introspection_iface
    "Application under test exited before the test finished!"
RuntimeError: Application under test exited before the test finished!

Related branches

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

From Omer:

<om26er> balloons, probably the issue goes back to QtOrganizer not playing well with 5.2
<om26er> file:///usr/share/click/preinstalled/com.ubuntu.calendar/0.4.201/calendar.qml:85: TypeError: Cannot call method 'isSameDay' of undefined
<om26er> virtual QString QOrganizerEDSFactory::managerName() const
<om26er> virtual QtOrganizer::QOrganizerManagerEngine* QOrganizerEDSFactory::engine(const QMap<QString, QString>&, QtOrganizer::QOrganizerManager::Error*) eds

description: updated
summary: - Dayview autopilot tests crashing under qt 5.2 in switch_to_tab helper
+ Autopilot tests crashing under qt 5.2 in switch_to_tab helper
summary: - Autopilot tests crashing under qt 5.2 in switch_to_tab helper
+ Autopilot tests crashing in switch_to_tab helper
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Running the app on the desktop via qmlscene segfaults when manually selecting dayview as well.

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :
Download full text (15.1 KiB)

Thread 19 (Thread 0x7f3983360700 (LWP 8550)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
No locals.
#1 0x00007f39cd7f87fa in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
No symbol table info available.
#2 0x00007f39cf3d8b2b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
No symbol table info available.
#3 0x00007f39cf3d8c29 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
No symbol table info available.
#4 0x00007f39cd7f8233 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
No symbol table info available.
#5 0x00007f39cc5d6182 in start_thread (arg=0x7f3983360700) at pthread_create.c:312
        __res = <optimized out>
        pd = 0x7f3983360700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {139884991219456, 2778077851203476000, 1, 0, 139884991220160, 139884991219456, -2810613963604288992, -2810756697528264160}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#6 0x00007f39cce9012d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
No locals.

Thread 18 (Thread 0x7f39aeffd700 (LWP 8543)):
#0 0x00007f39cce82ddd in poll () at ../sysdeps/unix/syscall-template.S:81
No locals.
#1 0x00007f39cc0bdfe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#2 0x00007f39cc0be30a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#3 0x00007f3987208ae3 in ?? () from /usr/lib/libecal-1.2.so.16
No symbol table info available.
#4 0x00007f39cc0e2f15 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#5 0x00007f39cc5d6182 in start_thread (arg=0x7f39aeffd700) at pthread_create.c:312
        __res = <optimized out>
        pd = 0x7f39aeffd700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {139885725865728, 2778077851203476000, 1, 28507952, 139885725866432, 139885725865728, -2810550828121908704, -2810756697528264160}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#6 0x00007f39cce9012d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
No locals.

Thread 17 (Thread 0x7f39af7fe700 (LWP 8542)):
#0 0x00007f39cce82ddd in poll () at ../sysdeps/unix/syscall-template.S:81
No locals.
#1 0x00007f39cc0bdfe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#2 0x00007f39cc0be30a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#3 0x00007f3986d37d57 in ?? () from /usr/lib/libedataserver-1.2.so.18
No symbol table info available.
#4 0x00007f39cc0e2f15 in ...

Revision history for this message
Olivier Tilloy (osomon) wrote :

This is a slightly more useful backtrace:

#0 value (this=0x38) at jsruntime/qv4value_p.h:327
#1 QV4::__qmljs_get_imported_scripts (ctx=<optimized out>) at jsruntime/qv4runtime.cpp:1323
#2 0x00007f77f6842b4a in ?? ()
#3 0x0000000000000029 in ?? ()
#4 0x000000000190a120 in ?? ()
#5 0x00007fff0cd23ce0 in ?? ()
#6 0x00007f77fbed2480 in ?? ()
#7 0x000000000146ce00 in ?? ()
#8 0x000000000146ce00 in ?? ()
#9 0x00007fff0cd242e0 in ?? ()
#10 0x000000000146ce00 in ?? ()
#11 0x000000000146ce00 in ?? ()
#12 0x00007f7835e8866b in QV4::SimpleScriptFunction::call (that=0x7f77fbed2480, callData=<optimized out>)
    at jsruntime/qv4functionobject.cpp:586
#13 0x00007f7835ecf8b9 in call (callData=0x7f781497e2f0, this=<optimized out>)
    at ../../include/QtQml/5.2.1/QtQml/private/../../../../../src/qml/jsruntime/qv4functionobject_p.h:133
#14 QV4::QObjectSlotDispatcher::impl (which=<optimized out>, this_=<optimized out>, r=<optimized out>,
    metaArgs=0x7fff0cd23ce0, ret=<optimized out>) at jsruntime/qv4qobjectwrapper.cpp:779
#15 0x00007f7834a64d73 in call (a=0x7fff0cd23ce0, r=0x18fcd60, this=0x1a34440)
    at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:132
#16 QMetaObject::activate (sender=0x18fcd60, signalOffset=<optimized out>, local_signal_index=<optimized out>,
    argv=argv@entry=0x7fff0cd23ce0) at kernel/qobject.cpp:3561
#17 0x00007f7835ee2905 in QQmlVMEMetaObject::activate (this=this@entry=0x18af280, object=<optimized out>,
    index=index@entry=90, args=args@entry=0x7fff0cd23ce0) at qml/qqmlvmemetaobject.cpp:1332
#18 0x00007f7835ee4eaf in QQmlVMEMetaObject::metaCall (this=0x18af280, c=QMetaObject::InvokeMetaMethod, _id=90,
    a=0x7fff0cd23ce0) at qml/qqmlvmemetaobject.cpp:922
#19 0x00007f7835ecb8be in CallMethod (object=object@entry=0x18fcd60, index=90, returnType=returnType@entry=43,
    argCount=argCount@entry=0, argTypes=argTypes@entry=0x0, engine=engine@entry=0x146c0f0,
    callArgs=callArgs@entry=0x7f781497e298) at jsruntime/qv4qobjectwrapper.cpp:1133
#20 0x00007f7835ece163 in CallPrecise (object=object@entry=0x18fcd60, data=..., engine=engine@entry=0x146c0f0,
    callArgs=callArgs@entry=0x7f781497e298) at jsruntime/qv4qobjectwrapper.cpp:1366
#21 0x00007f7835ece889 in QV4::QObjectMethod::callInternal (this=0x7f77f440db80, callData=0x7f781497e298)
    at jsruntime/qv4qobjectwrapper.cpp:1837
#22 0x00007f7835e538ee in call (callData=0x7f781497e298, this=<optimized out>) at jsruntime/qv4functionobject_p.h:133
---Type <return> to continue, or q <return> to quit---
#23 QV4::__qmljs_call_activation_property (context=<optimized out>, name=..., callData=...)
    at jsruntime/qv4runtime.cpp:889
#24 0x00007f77fe381f88 in ?? ()
#25 0x0000000000000000 in ?? ()

Revision history for this message
Olivier Tilloy (osomon) wrote :

I did a bit of debugging, and when the crash occurs when switching to the day view, it seems it’s blowing up on "item.currentDay = tabPage.currentDay" in the dayPage.onLoaded slot. Indeed, if I comment out this instruction, the crash is gone.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

lp:daisy using backtrace in bug #1294995

Revision history for this message
Albert Astals Cid (aacid) wrote :

Hint, next time you get lots of ?? in QML backtraces export QV4_FORCE_INTERPRETER=1 so that the JIT is not run and we get a better backtrace (it may even fix the crash and thus may mean the JIT is broken)

Revision history for this message
Olivier Tilloy (osomon) wrote :
Download full text (7.2 KiB)

Thanks for the tip Albert. I’m still reliably observing the crash with QV4_FORCE_INTERPRETER=1, and here is a complete backtrace:

#0 QV4::__qmljs_get_imported_scripts (ctx=ctx@entry=0x7fffffffbb80) at jsruntime/qv4runtime.cpp:1323
#1 0x00007ffff7429c7d in QQmlJS::Moth::VME::run (this=this@entry=0x7fffffffbb37,
    context=context@entry=0x7fffffffbb80, code=code@entry=0x7fffbc286f38 "\020\204B\367\377\177",
    stack=0x7fffd57fc110, stack@entry=0x0, stackSize=20, stackSize@entry=0, storeJumpTable=storeJumpTable@entry=0x0)
    at jsruntime/qv4vme_moth.cpp:669
#2 0x00007ffff742b108 in QQmlJS::Moth::VME::exec (ctxt=0x7fffffffbb80, code=0x7fffbc286f38 "\020\204B\367\377\177")
    at jsruntime/qv4vme_moth.cpp:724
#3 0x00007ffff73df66b in QV4::SimpleScriptFunction::call (that=0x7fffc14a1380, callData=<optimized out>)
    at jsruntime/qv4functionobject.cpp:586
#4 0x00007ffff74268b9 in call (callData=0x7fffd57fc0c0, this=<optimized out>)
    at ../../include/QtQml/5.2.1/QtQml/private/../../../../../src/qml/jsruntime/qv4functionobject_p.h:133
#5 QV4::QObjectSlotDispatcher::impl (which=<optimized out>, this_=<optimized out>, r=<optimized out>,
    metaArgs=0x7fffffffbff0, ret=<optimized out>) at jsruntime/qv4qobjectwrapper.cpp:779
#6 0x00007ffff5fbbd73 in call (a=0x7fffffffbff0, r=0x129da20, this=0xd45730)
    at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:132
#7 QMetaObject::activate (sender=0x129da20, signalOffset=<optimized out>, local_signal_index=<optimized out>,
    argv=argv@entry=0x7fffffffbff0) at kernel/qobject.cpp:3561
#8 0x00007ffff7439905 in QQmlVMEMetaObject::activate (this=this@entry=0x12a6b40, object=<optimized out>,
    index=index@entry=90, args=args@entry=0x7fffffffbff0) at qml/qqmlvmemetaobject.cpp:1332
#9 0x00007ffff743beaf in QQmlVMEMetaObject::metaCall (this=0x12a6b40, c=QMetaObject::InvokeMetaMethod, _id=90,
    a=0x7fffffffbff0) at qml/qqmlvmemetaobject.cpp:922
#10 0x00007ffff74228be in CallMethod (object=object@entry=0x129da20, index=90, returnType=returnType@entry=43,
    argCount=argCount@entry=0, argTypes=argTypes@entry=0x0, engine=engine@entry=0x843050,
    callArgs=callArgs@entry=0x7fffd57fc068) at jsruntime/qv4qobjectwrapper.cpp:1133
#11 0x00007ffff7425163 in CallPrecise (object=object@entry=0x129da20, data=..., engine=engine@entry=0x843050,
    callArgs=callArgs@entry=0x7fffd57fc068) at jsruntime/qv4qobjectwrapper.cpp:1366
#12 0x00007ffff7425889 in QV4::QObjectMethod::callInternal (this=0x7fffc13ce6a0, callData=0x7fffd57fc068)
    at jsruntime/qv4qobjectwrapper.cpp:1837
#13 0x00007ffff73aa8ee in call (callData=0x7fffd57fc068, this=<optimized out>) at jsruntime/qv4functionobject_p.h:133
#14 QV4::__qmljs_call_activation_property (context=context@entry=0x7fffffffc6a0, name=..., callData=...)
    at jsruntime/qv4runtime.cpp:889
#15 0x00007ffff74295ac in QQmlJS::Moth::VME::run (this=this@entry=0x7fffffffc657,
    context=context@entry=0x7fffffffc6a0, code=code@entry=0x7fffbc1cea88 "\020\204B\367\377\177",
    stack=0x7fffd57fc058, stack@entry=0x0, stackSize=10, stackSize@entry=0, storeJumpTable=storeJumpTable@entry=0x0)
    at jsruntime/qv4vme_moth.cpp:390
#16 0x00007ffff742b108 in QQmlJ...

Read more...

description: updated
Revision history for this message
Olivier Tilloy (osomon) wrote :

It looks like the issue is in QtOrganizer.

Changed in ubuntu-calendar-app:
assignee: nobody → Renato Araujo Oliveira Filho (renatofilho)
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-calendar-app at revision 213, scheduled for release in ubuntu-calendar-app, milestone alpha-1

Changed in ubuntu-calendar-app:
status: Confirmed → Fix Committed
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Upstream bug regarding the original crasher https://bugreports.qt-project.org/browse/QTBUG-37303

Changed in qtdeclarative-opensource-src (Ubuntu):
assignee: nobody → Timo Jyrinki (timo-jyrinki)
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtdeclarative-opensource-src - 5.2.1-3ubuntu11

---------------
qtdeclarative-opensource-src (5.2.1-3ubuntu11) trusty; urgency=medium

  * debian/patches/Don-t-crash-on-Runtime-getQmlImportedScripts.patch
    - Backport from upstream code submittal (LP: #1294181)
  * debian/patches/Fix-global-object-handling-in-worker-script-JS-files.patch
    - Backport a fix from upstream (LP: #1294019)
  * debian/patches/V4-JIT-save-restore-ebx-GOT-ptr-on-linux-x86.patch
    debian/patches/V4-fix-range-sorting.patch
    debian/patches/V4-regalloc-fix-interval-splitting-when-register-pre.patch
    - Replace Don-t-use-ebx-in-the-x86-register-allocator.patch with a newer
      set of fixes from upstream (LP: #1271033)
 -- Timo Jyrinki <email address hidden> Mon, 24 Mar 2014 06:27:18 +0000

Changed in qtdeclarative-opensource-src (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-calendar-app:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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