From 4adb13c9435baade511d3ac78fb142dc73bd2e1f Mon Sep 17 00:00:00 2001 From: Eran Mizrahi Date: Fri, 8 Dec 2017 18:24:06 +0200 Subject: generate dumps using new diagnostics settings --- src/organizercore.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/organizercore.cpp') diff --git a/src/organizercore.cpp b/src/organizercore.cpp index f8a368c9..adb895ec 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -47,6 +47,7 @@ #include // for qPrintable, etc #include +#include #include // for _tcsicmp #include @@ -66,6 +67,9 @@ using namespace MOShared; using namespace MOBase; +//static +CrashDumpsType OrganizerCore::m_globalCrashDumpsType = CrashDumpsType::None; + static bool isOnline() { QList interfaces = QNetworkInterface::allInterfaces(); @@ -643,8 +647,23 @@ void OrganizerCore::prepareVFS() m_USVFS.updateMapping(fileMapping(m_CurrentProfile->name(), QString())); } -void OrganizerCore::setLogLevel(int logLevel) { - m_USVFS.setLogLevel(logLevel); +void OrganizerCore::updateVFSParams(int logLevel, int crashDumpsType) { + setGlobalCrashDumpsType(crashDumpsType); + m_USVFS.updateParams(logLevel, crashDumpsType); +} + +//static +void OrganizerCore::setGlobalCrashDumpsType(int crashDumpsType) { + m_globalCrashDumpsType = ::crashDumpsType(crashDumpsType); +} + +//static +std::wstring OrganizerCore::crashDumpsPath() { + wchar_t appDataLocal[MAX_PATH]{ 0 }; + ::SHGetFolderPathW(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, appDataLocal); + std::wstring dumpPath{ appDataLocal }; + dumpPath += L"\\modorganizer"; + return dumpPath; } void OrganizerCore::setCurrentProfile(const QString &profileName) -- cgit v1.3.1 From 1b4b6dbeb46aa7e6b87b3de32cd8953fa0d32a7a Mon Sep 17 00:00:00 2001 From: Eran Mizrahi Date: Sat, 9 Dec 2017 01:56:16 +0200 Subject: cycle crash dumps --- src/mainwindow.cpp | 1 + src/organizercore.cpp | 10 +++++++++- src/organizercore.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'src/organizercore.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index cab4c41f..b47e9c57 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3297,6 +3297,7 @@ void MainWindow::on_actionSettings_triggered() updateDownloadListDelegate(); m_OrganizerCore.updateVFSParams(settings.logLevel(), settings.crashDumpsType()); + m_OrganizerCore.cycleDiagnostics(); } diff --git a/src/organizercore.cpp b/src/organizercore.cpp index adb895ec..7f86f2b4 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -630,7 +630,8 @@ bool OrganizerCore::bootstrap() { return createDirectory(m_Settings.getProfileDirectory()) && createDirectory(m_Settings.getModDirectory()) && createDirectory(m_Settings.getDownloadDirectory()) && - createDirectory(m_Settings.getOverwriteDirectory()); + createDirectory(m_Settings.getOverwriteDirectory()) && + createDirectory(QString::fromStdWString(crashDumpsPath())) && cycleDiagnostics(); } void OrganizerCore::createDefaultProfile() @@ -652,6 +653,12 @@ void OrganizerCore::updateVFSParams(int logLevel, int crashDumpsType) { m_USVFS.updateParams(logLevel, crashDumpsType); } +bool OrganizerCore::cycleDiagnostics() { + if (int maxDumps = settings().crashDumpsMax()) + removeOldFiles(QString::fromStdWString(crashDumpsPath()), "*.dmp", maxDumps, QDir::Time|QDir::Reversed); + return true; +} + //static void OrganizerCore::setGlobalCrashDumpsType(int crashDumpsType) { m_globalCrashDumpsType = ::crashDumpsType(crashDumpsType); @@ -1083,6 +1090,7 @@ void OrganizerCore::spawnBinary(const QFileInfo &binary, const QString &argument refreshESPList(); savePluginList(); + cycleDiagnostics(); //These callbacks should not fiddle with directoy structure and ESPs. m_FinishedRun(binary.absoluteFilePath(), processExitCode); diff --git a/src/organizercore.h b/src/organizercore.h index 7bb7faa7..40531195 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -160,6 +160,8 @@ public: void updateVFSParams(int logLevel, int crashDumpsType); + bool cycleDiagnostics(); + static CrashDumpsType getGlobalCrashDumpsType() { return m_globalCrashDumpsType; } static void setGlobalCrashDumpsType(int crashDumpsType); static std::wstring crashDumpsPath(); -- cgit v1.3.1 From 89b1f1d48dd05b372abca64b311b1107f044a897 Mon Sep 17 00:00:00 2001 From: Eran Mizrahi Date: Sat, 9 Dec 2017 01:26:50 +0200 Subject: add logging of process spawn --- src/organizercore.cpp | 4 ++++ src/usvfsconnector.cpp | 8 ++++++++ 2 files changed, 12 insertions(+) (limited to 'src/organizercore.cpp') diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 7f86f2b4..54cfed54 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1181,9 +1181,13 @@ HANDLE OrganizerCore::spawnBinaryDirect(const QFileInfo &binary, = QString("launch \"%1\" \"%2\" %3") .arg(QDir::toNativeSeparators(dataCwd), QDir::toNativeSeparators(dataBinPath), arguments); + + qDebug() << "Spawning proxyed process <" << cmdline << ">"; + return startBinary(QFileInfo(QCoreApplication::applicationFilePath()), cmdline, QCoreApplication::applicationDirPath(), true); } else { + qDebug() << "Spawning direct process <" << binary.absoluteFilePath() << "," << arguments << "," << currentDirectory.absolutePath() << ">"; return startBinary(binary, arguments, currentDirectory, true); } } else { diff --git a/src/usvfsconnector.cpp b/src/usvfsconnector.cpp index b90784d9..ffbdf3aa 100644 --- a/src/usvfsconnector.cpp +++ b/src/usvfsconnector.cpp @@ -158,6 +158,10 @@ void UsvfsConnector::updateMapping(const MappingType &mapping) progress.setMaximum(static_cast(mapping.size())); progress.show(); int value = 0; + int files = 0; + int dirs = 0; + + qDebug("Updating VFS mappings..."); ClearVirtualMappings(); @@ -173,11 +177,15 @@ void UsvfsConnector::updateMapping(const MappingType &mapping) (map.createTarget ? LINKFLAG_CREATETARGET : 0) | LINKFLAG_RECURSIVE ); + ++dirs; } else { VirtualLinkFile(map.source.toStdWString().c_str(), map.destination.toStdWString().c_str(), 0); + ++files; } } + + qDebug("VFS mappings updated ", dirs, files); /* size_t dumpSize = 0; CreateVFSDump(nullptr, &dumpSize); -- cgit v1.3.1 From 66b17eea8ac83ee6f7b729974240d995a1e8ed3a Mon Sep 17 00:00:00 2001 From: Eran Mizrahi Date: Sat, 9 Dec 2017 21:39:22 +0200 Subject: Wait for processes run using command line shortcuts --- src/CMakeLists.txt | 1 + src/ilockedwaitingforprocess.h | 13 ++++++++++++ src/iuserinterface.h | 7 ++----- src/lockeddialog.h | 7 ++++--- src/mainwindow.cpp | 21 +++---------------- src/mainwindow.h | 4 +--- src/organizercore.cpp | 46 +++++++++++++++++++++++++++++++++--------- src/organizercore.h | 2 +- 8 files changed, 62 insertions(+), 39 deletions(-) create mode 100644 src/ilockedwaitingforprocess.h (limited to 'src/organizercore.cpp') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d603336c..39aabb91 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -169,6 +169,7 @@ SET(organizer_HDRS viewmarkingscrollbar.h plugincontainer.h organizercore.h + ilockedwaitingforprocess.h iuserinterface.h instancemanager.h usvfsconnector.h diff --git a/src/ilockedwaitingforprocess.h b/src/ilockedwaitingforprocess.h new file mode 100644 index 00000000..6a4267d4 --- /dev/null +++ b/src/ilockedwaitingforprocess.h @@ -0,0 +1,13 @@ +#ifndef ILOCKEDWAITINGFORPROCESS_H +#define ILOCKEDWAITINGFORPROCESS_H + +class QString; + +class ILockedWaitingForProcess +{ +public: + virtual bool unlockClicked() = 0; + virtual void setProcessName(QString const &) = 0; +}; + +#endif // ILOCKEDWAITINGFORPROCESS_H diff --git a/src/iuserinterface.h b/src/iuserinterface.h index 0af1c2ac..255c7ac0 100644 --- a/src/iuserinterface.h +++ b/src/iuserinterface.h @@ -3,6 +3,7 @@ #include "modinfo.h" +#include "ilockedwaitingforprocess.h" #include #include #include @@ -27,12 +28,8 @@ public: virtual void displayModInformation(ModInfo::Ptr modInfo, unsigned int index, int tab) = 0; - virtual void lock() = 0; + virtual ILockedWaitingForProcess* lock() = 0; virtual void unlock() = 0; - virtual bool unlockClicked() = 0; - virtual void setProcessName(QString const &) = 0; - - }; #endif // IUSERINTERFACE_H diff --git a/src/lockeddialog.h b/src/lockeddialog.h index 29ac459b..8803efae 100644 --- a/src/lockeddialog.h +++ b/src/lockeddialog.h @@ -20,6 +20,7 @@ along with Mod Organizer. If not, see . #ifndef LOCKEDDIALOG_H #define LOCKEDDIALOG_H +#include "ilockedwaitingforprocess.h" #include // for QDialog #include // for Q_OBJECT, slots #include // for QString @@ -39,7 +40,7 @@ namespace Ui { * data on which Mod Organizer works. After the UI is unlocked (manually or after the * external application closed) MO will refresh all of its data sources **/ -class LockedDialog : public QDialog +class LockedDialog : public QDialog, public ILockedWaitingForProcess { Q_OBJECT @@ -52,13 +53,13 @@ public: * * @return true if the user clicked the unlock button **/ - bool unlockClicked() const { return m_UnlockClicked; } + bool unlockClicked() override { return m_UnlockClicked; } /** * @brief set the name of the process being run * @param name of process */ - void setProcessName(const QString &name); + void setProcessName(const QString &name) override; protected: diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index b47e9c57..1db895fc 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1465,17 +1465,18 @@ void MainWindow::storeSettings(QSettings &settings) { } } -void MainWindow::lock() +ILockedWaitingForProcess* MainWindow::lock() { if (m_LockDialog != nullptr) { ++m_LockCount; - return; + return m_LockDialog; } m_LockDialog = new LockedDialog(qApp->activeWindow()); m_LockDialog->show(); setEnabled(false); m_LockDialog->setEnabled(true); //What's the point otherwise? ++m_LockCount; + return m_LockDialog; } void MainWindow::unlock() @@ -1494,22 +1495,6 @@ void MainWindow::unlock() } } -bool MainWindow::unlockClicked() -{ - if (m_LockDialog != nullptr) { - return m_LockDialog->unlockClicked(); - } else { - return false; - } -} - -void MainWindow::setProcessName(QString const &name) -{ - if (m_LockDialog != nullptr) { - m_LockDialog->setProcessName(name); - } -} - void MainWindow::on_btnRefreshData_clicked() { m_OrganizerCore.refreshDirectoryStructure(); diff --git a/src/mainwindow.h b/src/mainwindow.h index cec6c407..f6f11157 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -116,10 +116,8 @@ public: void storeSettings(QSettings &settings) override; void readSettings(); - virtual void lock() override; + virtual ILockedWaitingForProcess* lock() override; virtual void unlock() override; - virtual bool unlockClicked() override; - virtual void setProcessName(QString const &name) override; bool addProfile(); void refreshDataTree(); diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 54cfed54..f0dfa8d4 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -31,6 +31,7 @@ #include "appconfig.h" #include #include +#include "lockeddialog.h" #include #include @@ -1067,8 +1068,9 @@ QStringList OrganizerCore::modsSortedByProfilePriority() const void OrganizerCore::spawnBinary(const QFileInfo &binary, const QString &arguments, const QDir ¤tDirectory, const QString &steamAppID, const QString &customOverwrite) { + ILockedWaitingForProcess* uilock = nullptr; if (m_UserInterface != nullptr) { - m_UserInterface->lock(); + uilock = m_UserInterface->lock(); } ON_BLOCK_EXIT([&] () { if (m_UserInterface != nullptr) { m_UserInterface->unlock(); } @@ -1077,7 +1079,7 @@ void OrganizerCore::spawnBinary(const QFileInfo &binary, const QString &argument HANDLE processHandle = spawnBinaryDirect(binary, arguments, m_CurrentProfile->name(), currentDirectory, steamAppID, customOverwrite); if (processHandle != INVALID_HANDLE_VALUE) { DWORD processExitCode; - (void)waitForProcessCompletion(processHandle, &processExitCode); + (void)waitForProcessCompletion(processHandle, &processExitCode, uilock); refreshDirectoryStructure(); // need to remove our stored load order because it may be outdated if a foreign tool changed the @@ -1258,24 +1260,50 @@ HANDLE OrganizerCore::startApplication(const QString &executable, } } - return spawnBinaryDirect(binary, arguments, profileName, currentDirectory, - steamAppID, customOverwrite); + HANDLE processHandle = spawnBinaryDirect(binary, arguments, profileName, currentDirectory, steamAppID, customOverwrite); + if (processHandle != INVALID_HANDLE_VALUE) { + std::unique_ptr dlg; + ILockedWaitingForProcess* uilock = nullptr; + + if (m_UserInterface != nullptr) { + uilock = m_UserInterface->lock(); + } + else { + // i.e. when running command line shortcuts there is no m_UserInterface + dlg.reset(new LockedDialog); + dlg->show(); + dlg->setEnabled(true); + uilock = dlg.get(); + } + + ON_BLOCK_EXIT([&]() { + if (m_UserInterface != nullptr) { + m_UserInterface->unlock(); + } }); + + DWORD processExitCode; + waitForProcessCompletion(processHandle, &processExitCode, uilock); + cycleDiagnostics(); + } + + return processHandle; } bool OrganizerCore::waitForApplication(HANDLE handle, LPDWORD exitCode) { + ILockedWaitingForProcess* uilock = nullptr; if (m_UserInterface != nullptr) { - m_UserInterface->lock(); + uilock = m_UserInterface->lock(); } ON_BLOCK_EXIT([&] () { if (m_UserInterface != nullptr) { m_UserInterface->unlock(); } }); - return waitForProcessCompletion(handle, exitCode); + return waitForProcessCompletion(handle, exitCode, uilock); } -bool OrganizerCore::waitForProcessCompletion(HANDLE handle, LPDWORD exitCode) +bool OrganizerCore::waitForProcessCompletion(HANDLE handle, LPDWORD exitCode, ILockedWaitingForProcess* uilock) { DWORD startPID = ::GetProcessId(handle); @@ -1292,7 +1320,7 @@ bool OrganizerCore::waitForProcessCompletion(HANDLE handle, LPDWORD exitCode) while ( res = ::MsgWaitForMultipleObjects(1, &handle, false, 500, QS_KEY | QS_MOUSEBUTTON), - ((m_UserInterface == nullptr) || !m_UserInterface->unlockClicked())) { + ((uilock == nullptr) || !uilock->unlockClicked())) { if (!::GetVFSProcessList(&numProcesses, processes)) { break; @@ -1335,7 +1363,7 @@ bool OrganizerCore::waitForProcessCompletion(HANDLE handle, LPDWORD exitCode) // Update the lock process name with the name of the lowest active PID - though this may not actually be the main process if (handles.size() > 0) - m_UserInterface->setProcessName(QString::fromStdWString(getProcessName(handles.begin()->second))); + uilock->setProcessName(QString::fromStdWString(getProcessName(handles.begin()->second))); // If the main wait process dies, we need a backup wait process until the subprocesses close if ((res == WAIT_FAILED) || (res == WAIT_OBJECT_0)) { diff --git a/src/organizercore.h b/src/organizercore.h index 40531195..0927c88e 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -267,7 +267,7 @@ private: const MOShared::DirectoryEntry *directoryEntry, int createDestination); - bool waitForProcessCompletion(HANDLE handle, LPDWORD exitCode); + bool waitForProcessCompletion(HANDLE handle, LPDWORD exitCode, ILockedWaitingForProcess* uilock); private slots: -- cgit v1.3.1 From 689248619ada12eb9e50ea40963a04c946cb3e13 Mon Sep 17 00:00:00 2001 From: Eran Mizrahi Date: Sat, 9 Dec 2017 23:25:51 +0200 Subject: rewrite waitForProcessCompletion more robustly --- src/organizercore.cpp | 160 +++++++++++++++++++++++--------------------------- 1 file changed, 72 insertions(+), 88 deletions(-) (limited to 'src/organizercore.cpp') diff --git a/src/organizercore.cpp b/src/organizercore.cpp index f0dfa8d4..91330d3a 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1305,102 +1305,86 @@ bool OrganizerCore::waitForApplication(HANDLE handle, LPDWORD exitCode) bool OrganizerCore::waitForProcessCompletion(HANDLE handle, LPDWORD exitCode, ILockedWaitingForProcess* uilock) { - DWORD startPID = ::GetProcessId(handle); - - static const DWORD maxCount = 5; - size_t numProcesses = maxCount; - LPDWORD processes = new DWORD[maxCount]; - std::map handles; - - bool tryAgain = true; - DWORD moProcess = -1; - - DWORD res; - // Wait for a an event on the handle, a key press, mouse click or timeout - while ( - res = ::MsgWaitForMultipleObjects(1, &handle, false, 500, - QS_KEY | QS_MOUSEBUTTON), - ((uilock == nullptr) || !uilock->unlockClicked())) { + bool originalHandle = true; + bool newHandle = true; + bool uiunlocked = false; + + constexpr DWORD INPUT_EVENT = WAIT_OBJECT_0 + 1; + DWORD res = WAIT_TIMEOUT; + while (handle != INVALID_HANDLE_VALUE && (newHandle || res == WAIT_TIMEOUT || res == INPUT_EVENT)) + { + if (newHandle) { + QString processName = QString::fromStdWString(getProcessName(handle)); + processName += QString(" (%1)").arg(GetProcessId(handle)); + if (uilock) + uilock->setProcessName(processName); + qDebug() << "Waiting for" + << (originalHandle ? "spawned" : "usvfs") + << "process completion :" << processName.toUtf8().constData(); + newHandle = false; + } - if (!::GetVFSProcessList(&numProcesses, processes)) { - break; - } + // keep processing events so the app doesn't appear dead + QCoreApplication::processEvents(); - // Get USvFS processes, build a handle map, and allow to continue if invalid PIDs are supplied - bool found = false; - size_t count = - std::min(static_cast(maxCount), numProcesses); - for (size_t i = 0; i < count; ++i) { - DWORD currentProcess = processes[i]; - if (currentProcess != moProcess && handles.count(currentProcess) == 0) { - HANDLE currentHandle = ::OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, currentProcess); - std::wstring processName = getProcessName(currentHandle); - if (!boost::starts_with(processName, L"ModOrganizer.exe")) { - found = true; - if (currentHandle == nullptr || currentHandle == INVALID_HANDLE_VALUE) continue; - handles.insert(std::pair(currentProcess, currentHandle)); - } - else - { - moProcess = processes[i]; - ::CloseHandle(currentHandle); - } - } - } + // Wait for a an event on the handle, a key press, mouse click or timeout + res = MsgWaitForMultipleObjects(1, &handle, FALSE, 500, QS_KEY | QS_MOUSEBUTTON); + if (res == WAIT_FAILED) { + qWarning() << "Failed waiting for process completion : MsgWaitForMultipleObjects WAIT_FAILED" << GetLastError(); + break; + } - // Clean up tracked handles - for (std::map::iterator checkHandle = handles.begin(); checkHandle != handles.end(); ++checkHandle) { - if (checkHandle->second != nullptr && checkHandle->second != INVALID_HANDLE_VALUE) { - DWORD processExit; - BOOL codeCheck = ::GetExitCodeProcess(checkHandle->second, &processExit); - if (!codeCheck || processExit != STILL_ACTIVE) { - if (!codeCheck) qDebug() << "Checking the process failed: Error Code " << ::GetLastError(); - ::CloseHandle(checkHandle->second); - checkHandle = handles.erase(checkHandle); - } - } - } + if (uilock && uilock->unlockClicked()) { + uiunlocked = true; + break; + } - // Update the lock process name with the name of the lowest active PID - though this may not actually be the main process - if (handles.size() > 0) - uilock->setProcessName(QString::fromStdWString(getProcessName(handles.begin()->second))); - - // If the main wait process dies, we need a backup wait process until the subprocesses close - if ((res == WAIT_FAILED) || (res == WAIT_OBJECT_0)) { - if (handles.size() > 0) { - // By the time we get here, the main wait function should always immediately continue - // Passing in a handle doesn't seem to work for subprocesses - ::MsgWaitForMultipleObjects(0, NULL, FALSE, 500, QS_KEY | QS_MOUSEBUTTON); - } - } + if (res == WAIT_OBJECT_0) { + // process we were waiting on has completed + if (originalHandle && !::GetExitCodeProcess(handle, exitCode)) + qWarning() << "Failed getting exit code of complete process :" << GetLastError(); + CloseHandle(handle); + handle = INVALID_HANDLE_VALUE; + originalHandle = false; + + // if the previous process spawned a child process and immediately exits we may miss it if we check immediately + QThread::msleep(500); + + // search if there is another usvfs process active and if so wait for it + // in theory a querySize of 1 is probably enough since the MO process doesn't seem to be returned by GetVFSProcessList + constexpr size_t querySize = 2; // just to be on the safe side + DWORD pids[querySize]; + size_t found = querySize; + if (!::GetVFSProcessList(&found, pids)) { + qWarning() << "Failed waiting for process completion : GetVFSProcessList failed?!"; + break; + } - // Give the process list a short time to populate - // Required for initial USVFS boot and process switching - if (handles.size() == 0 && !found) { - if (tryAgain) { - tryAgain = false; - QThread::msleep(500); - continue; - } - else { - break; - } - } - else { - tryAgain = true; - } + for (size_t i = 0; i < found; ++i) { + if (pids[i] == GetCurrentProcessId()) + continue; // obviously don't wait for MO process + handle = ::OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION|SYNCHRONIZE, FALSE, pids[i]); + if (handle == INVALID_HANDLE_VALUE) { + qWarning() << "Failed waiting for process completion : OpenProcess failed" << GetLastError(); + continue; + } + newHandle = true; + break; + } + } + } - // keep processing events so the app doesn't appear dead - QCoreApplication::processEvents(); - } + if (res == WAIT_OBJECT_0) + qDebug() << "Waiting for process completion successfull"; + else if (uiunlocked) + qDebug() << "Waiting for process completion aborted by UI"; + else + qDebug() << "Waiting for process completion not successfull :" << res; - //Cleanup - if (handle != INVALID_HANDLE_VALUE) { - ::CloseHandle(handle); - } - delete[] processes; + if (handle != INVALID_HANDLE_VALUE) + ::CloseHandle(handle); - return res == WAIT_OBJECT_0; + return res == WAIT_OBJECT_0; } bool OrganizerCore::onAboutToRun( -- cgit v1.3.1