So, I'm sitting at work, fiddling with output formats and such, when I start having this bug. Not a nice, friendly, python exception. My code just starts hanging. Not at the same place each time, either. At slightly different points in a section I hadn't modified in ages, or sometimes in an external program. Lots of fun. So, I add more debugging output to the section it hangs in, trying to find some pattern, and it just gets worse. I work around it; it seems to not hang for small files. I still have no idea why. I take a break, go back to it. Then one of those inspiration particles from Terry Pratchet hits me. I'd noticed from the logfiles before that it seemed to start hanging in the middle of debugging output, but I'd ignored it as the file not closing properly. Just for kicks, I comment out my debugging output function. It works. I officially killed my program with a broken debugging output function. Go me.
That probably doesn't make that much sense to most of you. You had to be there. And a programmer. ^_^