discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Top block trash not cleaning up where it used to.


From: Miguel Duarte
Subject: Re: [Discuss-gnuradio] Top block trash not cleaning up where it used to. File sink not writing in some instances.
Date: Wed, 8 Jan 2014 17:44:54 +0000

Marcus Muller: It.. kind of worked, in relation to the file sink writing. Worked in some cases but not in most (!?), it seemed up to chance really. I don't know what to think of it.

Martin Braun: That solution didn't work, at least in my case. Thanks for the advice though.

I've tried everything, and I'm feeling really dumb for not managing to make it work. I've switched to a more practical method, using lock() and unlock().

But even destroying all blocks (including the file sink block) and constructing them again, it doesn't work. Also, I've switched order and it always works for the first time. There's something I'm missing. (The only blocks I'm not destroying are the USRP blocks now, but I don't think that could be it, even if the USRP was giving out weird data it would write it to file.) The thing is, since I'm not using any wxgui blocks right now and I never intended to, I don't even know how I'm supposed to debug and check if there's anything reaching the file sink.

I mean I'm doing some heavy duty stuff right now:

-Instance detector (with start() and lock() in __init__, but no connections)
-Add blocks/connections
-Unlock/Write (it does)
-Lock
-Remove all blocks except USRP / Add them all again and connect them
-Unlock/Write (0B file)
-Lock

Can I extract and print in python the info going through a certain block, or something like that? Or do I have to delve into C++ territory?

Something so simple, yet something that is taking me so many hours. Eh.

Thanks guys.


2014/1/5 Martin Braun <address@hidden>
On 01/03/2014 11:01 PM, Miguel Duarte wrote:
> The proposed solution was using detector1.wait() and detector1 = None
> after stopping the flowgraph.

I very vaguely remember something like this... Try this: Put the whole
thing into an extra function, and assign the tb there, like:

def run_one_instance():
    d = detector()
    d.start()
    time.sleep(x)
    d.stop()
    return

I think this does the garbage collection differently. Tell us what happened!

MB

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

[Prev in Thread] Current Thread [Next in Thread]