diff --git a/USER_MANUAL.md b/USER_MANUAL.md index 08baee23..fe9a4375 100644 --- a/USER_MANUAL.md +++ b/USER_MANUAL.md @@ -802,6 +802,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes * Fix WASAPI errors on some machines by supporting audio mix formats other than 16-bit integer. (PR #919) * Reduce CPU usage of FreeDV Reporter window by only re-sorting if we actually get new data from the server. (PR #915) * FreeDV Reporter: Fix issue with first column not being aligned properly with other columns. (PR #922) + * Fix GTK+ assertion after FreeDV Reporter has been open for a long time. (PR #929) 2. Documentation: * Add missing dependency for macOS builds to README. (PR #925; thanks @relistan!) * Add note about using XWayland on Linux. (PR #926) diff --git a/src/gui/dialogs/freedv_reporter.cpp b/src/gui/dialogs/freedv_reporter.cpp index 39938348..1fce3b2b 100644 --- a/src/gui/dialogs/freedv_reporter.cpp +++ b/src/gui/dialogs/freedv_reporter.cpp @@ -1340,9 +1340,24 @@ double FreeDVReporterDialog::FreeDVReporterDataModel::RadiansToDegrees_(double r void FreeDVReporterDialog::FreeDVReporterDataModel::execQueuedAction_() { // This ensures that we handle server events in the order they're received. - std::unique_lock lk(fnQueueMtx_); - fnQueue_[0](); - fnQueue_.erase(fnQueue_.begin()); + std::unique_lock lk(fnQueueMtx_, std::defer_lock_t()); + lk.lock(); + auto size = fnQueue_.size(); + lk.unlock(); + + while(size > 0) + { + lk.lock(); + auto fn = fnQueue_[0]; + lk.unlock(); + + fn(); + + lk.lock(); + fnQueue_.erase(fnQueue_.begin()); + size = fnQueue_.size(); + lk.unlock(); + } } FreeDVReporterDialog::FilterFrequency FreeDVReporterDialog::getFilterForFrequency_(uint64_t freq)