diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index c34041f72..990780e3d 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -118,6 +118,14 @@ void GNSSFlowgraph::init() int sources_count_deprecated = configuration_->property("Receiver.sources_count", 1); sources_count_ = configuration_->property("GNSS-SDR.num_sources", sources_count_deprecated); + // Avoid segmentation fault caused by wrong configuration + if (sources_count_ == 2 && block_factory->GetSignalSource(configuration_.get(), queue_.get(), 0)->implementation() == "Multichannel_File_Signal_Source") + { + std::cout << " * Please set GNSS-SDR.num_sources=1 in your configuraiion file\n"; + std::cout << " if you are using the Multichannel_File_Signal_Source implementation.\n"; + sources_count_ = 1; + } + int signal_conditioner_ID = 0; for (int i = 0; i < sources_count_; i++)