-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
None
-
6.10.0 Beta2
-
None
-
Arch Linux, GNOME with Wayland. I'm using a Kensington Expert Mouse Trackball if that matters
-
-
4a88ed088394d3275b43df3e628a5784c720995e
I get the following crash often while testing my QtQuick-based application. It happens in different occasions every time while operating various parts of my UI, so there are no exact steps to reproduce it, although I can consistently make it occur within a minute of my app running by clicking and hovering around in my UI. The error backtrace I get is always the same.
ASSERT failure in QList::erase: "The specified iterator argument 'aend' is invalid", file /home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/tools/qlist.h, line 949 Stack trace (most recent call last): #53 Object "/usr/lib/ld-linux-x86-64.so.2", at 0xffffffffffffffff, in #52 Object "/home/alex/Documents/git/zrythm/builddir_cmake/products/bin/zrythm", at 0x55555d806024, in _start #51 Source "../csu/libc-start.c", line 360, in __libc_start_main_impl [0x7ffff4a27728] #50 Source "../sysdeps/nptl/libc_start_call_main.h", line 58, in __libc_start_call_main [0x7ffff4a27674] #49 Source "/home/alex/Documents/git/zrythm/src/main.cpp", line 15, in main [0x55555df99253] 12: main (int argc, char ** argv) 13: { 14: zrythm::gui::ZrythmApplication app (argc, argv); > 15: return app.exec (); 16: } #48 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/widgets/kernel/qapplication.cpp", line 2577, in exec [0x7ffff7710f30] 2574: */ 2575: int QApplication::exec() 2576: { >2577: return QGuiApplication::exec(); 2578: } 2579: 2580: /*! \reimp #47 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/gui/kernel/qguiapplication.cpp", line 1973, in exec [0x7ffff67c04f7] 1970: #if QT_CONFIG(accessibility) 1971: QAccessible::setRootObject(qApp); 1972: #endif >1973: return QCoreApplication::exec(); 1974: } 1975: 1976: void QGuiApplicationPrivate::captureGlobalModifierState(QEvent *e) #46 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qcoreapplication.cpp", line 1452, in exec [0x7ffff554fc2f] 1449: QEventLoop eventLoop; 1450: self->d_func()->in_exec = true; 1451: self->d_func()->aboutToQuitEmitted = false; >1452: int returnCode = eventLoop.exec(QEventLoop::ApplicationExec); 1453: threadData->quitNow = false; 1454: 1455: if (self) #45 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qeventloop.cpp", line 186, in exec [0x7ffff554fae5] 183: QCoreApplication::removePostedEvents(app, QEvent::Quit); 184: 185: while (!d->exit.loadAcquire()) > 186: processEvents(flags | WaitForMoreEvents | EventLoopExec); 187: 188: ref.exceptionCaught = false; 189: return d->returnCode.loadRelaxed(); #44 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qeventloop.cpp", line 104, in processEvents [0x7ffff552a83e] 101: auto threadData = d->threadData.loadRelaxed(); 102: if (!threadData->hasEventDispatcher()) 103: return false; > 104: return threadData->eventDispatcher.loadRelaxed()->processEvents(flags); 105: } 106: 107: /*! #43 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp", line 89, in processEvents [0x7ffff6c39a37] 86: bool QPAEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags) 87: { 88: m_flags = flags; > 89: return QEventDispatcherGlib::processEvents(m_flags); 90: } 91: 92: QT_END_NAMESPACE #42 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp", line 399, in processEvents [0x7ffff52c3ee1] 396: d->timerSource->runWithIdlePriority = false; 397: } 398: > 399: bool result = g_main_context_iteration(d->mainContext, canWait); 400: while (!result && canWait) 401: result = g_main_context_iteration(d->mainContext, canWait); #41 Object "/usr/lib/libglib-2.0.so.0.8400.3", at 0x7ffff5109ee4, in g_main_context_iteration #40 Object "/usr/lib/libglib-2.0.so.0.8400.3", at 0x7ffff5109cd6, in #39 Object "/usr/lib/libglib-2.0.so.0.8400.3", at 0x7ffff510887c, in #38 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp", line 246, in postEventSourceDispatch [0x7ffff52c7073] 243: { 244: GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s); 245: source->lastSerialNumber = source->serialNumber.loadRelaxed(); > 246: QCoreApplication::sendPostedEvents(); 247: source->d->runTimersOnceWithNormalPriority(); 248: return true; // i dunno, george... 249: } #37 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qcoreapplication.cpp", line 1746, in sendPostedEvents [0x7ffff5544d4b] 1743: // and handled properly. 1744: QThreadData *data = QThreadData::current(); 1745: >1746: QCoreApplicationPrivate::sendPostedEvents(receiver, event_type, data); 1747: } 1748: 1749: void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type, #36 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qcoreapplication.cpp", line 1893, in sendPostedEvents [0x7ffff5544c54] 1890: const std::unique_ptr<QEvent> event_deleter(e); // will delete the event (with the mutex unlocked) 1891: 1892: // after all that work, it's time to deliver the event. >1893: QCoreApplication::sendEvent(r, e); 1894: 1895: // careful when adding anything below this point - the 1896: // sendEvent() call might invalidate any invariants this #35 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qcoreapplication.cpp", line 1549, in sendEvent [0x7ffff553d686] 1546: Q_TRACE(QCoreApplication_sendEvent, receiver, event, event->type()); 1547: 1548: event->m_spont = false; >1549: return notifyInternal2(receiver, event); 1550: } 1551: 1552: /*! #34 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qcoreapplication.cpp", line 1109, in notifyInternal2 [0x7ffff553d5db] 1106: if (!QThread::isMainThread()) 1107: return false; 1108: #endif >1109: return qApp->notify(receiver, event); 1110: } 1111: 1112: /*! #33 Source "/home/alex/Documents/git/zrythm/src/gui/backend/zrythm_application.cpp", line 424, in notify [0x55555e89f91f] 421: #endif 422: 423: // Process Qt event > 424: return QApplication::notify (receiver, event); 425: } 426: 427: void #32 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/widgets/kernel/qapplication.cpp", line 3260, in notify [0x7ffff7771df3] 3257: break; 3258: } 3259: } else { >3260: res = d->notify_helper(receiver, e); 3261: } 3262: 3263: return res; #31 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/widgets/kernel/qapplication.cpp", line 3310, in notify_helper [0x7ffff776fe7b] 3307: } 3308: 3309: // deliver the event >3310: consumed = receiver->event(e); 3311: 3312: QCoreApplicationPrivate::setEventSpontaneous(e, false); 3313: return consumed; #30 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qobject.cpp", line 1411, in event [0x7ffff54a72a5] 1408: } 1409: QObjectPrivate::Sender sender(this, const_cast<QObject*>(mce->sender()), mce->signalId(), connections); 1410: >1411: mce->placeMetaCall(this); 1412: break; 1413: } #29 | Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qobject.cpp", line 621, in call | 619: { | 620: if (d.slotObj_) { | > 621: d.slotObj_->call(object, d.args_); | 622: } else if (d.callFunction_ && d.method_offset_ <= object->metaObject()->methodOffset()) { | 623: d.callFunction_(object, QMetaObject::InvokeMetaMethod, d.method_relative_, d.args_); Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qobjectdefs_impl.h", line 461, in placeMetaCall [0x7ffff54949f8] 458: { if (!m_ref.deref()) m_impl(Destroy, this, nullptr, nullptr, nullptr); } 459: 460: inline bool compare(void **a) { bool ret = false; m_impl(Compare, this, nullptr, a, &ret); return ret; } > 461: inline void call(QObject *r, void **a) { m_impl(Call, this, r, a, nullptr); } 462: #else 463: inline void destroyIfLastRef() noexcept 464: { if (!m_ref.deref()) m_impl(this, nullptr, nullptr, Destroy, nullptr); } #28 | Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qobjectdefs_impl.h", line 545, in call<QtPrivate::List<>, void> | 543: case Call: | 544: if constexpr (std::is_member_function_pointer_v<FunctorValue>) | > 545: FuncType::template call<Args, R>(that->object(), static_cast<typename FuncType::Object *>(r), a); | 546: else | 547: FuncType::template call<Args, R>(that->object(), r, a); Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qobjectdefs_impl.h", line 174, in impl [0x7bffefe8e791] 171: enum {ArgumentCount = sizeof...(Args), IsPointerToMemberFunction = true}; 172: template <typename SignalArgs, typename R> 173: static void call(Function f, Obj *o, void **arg) { > 174: FunctorCall<std::index_sequence_for<Args...>, SignalArgs, R, Function>::call(f, o, arg); 175: } 176: }; 177: template<class Obj, typename Ret, typename... Args> struct FunctionPointer<Ret (Obj::*) (Args...) const> #27 | Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qobjectdefs_impl.h", line 126, in call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<long unsigned int>, QtPrivate::List<>, void, void (QtWaylandClient::QWaylandDisplay::*)()>::call(void (QtWaylandClient::QWaylandDisplay::*)(), QtWaylandClient::QWaylandDisplay*, void**)::<lambda()> > | 124: { | 125: assertObjectType<Obj>(o); | > 126: call_internal<R>(arg, [&] { | 127: return (o->*f)((*reinterpret_cast<typename RemoveRef<SignalArgs>::Type *>(arg[II+1]))...); | 128: }); Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qobjectdefs_impl.h", line 65, in call [0x7bffefe8e73b] 62: noexcept(std::is_nothrow_invocable_v<Lambda>) 63: { 64: if constexpr (std::is_void_v<R> || std::is_void_v<std::invoke_result_t<Lambda>>) { > 65: std::forward<Lambda>(fn)(); 66: } else { 67: if (args[0]) 68: *reinterpret_cast<R *>(args[0]) = std::forward<Lambda>(fn)(); #26 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qobjectdefs_impl.h", line 127, in operator() [0x7bffefe8c24b] 124: { 125: assertObjectType<Obj>(o); 126: call_internal<R>(arg, [&] { > 127: return (o->*f)((*reinterpret_cast<typename RemoveRef<SignalArgs>::Type *>(arg[II+1]))...); 128: }); 129: } 130: }; #25 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/plugins/platforms/wayland/qwaylanddisplay.cpp", line 522, in flushRequests [0x7bffefe6f4d6] 519: void QWaylandDisplay::flushRequests() 520: { 521: m_eventThread->readAndDispatchEvents(); > 522: QWindowSystemInterface::flushWindowSystemEvents(); 523: } 524: 525: // We have to wait until we have an eventDispatcher before creating the eventThread, #24 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/gui/kernel/qwindowsysteminterface.cpp", line 1082, in flushWindowSystemEvents [0x7ffff6831ed0] 1079: handleWindowSystemEvent<QWindowSystemInterfacePrivate::FlushEventsEvent, AsynchronousDelivery>(flags); 1080: QWindowSystemInterfacePrivate::eventsFlushed.wait(&QWindowSystemInterfacePrivate::flushEventMutex); 1081: } else { >1082: sendWindowSystemEvents(flags); 1083: } 1084: return QWindowSystemInterfacePrivate::eventAccepted.loadRelaxed() > 0; 1085: } #23 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/gui/kernel/qwindowsysteminterface.cpp", line 1113, in sendWindowSystemEvents [0x7ffff683189b] 1110: nevents++; 1111: } else { 1112: nevents++; >1113: QGuiApplicationPrivate::processWindowSystemEvent(event); 1114: } 1115: 1116: // Record the accepted state for the processed event #22 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/gui/kernel/qguiapplication.cpp", line 2194, in processWindowSystemEvent [0x7ffff67ce8df] 2192: switch(e->type) { 2193: case QWindowSystemInterfacePrivate::Mouse: >2194: QGuiApplicationPrivate::processMouseEvent(static_cast<QWindowSystemInterfacePrivate::MouseEvent *>(e)); 2195: break; 2196: case QWindowSystemInterfacePrivate::Wheel: 2197: QGuiApplicationPrivate::processWheelEvent(static_cast<QWindowSystemInterfacePrivate::WheelEvent *>(e)); #21 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/gui/kernel/qguiapplication.cpp", line 2470, in processMouseEvent [0x7ffff67cc92b] 2467: QMutableSinglePointEvent::setDoubleClick(&ev, true); 2468: } 2469: >2470: QGuiApplication::sendSpontaneousEvent(window, &ev); 2471: e->eventAccepted = ev.isAccepted(); 2472: if (!e->synthetic() && !ev.isAccepted() 2473: && !e->nonClientArea #20 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qcoreapplication.cpp", line 1563, in sendSpontaneousEvent [0x7ffff553d7e0] 1560: Q_TRACE(QCoreApplication_sendSpontaneousEvent, receiver, event, event->type()); 1561: 1562: event->m_spont = true; >1563: return notifyInternal2(receiver, event); 1564: } 1565: 1566: #endif // QT_NO_QOBJECT #19 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/kernel/qcoreapplication.cpp", line 1109, in notifyInternal2 [0x7ffff553d5db] 1106: if (!QThread::isMainThread()) 1107: return false; 1108: #endif >1109: return qApp->notify(receiver, event); 1110: } 1111: 1112: /*! #18 Source "/home/alex/Documents/git/zrythm/src/gui/backend/zrythm_application.cpp", line 424, in notify [0x55555e89f91f] 421: #endif 422: 423: // Process Qt event > 424: return QApplication::notify (receiver, event); 425: } 426: 427: void #17 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/widgets/kernel/qapplication.cpp", line 3260, in notify [0x7ffff7771df3] 3257: break; 3258: } 3259: } else { >3260: res = d->notify_helper(receiver, e); 3261: } 3262: 3263: return res; #16 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/widgets/kernel/qapplication.cpp", line 3310, in notify_helper [0x7ffff776fe7b] 3307: } 3308: 3309: // deliver the event >3310: consumed = receiver->event(e); 3311: 3312: QCoreApplicationPrivate::setEventSpontaneous(e, false); 3313: return consumed; #15 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtdeclarative/src/quick/items/qquickwindowmodule.cpp", line 152, in event [0x7bffe1710439] 149: updateTransientParent(); 150: } 151: } > 152: return QQuickWindow::event(event); 153: } 154: 155: /* #14 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtdeclarative/src/quick/items/qquickwindow.cpp", line 1553, in event [0x7bffe170f109] 1550: // If we didn't handle it in the block above, handle it now. 1551: // TODO should we deliver to all DAs at once then, since we don't know which one should get it? 1552: // or fix QTBUG-90851 so that the event always has points? >1553: bool ret = (da && da->event(event)); 1554: 1555: d->deliveryAgentPrivate()->clearGrabbers(pe); #13 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtdeclarative/src/quick/util/qquickdeliveryagent.cpp", line 822, in event [0x7bffe15a5f4d] 819: case QEvent::MouseButtonDblClick: 820: case QEvent::MouseMove: { 821: QMouseEvent *me = static_cast<QMouseEvent*>(ev); > 822: d->handleMouseEvent(me); 823: break; 824: } 825: case QEvent::HoverEnter: #12 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtdeclarative/src/quick/util/qquickdeliveryagent.cpp", line 1794, in handleMouseEvent [0x7bffe15a4f76] 1791: lastMousePosition = event->scenePosition(); 1792: qCDebug(lcHoverTrace) << q << "mouse pos" << last << "->" << lastMousePosition; 1793: if (!event->points().size() || !event->exclusiveGrabber(event->point(0))) { >1794: bool accepted = deliverHoverEvent(event->scenePosition(), last, event->modifiers(), event->timestamp()); 1795: event->setAccepted(accepted); 1796: } 1797: deliverPointerEvent(event); #11 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtdeclarative/src/quick/util/qquickdeliveryagent.cpp", line 1148, in deliverHoverEvent [0x7bffe15a1209] 1145: // the item can have been deleted as well. 1146: if (item && hoverId != 0) 1147: deliverHoverEventToItem(item, scenePos, lastScenePos, modifiers, timestamp, HoverChange::Clear); >1148: it = hoverItems.erase(it); 1149: } 1150: } #10 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/tools/qflatmap_p.h", line 610, in erase [0x7bffe15e1d1d] 608: iterator erase(iterator it) 609: { > 610: c.values.erase(toValuesIterator(it)); 611: return fromKeysIterator(c.keys.erase(toKeysIterator(it))); 612: } #9 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/tools/qlist.h", line 699, in erase [0x7bffe15e1cf6] 696: const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } 697: 698: iterator erase(const_iterator begin, const_iterator end); > 699: inline iterator erase(const_iterator pos) { return erase(pos, pos+1); } 700: 701: // more Qt 702: inline T& first() { Q_ASSERT(!isEmpty()); return *begin(); } #8 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/tools/qlist.h", line 949, in erase [0x7bffe15e1ccd] 946: typename QList<T>::iterator QList<T>::erase(const_iterator abegin, const_iterator aend) 947: { 948: Q_ASSERT_X(isValidIterator(abegin), "QList::erase", "The specified iterator argument 'abegin' is invalid"); > 949: Q_ASSERT_X(isValidIterator(aend), "QList::erase", "The specified iterator argument 'aend' is invalid"); 950: Q_ASSERT(aend >= abegin); 951: 952: qsizetype i = std::distance(constBegin(), abegin); #7 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/global/qassert.cpp", line 115, in qt_assert_x [0x7ffff559c4b8] 112: void qt_assert_x(const char *where, const char *what, const char *file, int line) noexcept 113: { 114: QMessageLogger(file, line, nullptr) > 115: .fatal("ASSERT failure in %s: \"%s\", file %s, line %d", where, what, file, line); 116: } 117: #endif // bootstrapped #6 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/global/qlogging.cpp", line 901, in fatal [0x7ffff55b7f19] 898: QInternalMessageLogContext ctxt(context); 899: va_list ap; 900: va_start(ap, msg); // use variable arg list > 901: qt_message(QtFatalMsg, ctxt, msg, ap); 902: va_end(ap); 903: 904: #ifndef Q_CC_MSVC_ONLY #5 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/global/qlogging.cpp", line 412, in qt_message [0x7ffff55b313d] 409: { 410: QString buf = QString::vasprintf(msg, ap); 411: qt_message_print(msgType, context, buf); > 412: qt_maybe_message_fatal(msgType, context, buf); 413: } 414: 415: /*! #4 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/global/qlogging.cpp", line 2165, in qt_maybe_message_fatal<QString&> [0x7ffff55b30c6] 2162: message.clear(); 2163: else 2164: Q_UNUSED(message); >2165: qAbort(); 2166: } 2167: 2168: /*! #3 Source "/home/alex/Downloads/qt-everywhere-src-6.10.0-beta2/qtbase/src/corelib/global/qassert.cpp", line 46, in qAbort [0x7ffff559c3f7] 43: // Fallback 44: TerminateProcess(GetCurrentProcess(), STATUS_FATAL_APP_EXIT); 45: #else // !Q_OS_WIN > 46: std::abort(); 47: #endif 48: 49: // Tell the compiler the application has stopped. #2 Source "/usr/src/debug/glibc/glibc/stdlib/abort.c", line 73, in abort [0x7ffff4a25579] #1 Source "../sysdeps/posix/raise.c", line 26, in raise [0x7ffff4a3e40f] #0 Source "/usr/src/debug/glibc/glibc/nptl/pthread_kill.c", line 44, in __pthread_kill_implementation [0x7ffff4a9894c]