[gimp/gimp-2-10] plug-ins: more debugging data in file-darktable.



commit 6c67eef3e712a4b5d0ce9d6e94b8fefc1a3dcea1
Author: Jehan <jehan girinstud io>
Date:   Mon Jan 18 14:37:02 2021 +0100

    plug-ins: more debugging data in file-darktable.
    
    darktable GUI is "mangled" when opened from GIMP for a reporter. There
    was already some debug info outputted (when running with DARKTABLE_DEBUG
    environment variable). Adding the environment list (and some separation
    titles to make it easier to distinguish what is what). Hopefully it will
    help debugging.
    See #6195 and https://github.com/darktable-org/darktable/issues/7402
    
    (cherry picked from commit 7465b0782aa2d948508b09120edf11c1efeac53d)

 plug-ins/file-raw/file-darktable.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/file-raw/file-darktable.c b/plug-ins/file-raw/file-darktable.c
index ac8b16db77..6c5f5f6265 100644
--- a/plug-ins/file-raw/file-darktable.c
+++ b/plug-ins/file-raw/file-darktable.c
@@ -401,10 +401,18 @@ load_image (const gchar  *filename,
 
   if (debug_prints)
     {
+      gchar **environ = g_get_environ ();
+      gint    i;
+
       g_printf ("[%s] trying to call\n", __FILE__);
       for (gchar **iter = argv; *iter; iter++)
         g_printf ("    %s\n", *iter);
       g_printf ("\n");
+
+      g_printf ("## Environment ##\n");
+      for (i = 0; environ[i]; i++)
+        g_printf ("- %s\n", environ[i]);
+      g_strfreev (environ) ;
     }
 
   if (g_spawn_sync (NULL,
@@ -428,10 +436,10 @@ load_image (const gchar  *filename,
   if (debug_prints)
     {
       if (darktable_stdout && *darktable_stdout)
-        g_printf ("%s\n", darktable_stdout);
+        g_printf ("\n## stdout ##\n%s\n", darktable_stdout);
 
       if (darktable_stderr && *darktable_stderr)
-        g_printf ("%s\n", darktable_stderr);
+        g_printf ("\n## stderr ##\n%s\n", darktable_stderr);
     }
 
   g_free (darktable_stdout);


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