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.