[gimp] libgimp: do not end the fatal and signal handlers with gimp_quit().



commit 9c8a8ae57645ec60f1e072b4f7cb51917d14379d
Author: Jehan <jehan girinstud io>
Date:   Wed Apr 4 04:45:27 2018 +0200

    libgimp: do not end the fatal and signal handlers with gimp_quit().
    
    When ending with gimp_quit(), GIMP was not displaying the "Plug-in
    crashed" error dialog, which is not good, since we lose the crash
    feedback for plug-ins. Just let the plug-in continue its normal run in
    order to get the error dialog.
    Also protect the tracing functions, which are not working on Win32.

 libgimp/gimp.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/libgimp/gimp.c b/libgimp/gimp.c
index ac2b455..13df733 100644
--- a/libgimp/gimp.c
+++ b/libgimp/gimp.c
@@ -1942,6 +1942,7 @@ gimp_fatal_func (const gchar    *log_domain,
   g_printerr ("%s: %s: %s\n",
               progname, level, message);
 
+#ifndef G_OS_WIN32
   switch (stack_trace_mode)
     {
     case GIMP_STACK_TRACE_NEVER:
@@ -1967,8 +1968,12 @@ gimp_fatal_func (const gchar    *log_domain,
         }
       break;
     }
+#endif
 
-  gimp_quit ();
+  /* Do not end with gimp_quit().
+   * We want the plug-in to continue its normal crash course, otherwise
+   * we won't get the "Plug-in crashed" error in GIMP.
+   */
 }
 
 #ifndef G_OS_WIN32
@@ -2019,7 +2024,10 @@ gimp_plugin_sigfatal_handler (gint sig_num)
       break;
     }
 
-  gimp_quit ();
+  /* Do not end with gimp_quit().
+   * We want the plug-in to continue its normal crash course, otherwise
+   * we won't get the "Plug-in crashed" error in GIMP.
+   */
 }
 #endif
 


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