Slight back step from commit 34fe992f44. I don't keep track anymore of the number of errors inside GimpCriticalDialog. The problem is that GTK+ calls must happen in the main thread, and errors in another thread will be delayed into the main thread through gdk_threads_add_idle_full(). This makes any backtrace generated as a consequence of a threaded error useless (in particular any error happening in GEGL since we always process these as multi-threaded, whether they are or not). Instead I now keep track of the number of errors in gui-message.c, which still allows to reset the counters when the unique debug dialog is closed. Therefore I can now generate backtraces conditionally to the error counters inside the problematic thread (and right when the error happened), without any GTK+ call. This finally makes GEGL backtraces useful in the debug dialog! :-)
b0cd4412e0 app: make backtrace processed in the thread where error happens.
app/gui/gui-message.c | 184 +++++++++++++++++++++++++++------------
app/widgets/gimpcriticaldialog.c | 25 ------
app/widgets/gimpcriticaldialog.h | 5 --
3 files changed, 127 insertions(+), 87 deletions(-)