I have a bug that surfaces about once a day. This bug causes my application output to show the following:

ASSERT: "unindexedItems.isEmpty()" in file graphicsview\qgraphicsscenebsptreeindex.cpp, line 385
QWidget::repaint: Recursive repaint detected

I get no stack trace, and it is virtually impossible for me to recreate the error on purpose. I have found that I can set a breakpoint on qFatal() and will get access to the runtime stack that way before the application crashes, but it was my understanding that good programming practice was to put asserts only in places where you have control over input, and use them as a check to make sure that your input is good, while exceptions are more appropriate for libraries, because they are easier to handle without a disgraceful shutdown of the application.

Can anyone shed some light on either how I can more easily track down my bug, or why QT was designed with asserts, rather than exceptions?

Regards!