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 169160 - when pressing F1 a lot of yelp windows are spawn
when pressing F1 a lot of yelp windows are spawn
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: General
git master
Other Linux
: Normal blocker
: ---
Assigned To: Shaun McCance
Yelp maintainers
Depends on:
Blocks:
 
 
Reported: 2005-03-04 03:11 UTC by Diego González
Modified: 2005-04-27 19:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Diego González 2005-03-04 03:11:44 UTC
in the end if i don't kill yelp from the console, eventually yelp takes all the
memory available and the system starts to trash putting stuff into swap.
Comment 1 Shaun McCance 2005-03-04 06:24:15 UTC

*** This bug has been marked as a duplicate of 135201 ***
Comment 2 Diego González 2005-03-04 10:15:44 UTC
i don't really know if it is the same problem, the windows appear even if i only
hit F1 once.
Comment 3 Shaun McCance 2005-03-04 17:43:39 UTC
Oh, that is different then.  I was too trigger happy is marking duplicate.
Comment 4 Christian Persch 2005-03-04 20:35:36 UTC
Confirming. I've just had that happen to me.

I think I've tracked it down to there being on yelp in /usr/bin and another one
in /opt/gnome-2.10/bin, with the latter being first in $PATH. Starting
/opt/gnome-2.10/bin/yelp activates the bonobo service, which ends up being
/usr/bin/yelp.
Comment 5 Christian Persch 2005-03-05 13:52:47 UTC
Happens also with only one yelp installed  (in /opt/gnome-2.10).
Comment 6 Christian Persch 2005-03-05 15:11:05 UTC
I've tracked it down to the following change to yelp-main.c:

revision 1.37
date: 2005/02/23 19:07:05;  author: pborelli;  state: Exp;  lines: +5 -5
2005-02-23  Paolo Borelli  <pborelli@katamail.com>

        * src/yelp-main.c (main): do not leak display_name.

Diff:
-       bonobo_activation_set_activation_env_value
-               ("DISPLAY",
-                gdk_display_get_name (gdk_display_get_default ()) );
+       display_name = gdk_display_get_name (gdk_display_get_default ());
+       bonobo_activation_set_activation_env_value ("DISPLAY", display_name);
+       g_free (display_name);

However, gdk_display_get_name is CONST! The documentation says "a string
representing the display name. This string is owned by GDK and should not be
modified or freed."

May I revert this change in cvs?
Comment 7 Paolo Borelli 2005-03-05 18:39:47 UTC
crap. sorry about it.

Valgrind marked the string as "definately lost", so I fixed the leak without
thinking much. It may still be worth investigating why valgrind thinks the
string is leaked, maybe a gtk bug.
Comment 8 Christian Persch 2005-03-05 18:55:34 UTC
Probably because gtk never closes displays (bug 85715).
Comment 9 Paolo Borelli 2005-03-06 10:04:01 UTC
Ok, I now see what's going on:

the gedit code was originally cut and pasted from yelp, but was then modified to
use gdk_screen_make_display_name (gdk_screen_get_default ()) instead of
gdk_display_get_name (gdk_display_get_deafult ()).
So the leak fix in gedit was correct, while my yelp patch was totally bogus.

sorry again about all this mess.
Comment 10 Kjartan Maraas 2005-04-27 19:37:18 UTC
This was reverted. Marking fixed.