Gimp-Forum.net

Full Version: Freshly-Built Gimp 2.10 segfaults upon startup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Esteemed Colleagues:

I just built Gimp 2.10 from source and it crashes upon startup, as
soon as it tries to load the pagecurl plugin.  Sometimes the crash
appears to occur upon loading the screenshot plugin, but I think that
is because screenshot is the last plugin that is loaded before loading
the pagecurl plugin.  I think pagecurl is actually the plugin causing
the crash.  Gimp is multithreaded so the exact moment when the main
window is unmapped and the error message is printed is indeterminate.

The error message is

  g_param_spec_internal: assertion 'g_param_spec_is_valid_name (name)' failed
  /gnu/bin/gimp: fatal error: Segmentation fault

and it seems to be coming from gimp_wire_read().  There is nothing
weird in my environment to which the crash can be attributed; the
crash still occurs when gimp is invoked after "env - DISPLAY=$DISPLAY".

(Parenthetically, building gimp from source was a nightmare.  Gimp
2.10 required newer versions of, inter alia: glib, gtk, babl and gegl
than I had available thru my package manager, so I had to build those
from source too, and, in several cases, the libraries on which they
depend.  The gegl build kept failing until I built a newer version of
gobject-introspection than the one I had, and then rebuilt babl using
the newer version of g-ir-scanner.  This was, of course, completely
undocumented.)

Segmentation faults are common when you build software with a
PKG_CONFIG_PATH variable that does not correspond to your explicit or
implicit LD_LIBRARY_PATH when you run it, since you are linking
against different subroutines than the program was built to expect
(proper "-rpath" arguments in the pkg_config .pc files would fix that,
but the .pc files only contain -L arguments and not -rpath arguments,
I have no idea why).  This seems, however, not to be the case here.
When gimp crashes and the debugger window pops up, it reports:

   using GEGL version 0.4.26 (compiled against version 0.4.26)
   using GLib version 2.65.1 (compiled against version 2.65.1)
   using GdkPixbuf version 2.36.5 (compiled against version 2.36.5)
   using GTK+ version 2.24.32 (compiled against version 2.24.32)
   using Pango version 1.42.3 (compiled against version 1.42.3)
   using Fontconfig version 2.13.92 (compiled against version 2.13.92)
   using Cairo version 1.14.8 (compiled against version 1.14.8)

So -- at least with respect to those seven libraries (all of which I
had to build from source in order to be able to build gimp 2.10) --
gimp is using, at run time, the same version of the library that it
was built to expect.

How do I build a Gimp 2.10 binary that I can get to actually function?

I have no idea what the pagecurl plugin does, but I suspect that I
would be happy to live without it.  I do not, however, see a configure
option for declining to build it.

As always, thank you in advance for any and all replies.

            jay at m5 dot chicago dot il dot us
What distro and version are you using?

I also build Gimp from source (2.10 and 2.99) on Ubuntu 19.10 and even if the first attempts were not exactly a walk in the park I only had to recompile babl/gegl (that are core components of Gimp).

So yes, Gimp uses relatively recent versions of some libraries (though some that I have are older than ones you used), but then if there are new versions of libraries it is expected these are useful (we can't stay frozen in the 80's...). On the Ubuntu/Debian side using a distro older than Ubuntu 18.04 leads to a dependency avalanche.

If specific plugins are failing you can disable them (mark them as non-executable). But plugins run in separate processes and a plugin crash normally doesn't crash Gimp, so your problem could be elsewhere.
Esteemed Colleagues:

I solved my problem by renaming the pagecurl plugin (removing its execute permissions, as recommended by the previous poster, also works).  And the problem was definitely coming from pagecurl; here is the full text of the (former) error message, including the last line which I failed to quote in my original posting:

    (gimp:16098): GLib-GObject-CRITICAL **: 15:27:51.353: g_param_spec_internal: assertion 'g_param_spec_is_valid_name (name)' failed
    /gnu/bin/gimp: fatal error: Segmentation fault

    (pagecurl:16112): LibGimpBase-WARNING **: 15:27:52.850: pagecurl: gimp_wire_read(): error


Although I really should not say that I solved the problem, only that I worked around it, inasmuch as I am now living without the pagecurl plugin, and therefore, presumably, cannot curl my pages.  It is, perhaps, for the best, then, that I do not know what it means to curl pages, and, therefore, do not know what I am missing, and cannot have.

I still had to do one more thing to get a gimp with the functionality I needed, unrelated to the segfault problem.  At first, I did not have access to any fonts.  Ironically, the reason that I underwent the nightmare of compiling gimp 2.10 from source, was that the gimp2.8 provided by package manager also did not have access to any fonts.  I despaired of diagnosing the problem and instead underwent the nightmare of compiling gimp 2.10 from source, which segfaulted upon startup, and then, after I worked around that problem, did not enable me to access any fonts.

I solved the font problem by renaming (removing execute permission did not, in this case, work) my local copy of the fontconfig library, which I had placed in /usr/local/lib/libfontconfig.so.1.  Once that file -- which was shadowing the native /usr/lib64/libfontconfig.so.1 -- was renamed, both the native gimp2.8 and my newly-built gimp2.10 were able to access fonts.  Of course, I would never have spent so much time getting the 2.10 build to work, if I had known that even after I built it, I still wouldn't be able to access any fonts.

It is curious that my local copy of libfontconfig had rendered all my fonts inaccessible, because I had not customized libfontconfig in any way. I obtained the fontconfig-2.13.92 tarball and built the library with "./configure" and "make", without any customizations (parenthetical question: why does "make install" create libfontconfig.so.1 when the version number in the tarball name is 2 and not 1?).  And yet, the moment I renamed it, and allowed both gimp2.8 and gimp2.10 to dynamically link with the version in /usr/lib64, all my fonts were back.

If there is a way to mark a thread as "solved", then you have my permission to mark this thread as solved; but I will not do so myself, because I do not consider that depriving myself of the pagecurl plugin can be properly called a solution, even though I do not know what I am missing.  There should be a way to build a pagecurl plugin that does not segfault upon startup.  The pagecurl plugin that is part of the native gimp2.8 does not segfault (although transplanting that plugin into gimp2.10 didn't work; the transplanted plugin segfaulted in the exact same way as the one that I had built as part of gimp2.10).
Did you try to reinstate "pagecurl" after reinstating the native fontconfig?