Skip to content

Commit ca0bc84

Browse files
committed
Force synchronous GUI decode path to avoid Win10 worker-thread mutex crashes
1 parent bb5395d commit ca0bc84

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/gui/app.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ App::App(const Options& opts) : options_(opts), sim_ui_visible_(opts.enable_sim)
247247
config_ = presets::balanced();
248248
ultra::gui::startupTrace("App", "presets-balanced-exit");
249249

250+
// Run modem decode synchronously in GUI thread to avoid startup-time
251+
// worker-thread races on fragile Windows systems.
252+
modem_.setSynchronousMode(true);
253+
250254
if (!options_.disable_waterfall) {
251255
ultra::gui::startupTrace("App", "waterfall-create-begin");
252256
waterfall_ = std::make_unique<WaterfallWidget>();
@@ -856,6 +860,7 @@ void App::initVirtualStation() {
856860

857861
// Create virtual station's modem
858862
virtual_modem_ = std::make_unique<ModemEngine>();
863+
virtual_modem_->setSynchronousMode(true);
859864

860865
// Set up virtual station's protocol
861866
virtual_protocol_.setLocalCallsign(virtual_callsign_);
@@ -1753,6 +1758,7 @@ void App::pollRadioRx() {
17531758
}
17541759

17551760
modem_.feedAudio(samples);
1761+
modem_.processRxBuffer();
17561762
if (waterfall_) {
17571763
waterfall_->addSamples(samples.data(), samples.size());
17581764
}

0 commit comments

Comments
 (0)