From 1718ea5f3eed294de2c5d025858a8fdd33f5188d Mon Sep 17 00:00:00 2001 From: gisforgirard Date: Tue, 2 May 2023 17:45:22 -0400 Subject: [PATCH 1/2] Update p25_frame_assembler_impl.cc this is the actual crash fix i kept messing up, for real this time --- lib/op25_repeater/lib/p25_frame_assembler_impl.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/op25_repeater/lib/p25_frame_assembler_impl.cc b/lib/op25_repeater/lib/p25_frame_assembler_impl.cc index a49f39512..106e2a35f 100644 --- a/lib/op25_repeater/lib/p25_frame_assembler_impl.cc +++ b/lib/op25_repeater/lib/p25_frame_assembler_impl.cc @@ -183,6 +183,10 @@ p25_frame_assembler_impl::general_work (int noutput_items, //BOOST_LOG_TRIVIAL(trace) << "P25 Frame Assembler - output_queue: " << output_queue.size() << " noutput_items: " << noutput_items << " ninput_items: " << ninput_items[0]; if (amt_produce > 0) { + if (amt_produce >= 32768) { + BOOST_LOG_TRIVIAL(error) << "just saved you from a crash, amt_produce = " << amt_produce; + amt_produce = 32767; // buffer limit is 32768, see gnuradio/gnuradio-runtime/lib/../include/gnuradio/buffer.h:186 + } long src_id = p1fdma.get_curr_src_id(); long grp_id = p1fdma.get_curr_grp_id(); // If a SRC wasn't received on the voice channel since the last check, it will be -1 @@ -254,4 +258,4 @@ p25_frame_assembler_impl::general_work (int noutput_items, } } } /* namespace op25_repeater */ -} /* namespace gr */ \ No newline at end of file +} /* namespace gr */ From 9be8181e4e1f5c917085af76fdb66780559e9505 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Thu, 4 May 2023 21:23:21 -0400 Subject: [PATCH 2/2] Update p25_frame_assembler_impl.cc --- lib/op25_repeater/lib/p25_frame_assembler_impl.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/op25_repeater/lib/p25_frame_assembler_impl.cc b/lib/op25_repeater/lib/p25_frame_assembler_impl.cc index 106e2a35f..a6947ddce 100644 --- a/lib/op25_repeater/lib/p25_frame_assembler_impl.cc +++ b/lib/op25_repeater/lib/p25_frame_assembler_impl.cc @@ -184,7 +184,8 @@ p25_frame_assembler_impl::general_work (int noutput_items, if (amt_produce > 0) { if (amt_produce >= 32768) { - BOOST_LOG_TRIVIAL(error) << "just saved you from a crash, amt_produce = " << amt_produce; + BOOST_LOG_TRIVIAL(error) << "P25 Frame Assembler - output_queue size: " << output_queue.size() << " max size: " << output_queue.max_size() << " limiting amt_produce to 32767 "; + amt_produce = 32767; // buffer limit is 32768, see gnuradio/gnuradio-runtime/lib/../include/gnuradio/buffer.h:186 } long src_id = p1fdma.get_curr_src_id();