Fix GTK+ assertion after FreeDV Reporter has been open for a long time. (#929)

* Fix GTK+ assertion after FreeDV Reporter has been open for a long time.

* Add PR #929 to changelog.
ms-emoji-flag-delete^2
Mooneer Salem 2025-06-11 19:19:23 -07:00 committed by GitHub
parent 38d9748e72
commit ed0d4cca2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 3 deletions

View File

@ -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) * 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) * 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) * 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: 2. Documentation:
* Add missing dependency for macOS builds to README. (PR #925; thanks @relistan!) * Add missing dependency for macOS builds to README. (PR #925; thanks @relistan!)
* Add note about using XWayland on Linux. (PR #926) * Add note about using XWayland on Linux. (PR #926)

View File

@ -1340,9 +1340,24 @@ double FreeDVReporterDialog::FreeDVReporterDataModel::RadiansToDegrees_(double r
void FreeDVReporterDialog::FreeDVReporterDataModel::execQueuedAction_() void FreeDVReporterDialog::FreeDVReporterDataModel::execQueuedAction_()
{ {
// This ensures that we handle server events in the order they're received. // This ensures that we handle server events in the order they're received.
std::unique_lock<std::mutex> lk(fnQueueMtx_); std::unique_lock<std::mutex> lk(fnQueueMtx_, std::defer_lock_t());
fnQueue_[0](); 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()); fnQueue_.erase(fnQueue_.begin());
size = fnQueue_.size();
lk.unlock();
}
} }
FreeDVReporterDialog::FilterFrequency FreeDVReporterDialog::getFilterForFrequency_(uint64_t freq) FreeDVReporterDialog::FilterFrequency FreeDVReporterDialog::getFilterForFrequency_(uint64_t freq)