Comment 34 for bug 843361

Revision history for this message
Joseph Nuzman (jnuzman) wrote : Re: simple-scan crashed with SIGSEGV in g_closure_invoke()

I was suffering from a couple of flavors of this bug. It seems that in all cases callbacks for non-existant PageViews were getting triggered by signals related to Page updates. With the attached patch (against 3.4.2), I have not been able to reproduce any of those segfaults.

The patch does two things. In the BookView constructor, it does not try to add_cb existing pages until after the page_data hash has been initialized. Secondly, it adds a destructor for PageView that disconnects from all the Page signals that were connected to in the PageView constructor. Also, Book.clear() is changed to emit the cleared() signal before actually clearing the pages list structure.