qt5: Crash in WPushButtonTest::QuickPressNoLatchTest

Bug #1531642 reported by Uwe Klotz
8
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Low
Unassigned

Bug Description

The unit tests crash with SIGSEGV in WPushButtonTest::QuickPressNoLatchTest.

Tags: qt5 test
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

Running the crashing tests exclusively finishes successfully:

mixxx-test --args --gtest_filter=WPushButtonTest.*

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

Might be related to BeatFactory::deleteBeats()

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

This crash does only occur during tests. The application runs flawlessly.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Can you reproduce with the 2.2 branch and a recent Qt 5 version?

Changed in mixxx:
milestone: none → 2.2.0
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :
Download full text (5.9 KiB)

I think the general pattern is that WPushButtonTest calls qWait which runs the Qt event loop, processing events that have been queued from other tests.

Here's an example where GlobalTrackCache::~GlobalTrackCache is run from a deleteLater event:

[ RUN ] WPushButtonTest.QuickPressNoLatchTest
Loading resources from "/home/rryan/Code/mixxx/res/"
ControlDoublePrivate::getControl returning NULL for ( "[Controls]" , "touch_shift" )
ControlDoublePrivate::getControl returning NULL for ( "[Controls]" , "touch_shift" )
ControlDoublePrivate::getControl returning NULL for ( "[Master]" , "num_decks" )

Thread 1 "mixxx-test" received signal SIGSEGV, Segmentation fault.
0x0000000000a8ed0c in std::_Sp_counted_deleter<LibraryTest*, LibraryTest::LibraryTest()::{lambda(GlobalTrackCacheSaver*)#1}, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (this=0x1a16660)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/shared_ptr_base.h:466
466 { _M_impl._M_del()(_M_impl._M_ptr); }
(gdb) bt
#0 0x0000000000a8ed0c in std::_Sp_counted_deleter<LibraryTest*, LibraryTest::LibraryTest()::{lambda(GlobalTrackCacheSaver*)#1}, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (this=0x1a16660)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/shared_ptr_base.h:466
#1 0x000000000050e3e5 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x1a16660) at /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/shared_ptr_base.h:150
#2 0x000000000050e39a in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x7fffffffd5b0) at /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/shared_ptr_base.h:659
#3 0x00000000005d39a9 in std::__shared_ptr<GlobalTrackCacheSaver, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x7fffffffd5a8) at /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/shared_ptr_base.h:925
#4 0x0000000000cbd326 in std::__shared_ptr<GlobalTrackCacheSaver, (__gnu_cxx::_Lock_policy)2>::reset (this=0x1a88078) at /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/shared_ptr_base.h:1022
#5 0x0000000000cb79f4 in GlobalTrackCache::deactivate (this=0x1a88060) at src/track/globaltrackcache.cpp:349
#6 0x0000000000cba7b6 in GlobalTrackCache::~GlobalTrackCache (this=0x1a88060) at src/track/globaltrackcache.cpp:259
#7 0x0000000000cba889 in GlobalTrackCache::~GlobalTrackCache (this=0x1a88060) at src/track/globaltrackcache.cpp:258
#8 0x00007ffff5978c20 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9 0x00007ffff62ba05c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff62bf516 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff594938b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007ffff594b786 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/...

Read more...

RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: New → Confirmed
importance: Undecided → Low
tags: added: test
Changed in mixxx:
milestone: 2.2.0 → 2.2.1
Changed in mixxx:
milestone: 2.2.1 → 2.2.2
Changed in mixxx:
milestone: 2.2.2 → 2.2.3
Changed in mixxx:
milestone: 2.2.3 → 2.2.4
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

Didn't occur recently, probably already fixed.

Changed in mixxx:
status: Confirmed → Fix Committed
status: Fix Committed → Fix Released
milestone: 2.2.4 → 2.2.3
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/8425

lock status: Metadata changes locked and limited to project staff
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.