View Single Post
Old 02-22-2012, 12:43 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,423
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you look at the edit_metadata() method in actions/edit_metadata.py you will see how the UI is refreshed after a metadata edit operation (bulk or single). Use the same code. Though I thought you said that the crash happened even when you removed the refresh code.

As for debugging these crashes, there's no easy way. If you run calibre on linux, you can compile python, pyqt, sip and qt with -ggdb and then get back traces with gdb, but the backtraces are not awfully helpful. The most effective technique is to look for PyQt objects going out of scope and getting garbage collected. Try to aggressively keep references to every pyqt object you create.
kovidgoyal is offline   Reply With Quote