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 <[email protected]>

> 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
> [email protected]
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to