After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778876 - GIMP hangs opening some xcf files
GIMP hangs opening some xcf files
Status: RESOLVED DUPLICATE of bug 778895
Product: GIMP
Classification: Other
Component: General
git master
Other All
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2017-02-18 15:33 UTC by Alberto Ferrante
Modified: 2017-02-19 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Info on one of the files that makes GIMP hang (73.41 KB, image/jpeg)
2017-02-18 15:33 UTC, Alberto Ferrante
Details

Description Alberto Ferrante 2017-02-18 15:33:17 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.
Comment 1 Michael Natterer 2017-02-18 17:06:49 UTC
Can you attach one of the images that make GIMP hang consistently please?
Comment 2 Alberto Ferrante 2017-02-18 17:59:47 UTC
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.
Comment 3 Ell 2017-02-19 05:29:09 UTC
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.
Comment 4 Alberto Ferrante 2017-02-19 14:28:11 UTC
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
Comment 5 Ell 2017-02-19 15:47:12 UTC
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.
Comment 6 Alberto Ferrante 2017-02-19 18:43:10 UTC
-j1 did the trick!
I confirm that new builds are OK and I could open all the files that I could not open before.
Comment 7 Michael Schumacher 2017-02-19 18:45:15 UTC
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 ***