GNOME Bugzilla – Bug 778876
GIMP hangs opening some xcf files
Last modified: 2017-02-19 18:45:31 UTC
Created attachment 346136 [details] Info on one of the files that makes GIMP hang GIT GIMP builds from after Feb. 11 hang opening certain xcf files. I could not trace back which xcf files exactly, but with some it consistently hangs; with others it does not. Attached some info on one of the files that makes GIMP hang.
Can you attach one of the images that make GIMP hang consistently please?
Well, I understand that this can be useful, but it would mean publishing online the xcf of one of my pictures at full resolution... Sorry, but this is not going to happen even if I really want to help solving this bug. I may share the xcf with you personally, if that helps. What I forgot to mention in my previous message is what happens when one of these images are opened: * The layers show up in the "Layers" panel * A rectangle filled with small squares (as a transparent layer) is shown where the image should be. * At the moment when the image should be drawn in the rectangle the CPU goes to 100% and it stays there until you kill GIMP.
This might be the same issue as bug 778895, which can manifest itself as a hang, rather than a crash (depending on your compiler). Try latest master.
Thanks, I will test it ASAP. I wanted to do it right away, but GIMP does not seem to build anymore with today's pulls: /usr/bin/perl ../tools/gimp-mkenums \ --fhead "#include \"config.h\"\n#include <glib-object.h>\n#undef GIMP_DISABLE_DEPRECATED\n#include \"gimpbasetypes.h\"\n#include \"libgimp/libgimp-intl.h\"" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ ./gimpbaseenums.h > xgen-bec \ && cp xgen-bec gimpbaseenums.c \ && rm -f xgen-bec /usr/bin/perl ../tools/gimp-mkenums \ --fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"gimpbasetypes.h\"\n#include \"gimpcompatenums.h\"\n#include \"libgimp/libgimp-intl.h\"" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ ./gimpcompatenums.h > xgen-bec \ && cp xgen-bec gimpcompatenums.c \ && rm -f xgen-bec CC gimpcompatenums.lo cp: cannot stat 'xgen-bec': No such file or directory Makefile:1504: recipe for target 'gimpbaseenums.c' failed make[2]: *** [gimpbaseenums.c] Error 1 make[2]: *** Waiting for unfinished jobs.... gimpcompatenums.c:512:2: error: expected identifier or '(' before '}' token }, ^ gimpcompatenums.c:512:3: error: expected identifier or '(' before ',' token }, ^ gimpcompatenums.c:514:3: error: expected identifier or '(' before '}' token }; ^ gimpcompatenums.c:518:3: error: expected identifier or '(' before 'if' if (G_UNLIKELY (! type)) ^~ In file included from /usr/lib64/glib-2.0/include/glibconfig.h:9:0, from /usr/include/glib-2.0/glib/gtypes.h:32, from /usr/include/glib-2.0/glib/galloca.h:32, from /usr/include/glib-2.0/glib.h:30, from /usr/include/glib-2.0/gobject/gbinding.h:28, from /usr/include/glib-2.0/glib-object.h:23, from gimpcompatenums.c:5: /usr/include/glib-2.0/glib/gmacros.h:375:2: error: expected identifier or '(' before ')' token }) ^ /usr/include/glib-2.0/glib/gmacros.h:377:45: note: in expansion of macro '_G_BOOLEAN_EXPR' #define G_UNLIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR((expr)), 0)) ^~~~~~~~~~~~~~~ gimpcompatenums.c:518:7: note: in expansion of macro 'G_UNLIKELY' if (G_UNLIKELY (! type)) ^~~~~~~~~~ gimpcompatenums.c:526:3: error: expected identifier or '(' before 'return' return type; ^~~~~~ gimpcompatenums.c:527:1: error: expected identifier or '(' before '}' token } ^ gimpcompatenums.c: In function 'gimp_progress_command_get_type': gimpcompatenums.c:1488:3: error: expected expression at end of input static GType type = ^~~~~~ gimpcompatenums.c:1488:3: error: expected declaration or statement at end of input gimpcompatenums.c:1488:16: warning: unused variable 'type' [-Wunused-variable] static GType type = ^~~~ gimpcompatenums.c:1477:29: warning: unused variable 'descs' [-Wunused-variable] static const GimpEnumDesc descs[] = ^~~~~ gimpcompatenums.c:1466:27: warning: unused variable 'values' [-Wunused-variable] static const GEnumValue values[] = ^~~~~~ gimpcompatenums.c:1488:3: warning: control reaches end of non-void function [-Wreturn-type] static GType type = ^~~~~~ At top level: gimpcompatenums.c:1466:27: warning: 'values' defined but not used [-Wunused-const-variable=] static const GEnumValue values[] = ^~~~~~ gimpcompatenums.c:1477:29: warning: 'descs' defined but not used [-Wunused-const-variable=] static const GimpEnumDesc descs[] = ^~~~~ gimpcompatenums.c:1488:16: warning: 'type' defined but not used [-Wunused-variable] static GType type = ^~~~ gimpcompatenums.c:516:16: warning: 'type' defined but not used [-Wunused-variable] static GType type = 0; ^~~~ Makefile:1061: recipe for target 'gimpcompatenums.lo' failed make[2]: *** [gimpcompatenums.lo] Error 1 make[2]: Leaving directory '/home/alberto/nobackup/rpmbuild/BUILD/gimp-2.9.5/libgimpbase' Makefile:802: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/alberto/nobackup/rpmbuild/BUILD/gimp-2.9.5' Makefile:703: recipe for target 'all' failed make: *** [all] Error 2
Ah, looks like we introduced a race condition into the build... For now, do a non-parallel build (without -jX), or try again and again until it works :) If you still get the same error, do a "make clean" first.
-j1 did the trick! I confirm that new builds are OK and I could open all the files that I could not open before.
Thanks for taking the time to report this. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 778895 ***