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 133480 - segfault on exit
segfault on exit
Status: RESOLVED DUPLICATE of bug 133490
Product: GIMP
Classification: Other
Component: General
1.x
Other Linux
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2004-02-05 10:16 UTC by andrei.voropaev
Modified: 2004-02-05 13:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description andrei.voropaev 2004-02-05 10:16:38 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
  • #0 g_on_error_stack_trace
  • #1 g_on_error_query
  • #2 gimp_eek
  • #3 gimp_fatal_error
  • #4 gimp_sigfatal_handler
    at main.c line 602
  • #5 <signal handler called>
  • #6 FcEditDestroy
    from /usr/X11R6/lib/libfontconfig.so.1
  • #7 FcSubstDestroy
    from /usr/X11R6/lib/libfontconfig.so.1
  • #8 FcConfigDestroy
    from /usr/X11R6/lib/libfontconfig.so.1
  • #9 FcConfigSetCurrent
    from /usr/X11R6/lib/libfontconfig.
  • #10 gimp_fonts_reset
    at gimp-fonts.c line 125
  • #11 gimp_real_exit
    at gimp.c line 701
  • #12 gimp_marshal_BOOLEAN__BOOLEAN
  • #13 g_type_class_meta_marshal
  • #14 g_closure_invoke
  • #15 signal_emit_unlocked_R
  • #16 g_signal_emit_valist
  • #17 g_signal_emit
  • #18 gimp_exit
    at gimp.c line 937
  • #19 gimp_toolbox_delete_event
  • #20 _gtk_marshal_BOOLEAN__BOXED
  • #21 g_type_class_meta_marshal
  • #22 g_closure_invoke
  • #23 signal_emit_unlocked_R
  • #24 g_signal_emit_valist
  • #25 g_signal_emit
  • #26 gtk_widget_event_internal
  • #27 gtk_widget_event
  • #28 gtk_main_do_event
    at gtkmain.c line 1438
  • #29 gdk_event_dispatch
  • #30 g_main_dispatch
    at gmain.c line 1751
  • #31 g_main_context_dispatch
  • #32 g_main_context_iterate
  • #33 g_main_loop_run
    at gmain.c line 2600
  • #34 gtk_main
    at gtkmain.c line 1093
  • #35 app_run
  • #36 main
    at main.c line 470
  • #37 __libc_start_main
Andrei
Comment 1 Dave Neary 2004-02-05 10:35:24 UTC
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.
Comment 2 Dave Neary 2004-02-05 11:35:39 UTC
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.
Comment 3 andrei.voropaev 2004-02-05 12:04:18 UTC
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.
Comment 4 Dave Neary 2004-02-05 12:14:12 UTC
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.
Comment 5 Dave Neary 2004-02-05 12:14:56 UTC

*** This bug has been marked as a duplicate of 133490 ***
Comment 6 Sven Neumann 2004-02-05 12:38:28 UTC
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.
Comment 7 andrei.voropaev 2004-02-05 13:26:28 UTC
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 :)