Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P25 C4FM Decoder - ArrayIndexOutOfBounds Exception #1169

Closed
DSheirer opened this issue Mar 15, 2022 · 0 comments · Fixed by #1172
Closed

P25 C4FM Decoder - ArrayIndexOutOfBounds Exception #1169

DSheirer opened this issue Mar 15, 2022 · 0 comments · Fixed by #1172

Comments

@DSheirer
Copy link
Owner

This is occurring infrequently on 0.5.0-alpha7 using an RTL dongle with polyphase channelizer and P25 C4FM decoder. It's happening for both 1-channel and 2-channel output processors.

Task

Update the InterpolatingSampleBuffer to not let the interpolation offset fall below zero.

20220314 112641.965 [sdrtrunk polyphase channel] ERROR i.g.d.d.f.c.o.OneChannelOutputProcessor - Error extracting channel samples from one polyphase channel results buffer [996MB/2GB 39%]
java.lang.ArrayIndexOutOfBoundsException: Index -36 out of bounds for length 129
at io.github.dsheirer.dsp.filter.interpolator.RealInterpolator.filter(RealInterpolator.java:49)
at io.github.dsheirer.dsp.psk.InterpolatingSampleBuffer.getInphase(InterpolatingSampleBuffer.java:190)
at io.github.dsheirer.dsp.psk.InterpolatingSampleBuffer.getCurrentSample(InterpolatingSampleBuffer.java:162)
at io.github.dsheirer.dsp.psk.DQPSKDecisionDirectedDemodulator.calculateSymbol(DQPSKDecisionDirectedDemodulator.java:54)
at io.github.dsheirer.dsp.psk.PSKDemodulator.receive(PSKDemodulator.java:117)
at io.github.dsheirer.dsp.psk.PSKDemodulator.receive(PSKDemodulator.java:93)
at io.github.dsheirer.module.decode.p25.phase1.P25P1DecoderC4FM.receive(P25P1DecoderC4FM.java:114)
at io.github.dsheirer.module.decode.p25.phase1.P25P1DecoderC4FM.receive(P25P1DecoderC4FM.java:44)
at io.github.dsheirer.sample.Broadcaster.broadcast(Broadcaster.java:152)
at io.github.dsheirer.sample.Broadcaster.receive(Broadcaster.java:59)
at io.github.dsheirer.dsp.filter.channelizer.PolyphaseChannelSource.receive(PolyphaseChannelSource.java:104)
at io.github.dsheirer.dsp.filter.channelizer.PolyphaseChannelSource.receive(PolyphaseChannelSource.java:31)
at io.github.dsheirer.dsp.filter.channelizer.output.OneChannelOutputProcessor.process(OneChannelOutputProcessor.java:100)
at io.github.dsheirer.dsp.filter.channelizer.output.ChannelOutputProcessor.lambda$new$0(ChannelOutputProcessor.java:50)
at io.github.dsheirer.util.Dispatcher$Processor.run(Dispatcher.java:180)
at java.base/java.lang.Thread.run(Unknown Source)

DSheirer pushed a commit that referenced this issue Mar 16, 2022
…ed sample value that is less than 0. Not sure why or what is causing this but this change guards against an ArrayIndexOutOfBounds exception when it does happen.
DSheirer added a commit that referenced this issue Mar 16, 2022
…ed sample value that is less than 0. Not sure why or what is causing this but this change guards against an ArrayIndexOutOfBounds exception when it does happen. (#1172)

Co-authored-by: Dennis Sheirer <dsheirer@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant