From 7b5b6c7841972dd1d9dd8bddd532b924f08d936e Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 3 Oct 2016 10:01:30 +0200 Subject: [PATCH] Changed: Variables to debug infinite loops --- .../ryzom_installer/src/operationdialog.cpp | 18 +++++++++++++++++- .../ryzom_installer/src/operationdialog.h | 2 ++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp index 35eeb921c..529afa8d6 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp @@ -43,7 +43,8 @@ #define new DEBUG_NEW #endif -COperationDialog::COperationDialog(QWidget *parent):QDialog(parent), m_aborting(false), m_operation(OperationNone) +COperationDialog::COperationDialog(QWidget *parent):QDialog(parent), m_aborting(false), m_operation(OperationNone), + m_operationStep(DisplayNoServerError), m_operationStepCounter(0) { setupUi(this); @@ -134,6 +135,21 @@ void COperationDialog::processInstallNextStep() // long operations are done in a thread OperationStep step = config->getInstallNextStep(); + if (step == m_operationStep) + { + ++m_operationStepCounter; + } + else + { + m_operationStep = step; + m_operationStepCounter = 0; + } + + if (m_operationStepCounter > 10) + { + qDebug() << "possible infinite loop" << m_operationStep << m_operationStepCounter; + } + switch(step) { case DownloadData: diff --git a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.h b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.h index 19235bdd9..037cfb016 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.h +++ b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.h @@ -147,6 +147,8 @@ protected: bool m_aborting; OperationType m_operation; + OperationStep m_operationStep; + int m_operationStepCounter; SComponents m_addComponents; SComponents m_removeComponents; QString m_currentServerId;