How to make a cat want to leave a place

TL;DR: Burn a lot of incense. The cat won’t like the smoke and will leave voluntarily.

What actually happened: One of the cats (a particularly antisocial and uncooperative one) ripped apart the mosquito net at one of the basement windows and jumped inside to give birth to her kittens. She chose a particularly fluffy place as her new nest: on top of some carpets we had stored there. It was also right next to the boiler for the petrol heating that we have.

Leaving the cat there would probably mean that the carpets would eventually need to be thrown away, not to mention that the whole basement would smell badly. What’s worse: my parents had to leave for a few days. If they left the window open, the cat would be able to jump in and out, but so would the thieves. If they closed it, she’d be so upset that she might as well rip everything apart. Furthermore, she was already quite ill-tempered before, and she became particularly aggressive when she had to protect her babies, so grabbing her to take her out by force was out of the question. We tried sprinkling some vinegar and even some bleach on safe places, in case the smell became too unpleasant, but it didn’t seem to work.

A friend suggested to light a fire and let the cat leave because of the smoke. However, a room full of carpets and a petrol boiler wasn’t exactly the safest place for a fire. I told my parents and they thought about burning some incense. That made the cat bring the babies into another room, but still inside the basement. Some progress here: we had saved the carpets from the cats, but we’d still have to leave a way in and out for her – and the thieves.

However, that other room made it much easier to burn A LOT of incense, without having to put it on places that would risk being accidentally knocked over by an upset cat, and also without risking to burn carpets below. At the end it was successful: she was successfully seen outside the basement! The kittens weren’t seen or heard outside the basement, but they also weren’t seen or heard inside, so it’s safe to assume that she finally brought them outside.

Bug of the day: 2018-04-11

I recently noticed that we had a very big memory leak. My first reaction was to run valgrind. However, valgrind was only showing me some loose change here and there, nothing serious. Just to be sure, I fixed the small things it found, but the memory usage kept increasing. What’s worse; memory usage was pretty much constant when running things on valgrind, but was skyrocketing when running things normally. Pretty much the definition of a Heisenbug.

Some time later, I noticed that the memory usage was also just fine sometimes when running stuff normally. Then I noticed that, in those cases, it would fail to create an output file, but wouldn’t bother informing you about it. That’s pretty much the definition of a Mad Girlfriend Bug.

I investigated the Mad Girlfriend Bug a bit more, and found that some element would sometimes fail to transition to PLAYING fast enough, causing it to return flushing, and therefore preventing all media data from running through the pipeline. It just happened that valgrind changed the timing so that it was always reproducible. That also explains why the memory leak wasn’t appearing on valgrind:

Roll Safe Think meme: You can't leak media data if it's just not flowing in the pipeline

In the meantime, I took a look at git diff and found what was causing the memory leak. I was using an appsink/appsrc combination. If you pull a buffer from the appsink and push it into the appsrc, it gets consumed by the appsrc. However, if you pull a sample from the appsink and push it into the appsrc, you need to unref it later. I ended up having to make it obvious in the documentation:

https://bugzilla.gnome.org/show_bug.cgi?id=795150