Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.7.1
-
None
-
-
2bc82f6a1 (dev), 1873ff034 (6.8), f1b230b88 (6.7)
Description
void QtPrivate::watchContinuationImpl(const QObject *context, QSlotObjectBase *slotObj, QFutureInterfaceBase &fi) { Q_ASSERT(context); Q_ASSERT(slotObj); auto slot = SlotObjUniquePtr(slotObj); auto *watcher = new QObjectContinuationWrapper; watcher->moveToThread(context->thread()); // We need to protect acccess to the watcher. The context object (and in turn, the watcher) // could be destroyed while the continuation that emits the signal is running. We have to // prevent that. // The mutex has to be recursive, because the continuation itself could delete the context // object (and thus the watcher), which will try to lock the mutex from the same thread twice. auto watcherMutex = std::make_shared<QRecursiveMutex>(); const auto destroyWatcher = [watcherMutex, watcher]() mutable { QMutexLocker lock(watcherMutex.get()); delete watcher; }; // ### we're missing a convenient way to `QObject::connect()` to a `QSlotObjectBase`... QObject::connect(watcher, &QObjectContinuationWrapper::run, // for the following, cf. QMetaObject::invokeMethodImpl(): // we know `slot` is a lambda returning `void`, so we can just // `call()` with `obj` and `args[0]` set to `nullptr`: context, [slot = std::move(slot)] { void *args[] = { nullptr }; // for `void` return value slot->call(nullptr, args); }); QObject::connect(watcher, &QObjectContinuationWrapper::run, watcher, &QObject::deleteLater); QObject::connect(context, &QObject::destroyed, watcher, destroyWatcher); fi.setContinuation([watcherMutex, watcher = QPointer(watcher)] (const QFutureInterfaceBase &parentData) { Q_UNUSED(parentData); QMutexLocker lock(watcherMutex.get()); if (watcher) { //If this is changed to QMetaObject::invokeMethod(watcher, &QObjectContinuationWrapper::run) //It doesn't crash. emit watcher->run(); } }); }
The continuation is call from another thread, but watcher is somehow delete before emit watcher->run() happens. The crash is when the connection is invoked. Emit an object's singal from another thread should be supported based on the Qt documentation. Using the following instead of the emit prevents the crash.
QMetaObject::invokeMethod(watcher, &QObjectContinuationWrapper::run)
Here's the address sanitation from my consistency crashing my application.
================================================================= ==88108==ERROR: AddressSanitizer: heap-use-after-free on address 0x6040010dc894 at pc 0x00011c7d7fa2 bp 0x70000a2d6250 sp 0x70000a2d6248 READ of size 4 at 0x6040010dc894 thread T13 #0 0x11c7d7fa1 in int std::__1::__cxx_atomic_load[abi:v160006]<int>(std::__1::__cxx_atomic_base_impl<int> const*, std::__1::memory_order) atomic:963 #1 0x11c7d7eba in std::__1::__atomic_base<int, false>::load[abi:v160006](std::__1::memory_order) const atomic:1550 #2 0x11c7d7e99 in int QAtomicOps<int>::loadAcquire<int>(std::__1::atomic<int> const&) qatomic_cxx11.h:214 #3 0x11c7d7a44 in QBasicAtomicInteger<int>::loadAcquire() const qbasicatomic.h:39 #4 0x11cd3e27f in QObjectPrivate::ConnectionData::cleanOrphanedConnectionsImpl(QObject*, QObjectPrivate::ConnectionData::LockPolicy) qobject.cpp:409 #5 0x11cd442b7 in QObjectPrivate::ConnectionData::cleanOrphanedConnections(QObject*, QObjectPrivate::ConnectionData::LockPolicy) qobject_p_p.h:173 #6 0x11cd63b4e in void doActivate<false>(QObject*, int, void**) qobject.cpp:4128 #7 0x11cd603b8 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) qobject.cpp:4146 #8 0x11d5c8011 in QObjectContinuationWrapper::run() qfutureinterface.moc:139 #9 0x11d5dfea8 in QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_2::operator()(QFutureInterfaceBase const&) const qfutureinterface.cpp:96 #10 0x11d5dfd7c in decltype(std::declval<QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_2&>()(std::declval<QFutureInterfaceBase const&>())) std::__1::__invoke[abi:v160006]<QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_2&, QFutureInterfaceBase const&>(QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_2&, QFutureInterfaceBase const&) invoke.h:394 #11 0x11d5dfd2c in void std::__1::__invoke_void_return_wrapper<void, true>::__call<QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_2&, QFutureInterfaceBase const&>(QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_2&, QFutureInterfaceBase const&) invoke.h:487 #12 0x11d5dfd04 in std::__1::__function::__alloc_func<QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_2, std::__1::allocator<QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_2>, void (QFutureInterfaceBase const&)>::operator()[abi:v160006](QFutureInterfaceBase const&) function.h:185 #13 0x11d5dc4c0 in std::__1::__function::__func<QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_2, std::__1::allocator<QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_2>, void (QFutureInterfaceBase const&)>::operator()(QFutureInterfaceBase const&) function.h:356 #14 0x11d5e6997 in std::__1::__function::__value_func<void (QFutureInterfaceBase const&)>::operator()[abi:v160006](QFutureInterfaceBase const&) const function.h:510 #15 0x11d5d675c in std::__1::function<void (QFutureInterfaceBase const&)>::operator()(QFutureInterfaceBase const&) const function.h:1156 #16 0x11d5d6d33 in QFutureInterfaceBase::runContinuation() const qfutureinterface.cpp:921 #17 0x100988891 in QFutureInterface<QSharedPointer<CachedTextureImageGenerator>>::reportFinished() qfutureinterface.h:258 #18 0x1009399d4 in QPromise<QSharedPointer<CachedTextureImageGenerator>>::finish() qpromise.h:75 #19 0x100963c87 in PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()::operator()() const PFuture.h:410 #20 0x100963a08 in void QtPrivate::fulfillPromise<void, PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()>(QPromise<void>&, PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()&&) qfuture_impl.h:673 #21 0x1009637a0 in void QtPrivate::CanceledHandler<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(), void>::run<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()&&, QFuture<void>&, QPromise<void>&&) qfuture_impl.h:823 #22 0x10096347c in void QtPrivate::CanceledHandler<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(), void>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()&&, QFuture<void>*, QFutureInterface<void>&)::'lambda'(QFutureInterfaceBase const&)::operator()(QFutureInterfaceBase const&) qfuture_impl.h:791 #23 0x10096332c in QtPrivate::ContinuationWrapper<void QtPrivate::CanceledHandler<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(), void>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()&&, QFuture<void>*, QFutureInterface<void>&)::'lambda'(QFutureInterfaceBase const&)>::operator()(QFutureInterfaceBase const&) qfuture_impl.h:508 #24 0x1009632fc in decltype(std::declval<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()>()(std::declval<QFutureInterfaceBase const&>())) std::__1::__invoke[abi:v160006]<QtPrivate::ContinuationWrapper<void QtPrivate::CanceledHandler<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(), void>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()&&, QFuture<void>*, QFutureInterface<void>&)::'lambda'(QFutureInterfaceBase const&)>&, QFutureInterfaceBase const&>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()&&, QFutureInterfaceBase const&) invoke.h:394 #25 0x1009632ac in void std::__1::__invoke_void_return_wrapper<void, true>::__call<QtPrivate::ContinuationWrapper<void QtPrivate::CanceledHandler<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(), void>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()&&, QFuture<void>*, QFutureInterface<void>&)::'lambda'(QFutureInterfaceBase const&)>&, QFutureInterfaceBase const&>(QtPrivate::ContinuationWrapper<void QtPrivate::CanceledHandler<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(), void>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()&&, QFuture<void>*, QFutureInterface<void>&)::'lambda'(QFutureInterfaceBase const&)>&, QFutureInterfaceBase const&) invoke.h:487 #26 0x100963284 in std::__1::__function::__alloc_func<QtPrivate::ContinuationWrapper<void QtPrivate::CanceledHandler<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(), void>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()&&, QFuture<void>*, QFutureInterface<void>&)::'lambda'(QFutureInterfaceBase const&)>, std::__1::allocator<QtPrivate::ContinuationWrapper<void QtPrivate::CanceledHandler<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(), void>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()&&, QFuture<void>*, QFutureInterface<void>&)::'lambda'(QFutureInterfaceBase const&)>>, void (QFutureInterfaceBase const&)>::operator()[abi:v160006](QFutureInterfaceBase const&) function.h:185 #27 0x10095fcf0 in std::__1::__function::__func<QtPrivate::ContinuationWrapper<void QtPrivate::CanceledHandler<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(), void>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()&&, QFuture<void>*, QFutureInterface<void>&)::'lambda'(QFutureInterfaceBase const&)>, std::__1::allocator<QtPrivate::ContinuationWrapper<void QtPrivate::CanceledHandler<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(), void>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'()&&, QFuture<void>*, QFutureInterface<void>&)::'lambda'(QFutureInterfaceBase const&)>>, void (QFutureInterfaceBase const&)>::operator()(QFutureInterfaceBase const&) function.h:356 #28 0x11d5e6997 in std::__1::__function::__value_func<void (QFutureInterfaceBase const&)>::operator()[abi:v160006](QFutureInterfaceBase const&) const function.h:510 #29 0x11d5d675c in std::__1::function<void (QFutureInterfaceBase const&)>::operator()(QFutureInterfaceBase const&) const function.h:1156 #30 0x11d5d6d33 in QFutureInterfaceBase::runContinuation() const qfutureinterface.cpp:921 #31 0x1009553f1 in QFutureInterface<void>::reportFinished() qfutureinterface.h:494 #32 0x10094d684 in QPromise<void>::finish() qpromise.h:75 #33 0x10095c2c9 in QtPrivate::Continuation<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&), void, QSharedPointer<CachedTextureImageGenerator>>::execute() qfuture_impl.h:486 #34 0x10095bd61 in void QtPrivate::Continuation<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&), void, QSharedPointer<CachedTextureImageGenerator>>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QtFuture::Launch)::'lambda'(QFutureInterfaceBase const&)::operator()(QFutureInterfaceBase const&) qfuture_impl.h:552 #35 0x10095b9bc in QtPrivate::ContinuationWrapper<void QtPrivate::Continuation<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&), void, QSharedPointer<CachedTextureImageGenerator>>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QtFuture::Launch)::'lambda'(QFutureInterfaceBase const&)>::operator()(QFutureInterfaceBase const&) qfuture_impl.h:508 #36 0x10095b98c in decltype(std::declval<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)>()(std::declval<QFutureInterfaceBase const&>())) std::__1::__invoke[abi:v160006]<QtPrivate::ContinuationWrapper<void QtPrivate::Continuation<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&), void, QSharedPointer<CachedTextureImageGenerator>>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QtFuture::Launch)::'lambda'(QFutureInterfaceBase const&)>&, QFutureInterfaceBase const&>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)&&, QFutureInterfaceBase const&) invoke.h:394 #37 0x10095b93c in void std::__1::__invoke_void_return_wrapper<void, true>::__call<QtPrivate::ContinuationWrapper<void QtPrivate::Continuation<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&), void, QSharedPointer<CachedTextureImageGenerator>>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QtFuture::Launch)::'lambda'(QFutureInterfaceBase const&)>&, QFutureInterfaceBase const&>(QtPrivate::ContinuationWrapper<void QtPrivate::Continuation<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&), void, QSharedPointer<CachedTextureImageGenerator>>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QtFuture::Launch)::'lambda'(QFutureInterfaceBase const&)>&, QFutureInterfaceBase const&) invoke.h:487 #38 0x10095b914 in std::__1::__function::__alloc_func<QtPrivate::ContinuationWrapper<void QtPrivate::Continuation<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&), void, QSharedPointer<CachedTextureImageGenerator>>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QtFuture::Launch)::'lambda'(QFutureInterfaceBase const&)>, std::__1::allocator<QtPrivate::ContinuationWrapper<void QtPrivate::Continuation<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&), void, QSharedPointer<CachedTextureImageGenerator>>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QtFuture::Launch)::'lambda'(QFutureInterfaceBase const&)>>, void (QFutureInterfaceBase const&)>::operator()[abi:v160006](QFutureInterfaceBase const&) function.h:185 #39 0x100958340 in std::__1::__function::__func<QtPrivate::ContinuationWrapper<void QtPrivate::Continuation<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&), void, QSharedPointer<CachedTextureImageGenerator>>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QtFuture::Launch)::'lambda'(QFutureInterfaceBase const&)>, std::__1::allocator<QtPrivate::ContinuationWrapper<void QtPrivate::Continuation<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&), void, QSharedPointer<CachedTextureImageGenerator>>::create<PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)>(PFuture<QSharedPointer<CachedTextureImageGenerator>>::setupForkedThen()::'lambda'(QSharedPointer<CachedTextureImageGenerator> const&)&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QtFuture::Launch)::'lambda'(QFutureInterfaceBase const&)>>, void (QFutureInterfaceBase const&)>::operator()(QFutureInterfaceBase const&) function.h:356 #40 0x11d5e6997 in std::__1::__function::__value_func<void (QFutureInterfaceBase const&)>::operator()[abi:v160006](QFutureInterfaceBase const&) const function.h:510 #41 0x11d5d675c in std::__1::function<void (QFutureInterfaceBase const&)>::operator()(QFutureInterfaceBase const&) const function.h:1156 #42 0x11d5d6d33 in QFutureInterfaceBase::runContinuation() const qfutureinterface.cpp:921 #43 0x100988891 in QFutureInterface<QSharedPointer<CachedTextureImageGenerator>>::reportFinished() qfutureinterface.h:258 #44 0x1009399d4 in QPromise<QSharedPointer<CachedTextureImageGenerator>>::finish() qpromise.h:75 #45 0x1009e423a in TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4::operator()(QSharedPointer<CachedTextureImageGenerator>) const TextureCacher.cpp:437 #46 0x1009e408e in QtPrivate::Continuation<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4, void, QSharedPointer<CachedTextureImageGenerator>>::fulfillVoidPromise() qfuture_impl.h:637 #47 0x1009e3e3f in QtPrivate::Continuation<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4, void, QSharedPointer<CachedTextureImageGenerator>>::runFunction() qfuture_impl.h:446 #48 0x1009e3cd4 in QtPrivate::SyncContinuation<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4, void, QSharedPointer<CachedTextureImageGenerator>>::runImpl() qfuture_impl.h:346 #49 0x1009e3a06 in QtPrivate::Continuation<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4, void, QSharedPointer<CachedTextureImageGenerator>>::execute() qfuture_impl.h:491 #50 0x1009e3580 in void QtPrivate::Continuation<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4, void, QSharedPointer<CachedTextureImageGenerator>>::create<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4>(TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QObject*)::'lambda'()::operator()() qfuture_impl.h:618 #51 0x1009e33a3 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void QtPrivate::Continuation<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4, void, QSharedPointer<CachedTextureImageGenerator>>::create<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4>(TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QObject*)::'lambda'()>::call(void QtPrivate::Continuation<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4, void, QSharedPointer<CachedTextureImageGenerator>>::create<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4>(TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QObject*)::'lambda'()&, void**) qobjectdefs_impl.h:137 #52 0x1009e3260 in void QtPrivate::FunctorCallable<void QtPrivate::Continuation<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4, void, QSharedPointer<CachedTextureImageGenerator>>::create<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4>(TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QObject*)::'lambda'()>::call<QtPrivate::List<>, void>(void QtPrivate::Continuation<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4, void, QSharedPointer<CachedTextureImageGenerator>>::create<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4>(TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QObject*)::'lambda'()&, void*, void**) qobjectdefs_impl.h:345 #53 0x1009e31bd in QtPrivate::QCallableObject<void QtPrivate::Continuation<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4, void, QSharedPointer<CachedTextureImageGenerator>>::create<TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4>(TextureLoader::loadHelper(TextureLoader::LoadRequest const&)::$_4&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<void>&, QObject*)::'lambda'(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:555 #54 0x11cb8da75 in QtPrivate::QSlotObjectBase::call(QObject*, void**) qobjectdefs_impl.h:469 #55 0x11d5da787 in QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_0::operator()() const qfutureinterface.cpp:85 #56 0x11d5da5e3 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_0>::call(QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_0&, void**) qobjectdefs_impl.h:137 #57 0x11d5da4a0 in void QtPrivate::FunctorCallable<QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_0>::call<QtPrivate::List<>, void>(QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_0&, void*, void**) qobjectdefs_impl.h:345 #58 0x11d5da3fd in QtPrivate::QCallableObject<QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:555 #59 0x11cb8da75 in QtPrivate::QSlotObjectBase::call(QObject*, void**) qobjectdefs_impl.h:469 #60 0x11cd40c75 in QMetaCallEvent::placeMetaCall(QObject*) qobject.cpp:654 #61 0x11cd47cb8 in QObject::event(QEvent*) qobject.cpp:1452 #62 0x11cb50999 in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) qcoreapplication.cpp:1316 #63 0x11cb4fb0c in doNotify(QObject*, QEvent*) qcoreapplication.cpp:1243 #64 0x11cb4fd30 in QCoreApplication::notify(QObject*, QEvent*) qcoreapplication.cpp:1226 #65 0x119002413 in QGuiApplication::notify(QObject*, QEvent*) qguiapplication.cpp:1994 #66 0x11cb4f7c3 in QCoreApplication::notifyInternal2(QObject*, QEvent*) qcoreapplication.cpp:1142 #67 0x11cb52753 in QCoreApplication::sendEvent(QObject*, QEvent*) qcoreapplication.cpp:1583 #68 0x11cb5665b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) qcoreapplication.cpp:1940 #69 0x11d55e631 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) qeventdispatcher_unix.cpp:415 #70 0x11cb9c01e in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) qeventloop.cpp:100 #71 0x11cb9c66e in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) qeventloop.cpp:182 #72 0x11d19e9a4 in QThread::exec() qthread.cpp:586 #73 0x11d1a0b24 in QThread::run() qthread.cpp:707 #74 0x11d556bd2 in QThreadPrivate::start(void*)::$_0::operator()() const qthread_unix.cpp:326 #75 0x11d551a64 in void (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::$_0>(QThreadPrivate::start(void*)::$_0&&) qthread_unix.cpp:262 #76 0x11d5516a6 in QThreadPrivate::start(void*) qthread_unix.cpp:285 #77 0x7ff80b81b1d2 in _pthread_start+0x7c (libsystem_pthread.dylib:x86_64+0x61d2) #78 0x7ff80b816bd2 in thread_start+0xe (libsystem_pthread.dylib:x86_64+0x1bd2) 0x6040010dc894 is located 4 bytes inside of 40-byte region [0x6040010dc890,0x6040010dc8b8) freed by thread T0 here: #0 0x10dd0aa2d in wrap__ZdlPv+0x7d (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0xeca2d) #1 0x11cd4368b in QObject::~QObject() qobject.cpp:1168 #2 0x11d5d8ee4 in QObjectContinuationWrapper::~QObjectContinuationWrapper() qfutureinterface.cpp:43 #3 0x11d5d79d4 in QObjectContinuationWrapper::~QObjectContinuationWrapper() qfutureinterface.cpp:43 #4 0x11d5d79f8 in QObjectContinuationWrapper::~QObjectContinuationWrapper() qfutureinterface.cpp:43 #5 0x11cd482a4 in qDeleteInEventHandler(QObject*) qobject.cpp:5002 #6 0x11cd47b08 in QObject::event(QEvent*) qobject.cpp:1437 #7 0x11cb50999 in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) qcoreapplication.cpp:1316 #8 0x11cb4fb0c in doNotify(QObject*, QEvent*) qcoreapplication.cpp:1243 #9 0x11cb4fd30 in QCoreApplication::notify(QObject*, QEvent*) qcoreapplication.cpp:1226 #10 0x119002413 in QGuiApplication::notify(QObject*, QEvent*) qguiapplication.cpp:1994 #11 0x11cb4f7c3 in QCoreApplication::notifyInternal2(QObject*, QEvent*) qcoreapplication.cpp:1142 #12 0x11cb52753 in QCoreApplication::sendEvent(QObject*, QEvent*) qcoreapplication.cpp:1583 #13 0x11cb5665b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) qcoreapplication.cpp:1940 #14 0x11cb5219c in QCoreApplication::sendPostedEvents(QObject*, int) qcoreapplication.cpp:1797 #15 0x11075efa5 in QCocoaEventDispatcherPrivate::processPostedEvents() qcocoaeventdispatcher.mm:900 #16 0x1107604ea in QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) qcocoaeventdispatcher.mm:922 #17 0x7ff80b8f6ea9 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__+0x10 (CoreFoundation:x86_64h+0x7cea9) #18 0x7ff80b8f6e4b in __CFRunLoopDoSource0+0x9c (CoreFoundation:x86_64h+0x7ce4b) #19 0x7ff80b8f6c24 in __CFRunLoopDoSources0+0xd8 (CoreFoundation:x86_64h+0x7cc24) #20 0x7ff80b8f58ae in __CFRunLoopRun+0x393 (CoreFoundation:x86_64h+0x7b8ae) #21 0x7ff80b8f4eb0 in CFRunLoopRunSpecific+0x22f (CoreFoundation:x86_64h+0x7aeb0) #22 0x7ff815379f3c in RunCurrentEventLoopInMode+0x123 (HIToolbox:x86_64+0x2ef3c) #23 0x7ff815379d4d in ReceiveNextEventCommon+0x290 (HIToolbox:x86_64+0x2ed4d) #24 0x7ff815379aa7 in _BlockUntilNextEventMatchingListInModeWithFilter+0x3f (HIToolbox:x86_64+0x2eaa7) #25 0x7ff80e993b17 in _DPSNextEvent+0x359 (AppKit:x86_64+0x3eb17) #26 0x7ff80e9929c1 in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]+0x4bd (AppKit:x86_64+0x3d9c1) #27 0x7ff80e985036 in -[NSApplication run]+0x249 (AppKit:x86_64+0x30036) #28 0x11075d2ed in QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) qcocoaeventdispatcher.mm:406 #29 0x11cb9c01e in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) qeventloop.cpp:100 previously allocated by thread T0 here: #0 0x10dd0a60d in wrap__Znwm+0x7d (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0xec60d) #1 0x11cd482e5 in QObjectPrivate::ensureConnectionData() qobject.cpp:292 #2 0x11cd5c406 in QObjectPrivate::addConnection(int, QObjectPrivate::Connection*) qobject.cpp:310 #3 0x11cd69837 in QObjectPrivate::connectImpl(QObject const*, int, QObject const*, void**, QtPrivate::QSlotObjectBase*, int, int const*, QMetaObject const*) qobject.cpp:5271 #4 0x11cd68b95 in QObject::connectImpl(QObject const*, void**, QObject const*, void**, QtPrivate::QSlotObjectBase*, Qt::ConnectionType, int const*, QMetaObject const*) qobject.cpp:5189 #5 0x11d5c7f58 in QMetaObject::Connection QObject::connect<void (QObjectContinuationWrapper::*)(), QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_0>(QtPrivate::FunctionPointer<void (QObjectContinuationWrapper::*)()>::Object const*, void (QObjectContinuationWrapper::*)(), QtPrivate::ContextTypeForFunctor<QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_0, void>::ContextType const*, QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&)::$_0&&, Qt::ConnectionType) qobject.h:261 #6 0x11d5c7412 in QtPrivate::watchContinuationImpl(QObject const*, QtPrivate::QSlotObjectBase*, QFutureInterfaceBase&) qfutureinterface.cpp:79 #7 0x100979184 in void QtPrivate::watchContinuation<void QtPrivate::Continuation<TextureCacher::loadTextureHelper(TileKey const&)::$_2, QSharedPointer<CachedTextureImageGenerator>, QSharedPointer<CachedTextureImageGenerator>>::create<TextureCacher::loadTextureHelper(TileKey const&)::$_2>(TextureCacher::loadTextureHelper(TileKey const&)::$_2&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<QSharedPointer<CachedTextureImageGenerator>>&, QObject*)::'lambda'()>(QObject const*, TextureCacher::loadTextureHelper(TileKey const&)::$_2&&, QFutureInterfaceBase&) qfuture_impl.h:596 #8 0x100978f21 in void QtPrivate::Continuation<TextureCacher::loadTextureHelper(TileKey const&)::$_2, QSharedPointer<CachedTextureImageGenerator>, QSharedPointer<CachedTextureImageGenerator>>::create<TextureCacher::loadTextureHelper(TileKey const&)::$_2>(TextureCacher::loadTextureHelper(TileKey const&)::$_2&&, QFuture<QSharedPointer<CachedTextureImageGenerator>>*, QFutureInterface<QSharedPointer<CachedTextureImageGenerator>>&, QObject*) qfuture_impl.h:621 #9 0x100978c55 in QFuture<QtPrivate::ResultTypeHelper<TextureCacher::loadTextureHelper(TileKey const&)::$_2, QSharedPointer<CachedTextureImageGenerator>, void>::ResultType> QFuture<QSharedPointer<CachedTextureImageGenerator>>::then<TextureCacher::loadTextureHelper(TileKey const&)::$_2>(QObject*, TextureCacher::loadTextureHelper(TileKey const&)::$_2&&) qfuture.h:360 #10 0x100976a87 in auto PFuture<QSharedPointer<CachedTextureImageGenerator>>::then<TextureCacher::loadTextureHelper(TileKey const&)::$_2>(QObject*, TextureCacher::loadTextureHelper(TileKey const&)::$_2&&)::'lambda'(QFuture<QSharedPointer<CachedTextureImageGenerator>>&&)::operator()('lambda'(QFuture<QSharedPointer<CachedTextureImageGenerator>>&&)) const PFuture.h:191 #11 0x10097648b in QObject PFuture<QSharedPointer<CachedTextureImageGenerator>>::thenImpl<auto PFuture<QSharedPointer<CachedTextureImageGenerator>>::then<TextureCacher::loadTextureHelper(TileKey const&)::$_2>(QObject*, TextureCacher::loadTextureHelper(TileKey const&)::$_2&&)::'lambda'(QFuture<QSharedPointer<CachedTextureImageGenerator>>&&)>(QFuture) PFuture.h:331 #12 0x100931f13 in auto PFuture<QSharedPointer<CachedTextureImageGenerator>>::then<TextureCacher::loadTextureHelper(TileKey const&)::$_2>(QObject*, TextureCacher::loadTextureHelper(TileKey const&)::$_2&&) PFuture.h:190 #13 0x10092baad in TextureCacher::loadTextureHelper(TileKey const&) TextureCacher.cpp:318 #14 0x100929380 in TextureCacher::load(TileKey const&, std::__1::function<void (TileKey const&, TileKey const&, QSharedPointer<CachedTextureImageGenerator>)>) TextureCacher.cpp:120 #15 0x100810bdd in Earth::updateGeometry(QuadNode*, int) Earth.cpp:1374 #16 0x10080d156 in Earth::updateSceneGraph() Earth.cpp:978 #17 0x100808300 in Earth::update() Earth.cpp:638 #18 0x100888420 in Earth::setWindow(QQuickWindow*)::$_6::operator()() const Earth.cpp:475 #19 0x100888283 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, Earth::setWindow(QQuickWindow*)::$_6>::call(Earth::setWindow(QQuickWindow*)::$_6&, void**) qobjectdefs_impl.h:137 #20 0x100888170 in void QtPrivate::FunctorCallable<Earth::setWindow(QQuickWindow*)::$_6>::call<QtPrivate::List<>, void>(Earth::setWindow(QQuickWindow*)::$_6&, void*, void**) qobjectdefs_impl.h:345 #21 0x1008880fd in QtPrivate::QCallableObject<Earth::setWindow(QQuickWindow*)::$_6, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:555 #22 0x11cb8da75 in QtPrivate::QSlotObjectBase::call(QObject*, void**) qobjectdefs_impl.h:469 #23 0x11cd63582 in void doActivate<false>(QObject*, int, void**) qobject.cpp:4086 #24 0x11cd603b8 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) qobject.cpp:4146 #25 0x10b732954 in QQuickWindow::afterAnimating() moc_qquickwindow.cpp:641 #26 0x10c46a456 in QSGThreadedRenderLoop::polishAndSync(QSGThreadedRenderLoop::Window*, bool) qsgthreadedrenderloop.cpp:1628 #27 0x10c46bdbd in QSGThreadedRenderLoop::handleUpdateRequest(QQuickWindow*) qsgthreadedrenderloop.cpp:1403 #28 0x10b71fc96 in QQuickWindow::event(QEvent*) qquickwindow.cpp:1600 #29 0x10b789ecd in QQuickWindowQmlImpl::event(QEvent*) qquickwindowmodule.cpp:141 Thread T13 created by T0 here: #0 0x10dcedc8a in wrap_pthread_create+0x5a (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0xcfc8a) #1 0x11d55390c in QThread::start(QThread::Priority) qthread_unix.cpp:723 #2 0x1009310a8 in TextureLoader::instance() TextureCacher.cpp:678 #3 0x10092b96e in TextureCacher::loadTextureHelper(TileKey const&) TextureCacher.cpp:315 #4 0x100929380 in TextureCacher::load(TileKey const&, std::__1::function<void (TileKey const&, TileKey const&, QSharedPointer<CachedTextureImageGenerator>)>) TextureCacher.cpp:120 #5 0x1009fb6ba in TileMinMaxLookup::value(TileKey const&) TileMinMaxLookup.cpp:49 #6 0x100910c77 in QuadNode::split(TileMinMaxLookup*) QuadNode.cpp:57 #7 0x10080c5dd in Earth::subDivideQuad(QuadNode*) Earth.cpp:701 #8 0x1008082d5 in Earth::update() Earth.cpp:629 #9 0x100888420 in Earth::setWindow(QQuickWindow*)::$_6::operator()() const Earth.cpp:475 #10 0x100888283 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, Earth::setWindow(QQuickWindow*)::$_6>::call(Earth::setWindow(QQuickWindow*)::$_6&, void**) qobjectdefs_impl.h:137 #11 0x100888170 in void QtPrivate::FunctorCallable<Earth::setWindow(QQuickWindow*)::$_6>::call<QtPrivate::List<>, void>(Earth::setWindow(QQuickWindow*)::$_6&, void*, void**) qobjectdefs_impl.h:345 #12 0x1008880fd in QtPrivate::QCallableObject<Earth::setWindow(QQuickWindow*)::$_6, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:555 #13 0x11cb8da75 in QtPrivate::QSlotObjectBase::call(QObject*, void**) qobjectdefs_impl.h:469 #14 0x11cd63582 in void doActivate<false>(QObject*, int, void**) qobject.cpp:4086 #15 0x11cd603b8 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) qobject.cpp:4146 #16 0x10b732954 in QQuickWindow::afterAnimating() moc_qquickwindow.cpp:641 #17 0x10c46a456 in QSGThreadedRenderLoop::polishAndSync(QSGThreadedRenderLoop::Window*, bool) qsgthreadedrenderloop.cpp:1628 #18 0x10c46894c in QSGThreadedRenderLoop::handleExposure(QQuickWindow*) qsgthreadedrenderloop.cpp:1336 #19 0x10c466667 in QSGThreadedRenderLoop::exposureChanged(QQuickWindow*) qsgthreadedrenderloop.cpp:1247 #20 0x10b70a148 in QQuickWindow::exposeEvent(QExposeEvent*) qquickwindow.cpp:183 #21 0x11929709b in QWindow::event(QEvent*) qwindow.cpp:2600 #22 0x10b7203e3 in QQuickWindow::event(QEvent*) qquickwindow.cpp:1655 #23 0x10b789ecd in QQuickWindowQmlImpl::event(QEvent*) qquickwindowmodule.cpp:141 #24 0x11cb50999 in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) qcoreapplication.cpp:1316 #25 0x11cb4fb0c in doNotify(QObject*, QEvent*) qcoreapplication.cpp:1243 #26 0x11cb4fd30 in QCoreApplication::notify(QObject*, QEvent*) qcoreapplication.cpp:1226 #27 0x119002413 in QGuiApplication::notify(QObject*, QEvent*) qguiapplication.cpp:1994 #28 0x11cb4f7c3 in QCoreApplication::notifyInternal2(QObject*, QEvent*) qcoreapplication.cpp:1142 #29 0x11cb52833 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) qcoreapplication.cpp:1597 #30 0x119011b4f in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) qguiapplication.cpp:3298 #31 0x119003f5c in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) qguiapplication.cpp:2142 #32 0x1192ebfaa in bool QWindowSystemHelper<QWindowSystemInterface::SynchronousDelivery>::handleEvent<QWindowSystemInterfacePrivate::ExposeEvent, QWindow*, QRegion>(QWindow*, QRegion) qwindowsysteminterface.cpp:105 #33 0x1192d382b in bool handleWindowSystemEvent<QWindowSystemInterfacePrivate::ExposeEvent, QWindowSystemInterface::SynchronousDelivery, QWindow*, QRegion>(QWindow*, QRegion) qwindowsysteminterface.cpp:138 #34 0x1192d36bc in bool QWindowSystemInterface::handleExposeEvent<QWindowSystemInterface::SynchronousDelivery>(QWindow*, QRegion const&) qwindowsysteminterface.cpp:337 #35 0x1107c750f in QCocoaWindow::handleExposeEvent(QRegion const&) qcocoawindow.mm:1466 #36 0x1107f595b in -[QNSView(Drawing) displayLayer:] qnsview_drawing.mm:226 #37 0x7ff8131bda63 in CA::Layer::display_if_needed(CA::Transaction*)+0x357 (QuartzCore:x86_64+0x21a63) #38 0x7ff813344d46 in CA::Context::commit_transaction(CA::Transaction*, double, double*)+0x284 (QuartzCore:x86_64+0x1a8d46) #39 0x7ff81319eb5e in CA::Transaction::commit()+0x2c8 (QuartzCore:x86_64+0x2b5e) #40 0x7ff80eaf25ae in __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke+0x11c (AppKit:x86_64+0x19d5ae) #41 0x7ff80f3059ab in ___NSRunLoopObserverCreateWithHandler_block_invoke+0x28 (AppKit:x86_64+0x9b09ab) #42 0x7ff80b8f63c3 in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__+0x16 (CoreFoundation:x86_64h+0x7c3c3) #43 0x7ff80b8f62ea in __CFRunLoopDoObservers+0x1e1 (CoreFoundation:x86_64h+0x7c2ea) #44 0x7ff80b8f5875 in __CFRunLoopRun+0x35a (CoreFoundation:x86_64h+0x7b875) #45 0x7ff80b8f4eb0 in CFRunLoopRunSpecific+0x22f (CoreFoundation:x86_64h+0x7aeb0) #46 0x7ff815379f3c in RunCurrentEventLoopInMode+0x123 (HIToolbox:x86_64+0x2ef3c) #47 0x7ff815379b83 in ReceiveNextEventCommon+0xc6 (HIToolbox:x86_64+0x2eb83) #48 0x7ff815379aa7 in _BlockUntilNextEventMatchingListInModeWithFilter+0x3f (HIToolbox:x86_64+0x2eaa7) #49 0x7ff80e993b17 in _DPSNextEvent+0x359 (AppKit:x86_64+0x3eb17) #50 0x7ff80e9929c1 in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]+0x4bd (AppKit:x86_64+0x3d9c1) #51 0x7ff80e985036 in -[NSApplication run]+0x249 (AppKit:x86_64+0x30036) #52 0x11075d2ed in QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) qcocoaeventdispatcher.mm:406 #53 0x11cb9c01e in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) qeventloop.cpp:100 #54 0x11cb9c66e in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) qeventloop.cpp:182 #55 0x11cb51d9d in QCoreApplication::exec() qcoreapplication.cpp:1486 #56 0x119001de5 in QGuiApplication::exec() qguiapplication.cpp:1926 #57 0x10078d40c in main main.cpp:81 #58 0x7ff80b4c041e in start+0x76e (dyld:x86_64+0xfffffffffff6e41e) SUMMARY: AddressSanitizer: heap-use-after-free atomic:963 in int std::__1::__cxx_atomic_load[abi:v160006]<int>(std::__1::__cxx_atomic_base_impl<int> const*, std::__1::memory_order) Shadow bytes around the buggy address: 0x6040010dc600: fa fa fa fa fa fa fa fa fa fa fd fd fd fd fd fd 0x6040010dc680: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x6040010dc700: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x6040010dc780: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x6040010dc800: fa fa fa fa fa fa fa fa fa fa 00 00 00 00 00 00 =>0x6040010dc880: fa fa[fd]fd fd fd fd fa fa fa fd fd fd fd fd fa 0x6040010dc900: fa fa 00 00 00 00 00 00 fa fa fd fd fd fd fd fa 0x6040010dc980: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x6040010dca00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x6040010dca80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x6040010dcb00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==88108==ABORTING
Attachments
Issue Links
- is duplicated by
-
QTBUG-127880 Race condition in QFuture implementation
- Closed