GNOME Bugzilla – Bug 133480
segfault on exit
Last modified: 2004-02-05 13:26:28 UTC
Probably there's something wrong with the libraries. But anyway. Freshly compiled gimp-2.0pre3. When I start it on one of the xcf images from previous gimp version I get the following lines. ===================================== This is a development version of The GIMP. Debug messages may appear here. gimp_composite: use=yes, verbose=no +mmx +sse -sse2 -3dnow -altivec -vis Fontconfig warning: line 247: invalid edit binding "same" Fontconfig warning: line 259: invalid edit binding "same" (gimp-1.3:28399): Gimp-Config-CRITICAL **: file gimpconfigwriter.c: line 96 (gimp_config_writer_new_file): assertion `error == NULL || *error == NULL' failed GIMP: Could not open '/home/andrei/.gimp-1.3/pluginrc' for reading: No such file or directory ===================================== After that I close the image window and then close main gimp window. At this point I get ============================================================== gimp-1.3: fatal error: Segmentation fault gimp-1.3 (pid:28399): [E]xit, [H]alt, show [S]tack trace or [P]roceed: S
+ Trace 43831
Andrei
Did you upgrade from a very old version? Have you tried removing ~/.gimp-1.3 and re-installing completely your home directory? If you have data in there, simply move the old .gimp-1.3 to another nae, and then copy in your data, patterns, brushes and scripts afterwards. Does this help? Cheers, Dave.
Also, please check your fontconfig installation - we require version 2.2 of fontconfig, the GIMP will not work with 2.1.x or 2.0.x, I believe. Cheers, Dave.
I've already tried to remove .gimp-1.3 directory. Didn't help. But I believe I've fixed the bug. At least it works for me now. The problem was in file app/plug-in/plug-ins.c. Here's the patch I've applied ============================================================== --- gimp-2.0pre3/app/plug-in/plug-ins.c 2004-02-03 22:53:09. 000000000 +0100 +++ gimp-2.0pre3-my/app/plug-in/plug-ins.c 2004-02-05 12:58:30. 000000000 +0100 @@ -130,7 +130,7 @@ (* status_callback) (_("Resource configuration"), gimp_filename_to_utf8 (filename), -1); - if (! plug_in_rc_parse (gimp, filename, &error)) + if (! plug_in_rc_parse (gimp, filename, &error) || error) { g_message (error->message); g_clear_error (&error); ============================================== Basically plug_in_rc_parse returns TRUE even when the pluginrc file does not exists. And with new installation this is normal. So the error is set, but not cleared because TRUE was returned. My fix clears the error and creates pluginrc.
what a coincidence I just found the same bug, with a different symptom. Marking this bug as a duplicate of mine, because I like my patch better :) Dave.
*** This bug has been marked as a duplicate of 133490 ***
The patch is wrong, or, it doesn't follow the way we do this usually. plug_in_rc_parse() is supposed to return FALSE and set GIMP_CONFIG_ERROR_ENOENT. The caller is supposed to clear the error and suppress the error message if the error code is ENOENT.
I agree, that the patch should be fixing return values from the function. I believe that proper fix would be to ignore the error returned (since abscence of pluginrc at that moment is not important) but still clear the allocated for error space. Oh well, I wanted quick fix to be able to start working. If you have already proper fix then mine is not needed :)