[gimp/gimp-2-10] app: initialize GimpBacktrace earlier on



commit 0fdf6c22893f05fec6f0c8a4d35a6f039145c69a
Author: Ell <ell_se yahoo com>
Date:   Sun May 19 10:46:52 2019 -0400

    app: initialize GimpBacktrace earlier on
    
    Initialize GimpBacktrace earlier on in the startup process, so that
    the Windows backend installs the thread-name exception handler
    early enough to catch threads created before app_run() (in
    particular, the GEGL worker threads).
    
    (cherry picked from commit 853d91b8e4d0afa371a8418fdb340e8ca975ab47)

 app/app.c  | 7 -------
 app/main.c | 7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/app/app.c b/app/app.c
index f567629029..81e6bdc503 100644
--- a/app/app.c
+++ b/app/app.c
@@ -56,7 +56,6 @@
 #include "core/gimp.h"
 #include "core/gimp-batch.h"
 #include "core/gimp-user-install.h"
-#include "core/gimpbacktrace.h"
 #include "core/gimpimage.h"
 
 #include "file/file-open.h"
@@ -213,12 +212,6 @@ app_run (const gchar         *full_prog_name,
       filenames = NULL;
     }
 
-  /* Initialize GimpBacktrace early on.  In particular, we want the
-   * Windows backend to catch the SET_THREAD_NAME exceptions of newly
-   * created threads.
-   */
-  gimp_backtrace_init ();
-
   /* Language needs to be determined first, before any GimpContext is
    * instantiated (which happens when the Gimp object is created)
    * because its properties need to be properly localized in the
diff --git a/app/main.c b/app/main.c
index ac98d01313..d743999edb 100644
--- a/app/main.c
+++ b/app/main.c
@@ -53,6 +53,7 @@
 #include "config/gimpconfig-dump.h"
 
 #include "core/gimp.h"
+#include "core/gimpbacktrace.h"
 
 #include "pdb/gimppdb.h"
 #include "pdb/gimpprocedure.h"
@@ -324,6 +325,12 @@ main (int    argc,
   argv = __argv;
 #endif
 
+  /* Initialize GimpBacktrace early on.  In particular, we want the
+   * Windows backend to catch the SET_THREAD_NAME exceptions of newly
+   * created threads.
+   */
+  gimp_backtrace_init ();
+
   /* Start signal handlers early. */
   gimp_init_signal_handlers (&backtrace_file);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]