Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 16.0.1
-
None
Description
When debugging the Qt Quick Controls Gallery example after applying this patch:
diff --git a/examples/quickcontrols/gallery/gallery.cpp b/examples/quickcontrols/gallery/gallery.cpp index b283748bc0..e74937f56c 100644 --- a/examples/quickcontrols/gallery/gallery.cpp +++ b/examples/quickcontrols/gallery/gallery.cpp @@ -7,6 +7,7 @@ #include <QSettings> #include <QQuickStyle> #include <QIcon> +#include <QTimer> int main(int argc, char *argv[]) { @@ -47,5 +48,10 @@ int main(int argc, char *argv[]) if (engine.rootObjects().isEmpty()) return -1; + QTimer::singleShot(1000, []() { + int *x = 0; + qDebug() << *x; + }); + return app.exec(); }
The debugger stops here:
1 main::$_0::operator()() const gallery.cpp 54 0x104488b3d 2 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, main::$_0>::call(main::$_0&, void * *)::'lambda'()::operator()() const qobjectdefs_impl.h 116 0x104488ae8 3 void QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, main::$_0>::call(main::$_0&, void * *)::'lambda'()>(void * *, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, main::$_0>::call(main::$_0&, void * *)::'lambda'()&&) qobjectdefs_impl.h 65 0x104488ac9 4 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, main::$_0>::call(main::$_0&, void * *) qobjectdefs_impl.h 115 0x104488aa5 5 void QtPrivate::FunctorCallable<main::$_0>::call<QtPrivate::List<>, void>(main::$_0&, void *, void * *) qobjectdefs_impl.h 337 0x104488a41 6 QtPrivate::QCallableObject<main::$_0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *) qobjectdefs_impl.h 547 0x1044889cf 7 QtPrivate::QSlotObjectBase::call(QObject *, void * *) qobjectdefs_impl.h 461 0x1044961ee 8 void doActivate<false>(QObject *, int, void * *) qobject.cpp 4229 0x1046424bc 9 QMetaObject::activate(QObject *, QMetaObject const *, int, void * *) qobject.cpp 4289 0x104640e9f 10 QSingleShotTimer::timeout() moc_qsingleshottimer_p.cpp 116 0x10465fbb2 11 QSingleShotTimer::timerFinished() qsingleshottimer.cpp 62 0x10465fb69 12 QSingleShotTimer::timerEvent(QTimerEvent *) qsingleshottimer.cpp 84 0x10465fc99 13 QObject::event(QEvent *) qobject.cpp 1386 0x104637b36 14 QCoreApplicationPrivate::notify_helper(QObject *, QEvent *) qcoreapplication.cpp 1281 0x10459019c 15 doNotify(QObject *, QEvent *) qcoreapplication.cpp 1210 0x10458fc26 16 QCoreApplication::notify(QObject *, QEvent *) qcoreapplication.cpp 1193 0x10458fd22 17 QGuiApplication::notify(QObject *, QEvent *) qguiapplication.cpp 2056 0x1052d03c3 18 QCoreApplication::notifyInternal2(QObject *, QEvent *) qcoreapplication.cpp 1109 0x10458faf7 19 QCoreApplication::sendEvent(QObject *, QEvent *) qcoreapplication.cpp 1549 0x104590885 20 QTimerInfoList::activateTimers() qtimerinfo_unix.cpp 426 0x1048b8c33 ... <More>
With this patch, it doesn't stop:
diff --git a/examples/quickcontrols/gallery/gallery.cpp b/examples/quickcontrols/gallery/gallery.cpp index b283748bc0..72dc628c58 100644 --- a/examples/quickcontrols/gallery/gallery.cpp +++ b/examples/quickcontrols/gallery/gallery.cpp @@ -7,6 +7,7 @@ #include <QSettings> #include <QQuickStyle> #include <QIcon> +#include <QTimer> int main(int argc, char *argv[]) { @@ -47,5 +48,9 @@ int main(int argc, char *argv[]) if (engine.rootObjects().isEmpty()) return -1; + QTimer::singleShot(1000, []() { + Q_ASSERT(false); + }); + return app.exec(); }
Product: Qt Creator 16.0.1 Based on: Qt 6.8.3 (Clang 15.0 (Apple), arm64) Built on: Apr 10 2025 07:30:38 From revision: f4dc189d9b