I think I finally figured it out. I think the GTKapplication shutdown signal is called after the window has been destroyed. If I attach a handler to the window's destroy signal, then I am able to get the data from the sourceView.