[education/rkward/testing/win_citest_timeout] rkward/rbackend: Try to pin down the hang, further

Thomas Friedrichsmeier null at kde.org
Sun Oct 2 21:24:55 BST 2022


Git commit a4ff171419ef8966fe8f40c4cd48140ad86ad0f7 by Thomas Friedrichsmeier.
Committed on 02/10/2022 at 20:24.
Pushed by tfry into branch 'testing/win_citest_timeout'.

Try to pin down the hang, further

M  +6    -1    rkward/rbackend/rkfrontendtransmitter.cpp
M  +1    -1    rkward/rbackend/rkrbackendprotocol_frontend.cpp

https://invent.kde.org/education/rkward/commit/a4ff171419ef8966fe8f40c4cd48140ad86ad0f7

diff --git a/rkward/rbackend/rkfrontendtransmitter.cpp b/rkward/rbackend/rkfrontendtransmitter.cpp
index 7ca0f178..dada81b0 100644
--- a/rkward/rbackend/rkfrontendtransmitter.cpp
+++ b/rkward/rbackend/rkfrontendtransmitter.cpp
@@ -54,6 +54,11 @@ RKFrontendTransmitter::~RKFrontendTransmitter () {
 
 	delete rkd_transmitter;
 	RK_ASSERT (!server->isListening ());
+	RK_TRACE (RBACKEND);
+	delete server;
+	RK_TRACE (RBACKEND);
+	delete backend;
+	RK_TRACE (RBACKEND);
 }
 
 QString localeDir () {
@@ -171,7 +176,7 @@ void RKFrontendTransmitter::run () {
 
 	if (!quirkmode) {
 		// It's ok to only give backend a short time to finish. We only get here, after QuitCommand has been handled by the backend
-		backend->waitForFinished(1000);
+		if (!backend->waitForFinished(1000)) backend->close();
 	}
 
 	if (!connection) {
diff --git a/rkward/rbackend/rkrbackendprotocol_frontend.cpp b/rkward/rbackend/rkrbackendprotocol_frontend.cpp
index c152298c..f9609f77 100644
--- a/rkward/rbackend/rkrbackendprotocol_frontend.cpp
+++ b/rkward/rbackend/rkrbackendprotocol_frontend.cpp
@@ -31,7 +31,7 @@ RKRBackendProtocolFrontend::~RKRBackendProtocolFrontend () {
 	RK_ASSERT(_instance == this);
 	terminateBackend ();
 	RKFrontendTransmitter::instance ()->wait(1000);  // Wait for thread to catch the backend's exit request, and exit()
-	QMetaObject::invokeMethod(RKFrontendTransmitter::instance(), &RKFrontendTransmitter::quit, Qt::QueuedConnection);
+	QMetaObject::invokeMethod(RKFrontendTransmitter::instance(), &RKFrontendTransmitter::quit, Qt::QueuedConnection);  // tell it to quit, otherwise
 	RK_TRACE (RBACKEND);
 	RKFrontendTransmitter::instance ()->wait(3000);  // Wait for thread to quit and clean up.
 	RK_TRACE (RBACKEND);


More information about the rkward-tracker mailing list