The problem may not be related to g_idle_add after all. It merely seems to appear after some large number of iterations of the main loop (10000+, typically); including an idle function seemed to exacerbate it. I have no idea how to track this down.