Gri_mmse_fir_interpolator_cc::interpolate returns NaN

I am testing the gr_mpsk_receiver_cc module using the code attached at
the end.
It is gnuradio v3.3.1git-11-ge20160b7 on cygwin 1.7.5-1 with gcc 3.4.4.
When I run the code, the following error pops up:

assertion “imu >= 0” failed: file “gri_mmse_fir_interpolator_cc.cc”,
line 67, fu
nction: gr_complex gri_mmse_fir_interpolator_cc::interpolate(const
gr_complex*,
float)
Aborted (core dumped)

Digging into the source code, I found that the interpolator at line 306
of gr_mpsk_receiver_cc.cc return NaN when the inputs are all zeros.
line 306: gr_complex interp_sample =
d_interp->interpolate(&d_dl[d_dl_idx], d_mu);

trying it on ubuntu produced no problem.

Is this an known bug?
Kyle

######## test python script ################
#!/usr/bin/env python

from gnuradio import gr
from gnuradio.eng_option import eng_option
from optparse import OptionParser
import os

class my_top_block(gr.top_block):

def __init__(self):
    gr.top_block.__init__(self)

    parser = OptionParser(option_class=eng_option)
    parser.add_option("-i", "--input-file", type="string", 

default=None,
help=“Input file name”)
parser.add_option("-o", “–output-file”, type=“string”,
default=None,
help=“Output file name”)
(options, args) = parser.parse_args ()
if len(args) != 0 or options.input_file==None or
options.output_file==None:
parser.print_help()
raise SystemExit, 1

    sinput = gr.file_source(gr.sizeof_short, options.input_file, 

False)
src = gr.interleaved_short_to_complex()
self.connect(sinput, src)

    M=4
    theta=0.0
    alpha=0.01
    beta=alpha*alpha/4.0
    fmin=0.0
    fmax=1e-4
    mu=0.0
    gain_mu=0.05
    omega=2.2409
    gain_omega=omega*omega/4.0
    omega_rel=0.005

    receiver = gr.mpsk_receiver_cc

(M,theta,alpha,beta,fmin,fmax,mu,gain_mu,omega,gain_omega,omega_rel)
dst = gr.file_sink (gr.sizeof_gr_complex, options.output_file)
self.connect (src, receiver, dst)

if name == ‘main’:
try:
my_top_block().run()
except KeyboardInterrupt:
pass

On Tue, Jun 22, 2010 at 11:31 PM, Kyle Z. [email protected] wrote:

Aborted (core dumped)
Kyle
The error suggests that the d_mu value is < 0, which is unrelated to
the inputs being all 0. There should be no problem with inputs being
all 0, and if d_mu is less than 0, something is going wrong. Not sure
what to tell you right now, but more debug information would be
helpful.

Tom

Tom R. wrote:

The error suggests that the d_mu value is < 0, which is unrelated to
the inputs being all 0. There should be no problem with inputs being
all 0, and if d_mu is less than 0, something is going wrong. Not sure
what to tell you right now, but more debug information would be
helpful.

Tom

Thanks Tom.
Yes, you are right. the error is unrelated to the inputs being all
zeros.
Actually, d_mu is not negative either. d_mu is NaN when the error
occurs.
By doing some debugging, I have located the problem in
gr_fir_ccf_simd::filter(), which is called by
gri_mmse_fir_interpolator_cc::interpolate(), which in turn is called by
gr_mpsk_receiver_cc::general_work().
For the first call, gr_fir_ccf_simd::filter() returned a value with NaN
as its imaginary part.
Then this value (interp_sample in gr_mpsk_receiver_cc) is passed into
mm_error_tracking(), which causes mm_error, and particularly, d_mu to be
NaN.
Then when gri_mmse_fir_interpolator_cc::interpolate() is called again
with d_mu passed in, the first line
imu = (int) rint(mu*NSTEPS);
will produced a negative imu, which raises the assertion failure.

So the problem lies in gr_fir_ccf_simd::filter(). But why does it return
NaN? I am not sure.
This only happens in Cygwin.

I put aside the problem and switched to Ubuntu to continue my work.

Strangely, after some time of augmenting my codes, when I return to
Cygwin with the augmented codes, that problem disappeared secretly!

Now I cannot reproduce that problem, which prevents me from further
debugging.

Kyle