No its not newly created patch, it was by default in the build.
actual file qtdeclarative_git.bb
lab3@daikokunw-Server:~/k/sources/meta-qt6/recipes-qt/qt6$ cat qtdeclarative_git.bb
LICENSE = "GFDL-1.3 & BSD-3-Clause & ( GPL-3.0-only & The-Qt-Company-GPL-Exception-1.0 ) & ( GPL-2.0-or-later | LGPL-3.0-only ) | The-Qt-Company-Commercial"
LIC_FILES_CHKSUM = " \
file://LICENSE.LGPL3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
file://LICENSE.GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \
file://LICENSE.GPL3-EXCEPT;md5=763d8c535a234d9a3fb682c7ecb6c073 \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
"
inherit qt6-cmake
include recipes-qt/qt6/qt6-git.inc
include recipes-qt/qt6/qt6.inc
SRC_URI += "\
file://0001-tests-disable-failing-tests.patch \
"
DEPENDS += "qtbase qtshadertools qtshadertools-native qtdeclarative-native qtlanguageserver"
BBCLASSEXTEND = "native nativesdk"
lab3@daikokunw-Server:~/k/sources/meta-qt6/recipes-qt/qt6$
Tried by adding file into src_uri has bellow (but still the same error)
lab3@daikokunw-Server:~/k/sources/meta-qt6/recipes-qt/qt6$ cat qtdeclarative_git.bb
LICENSE = "GFDL-1.3 & BSD-3-Clause & ( GPL-3.0-only & The-Qt-Company-GPL-Exception-1.0 ) & ( GPL-2.0-or-later | LGPL-3.0-only ) | The-Qt-Company-Commercial"
LIC_FILES_CHKSUM = " \
file://LICENSE.LGPL3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
file://LICENSE.GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \
file://LICENSE.GPL3-EXCEPT;md5=763d8c535a234d9a3fb682c7ecb6c073 \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
"
inherit qt6-cmake
include recipes-qt/qt6/qt6-git.inc
include recipes-qt/qt6/qt6.inc
SRC_URI += "\
file://0001-tests-disable-failing-tests.patch \
file://0001-Check-if-a-device-in-knownPointingDevices-is-destroy.patch \
"
DEPENDS += "qtbase qtshadertools qtshadertools-native qtdeclarative-native qtlanguageserver"
BBCLASSEXTEND = "native nativesdk"
Patch file
lab3@daikokunw-Server:~/k/build/tmp/work/x86_64-linux/qtdeclarative-native/6.3.2-r0$ cat 0001-Check-if-a-device-in-knownPointingDevices-is-destroy.patch
From 497acf3efa91441291ccf2588c4fda4afe5b5bb5 Mon Sep 17 00:00:00 2001
From: Jaeyoon Jung <jaeyoon.jung@lge.com>
Date: Tue, 15 Jun 2021 13:49:55 +0900
Subject: [PATCH] Check if a device in knownPointingDevices is destroyed before
use
Use QPointer for QPointingDevice pointers in knownPointingDevices and
check if it is null before use. QPointingDevice objects destroyed are
removed after knownPointingDevices is scanned. This fixes a crash issue
where the commit b567c38 wanted to address. It actually takes no effect
in case a QPointingDevice is destroyed in a different thread.
Pick-to: 6.2 6.1
Change-Id: I8690e71d897021e63af6d452ceae6176a99cb716
---
Upstream-Status: Submitted [https://codereview.qt-project.org/c/qt/qtdeclarative/+/354315]
src/quick/util/qquickdeliveryagent.cpp | 14 ++++++++++----
src/quick/util/qquickdeliveryagent_p_p.h | 2 +-
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/quick/util/qquickdeliveryagent.cpp b/src/quick/util/qquickdeliveryagent.cpp
index 2bb0d52b09..8990cc040b 100644
--- a/src/quick/util/qquickdeliveryagent.cpp
+++ b/src/quick/util/qquickdeliveryagent.cpp
@@ -236,9 +236,16 @@ void QQuickDeliveryAgentPrivate::removeGrabber(QQuickItem *grabber, bool mouse,
Q_Q(QQuickDeliveryAgent);
if (eventsInDelivery.isEmpty()) {
// do it the expensive way
- for (auto dev : knownPointingDevices) {
- auto devPriv = QPointingDevicePrivate::get(const_cast<QPointingDevice *>(dev));
- devPriv->removeGrabber(grabber, cancel);
+ for (auto dev : std::as_const(knownPointingDevices)) {
+ if (!dev.isNull()) {
+ auto devPriv = QPointingDevicePrivate::get(const_cast<QPointingDevice *>(dev.get()));
+ devPriv->removeGrabber(grabber, cancel);
+ }
+ }
+ // clean up destroyed devices
+ for (int i = knownPointingDevices.size() - 1; i >= 0; --i) {
+ if (knownPointingDevices.at(i).isNull())
+ knownPointingDevices.removeAt(i);
}
return;
}
@@ -1721,7 +1728,6 @@ void QQuickDeliveryAgentPrivate::ensureDeviceConnected(const QPointingDevice *de
return;
knownPointingDevices.append(dev);
connect(dev, &QPointingDevice::grabChanged, this, &QQuickDeliveryAgentPrivate::onGrabChanged);
- QObject::connect(dev, &QObject::destroyed, q, [this, dev] {this->knownPointingDevices.removeAll(dev);});
}
void QQuickDeliveryAgentPrivate::deliverPointerEvent(QPointerEvent *event)
diff --git a/src/quick/util/qquickdeliveryagent_p_p.h b/src/quick/util/qquickdeliveryagent_p_p.h
index 66249f69c8..b40b681246 100644
--- a/src/quick/util/qquickdeliveryagent_p_p.h
+++ b/src/quick/util/qquickdeliveryagent_p_p.h
@@ -76,7 +76,7 @@ public:
QVector<QQuickItem *> skipDelivery; // during delivery of one event to all receivers, Items to which we know delivery is no longer necessary
std::unique_ptr<QMutableTouchEvent> delayedTouch;
- QList<const QPointingDevice *> knownPointingDevices;
+ QList<QPointer<const QPointingDevice> > knownPointingDevices;
uint currentHoverId = 0;
#if QT_CONFIG(wheelevent)
lab3@daikokunw-Server:~/k/build/tmp/work/x86_64-linux/qtdeclarative-native/6.3.2-r0$
Initialising tasks: 100% |#######################################################################################################################################################################################################################################| Time: 0:00:05
Sstate summary: Wanted 4000 Local 9 Mirrors 0 Missed 3991 Current 551 (0% match, 12% complete)
NOTE: Executing Tasks
ERROR: qtdeclarative-native-6.3.2-r0 do_patch: Applying patch '0001-Check-if-a-device-in-knownPointingDevices-is-destroy.patch' on target directory '/home/lab3/k/build/tmp/work/x86_64-linux/qtdeclarative-native/6.3.2-r0/git'
BBHandledException("Applying '0001-Check-if-a-device-in-knownPointingDevices-is-destroy.patch' failed:
stdout: checking file src/quick/util/qquickdeliveryagent.cpp
Hunk #1 succeeded at 270 (offset 34 lines).
Hunk #2 succeeded at 1730 (offset 2 lines).
checking file src/quick/util/qquickdeliveryagent_p_p.h
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED
stderr: ")
ERROR: Logfile of failure stored in: /home/lab3/k/build/tmp/work/x86_64-linux/qtdeclarative-native/6.3.2-r0/temp/log.do_patch.3919939
ERROR: Task (virtual:native:/home/lab3/k/sources/meta-qt6/recipes-qt/qt6/qtdeclarative_git.bb:do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2178 tasks of which 2151 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
virtual:native:/home/lab3/k/sources/meta-qt6/recipes-qt/qt6/qtdeclarative_git.bb:do_patch
Summary: There was 1 ERROR message, returning a non-zero exit code.
lab3@daikokunw-Server:~/k/build$