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 148126 - GKM crashes when right clicking in a keyring row.
GKM crashes when right clicking in a keyring row.
Status: RESOLVED FIXED
Product: gnome-keyring-manager
Classification: Deprecated
Component: general
CVS HEAD
Other Linux
: Normal major
: ---
Assigned To: Keyring manager maintainers
Keyring manager maintainers
: 153355 163711 166097 168111 168955 172208 300114 300249 300511 304606 305161 329175 346377 377360 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-07-21 21:11 UTC by Claudio Saavedra
Modified: 2006-11-20 11:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Backtrace of #148126 (2.04 KB, text/plain)
2004-07-22 18:21 UTC, Claudio Saavedra
  Details
Test case (2.14 KB, text/plain)
2004-07-26 19:07 UTC, Claudio Saavedra
  Details
Patch for fix against head (921 bytes, patch)
2004-10-07 13:48 UTC, Chris Kelso
none Details | Review
previous fix + utilize ui_manager (5.56 KB, patch)
2004-10-07 18:58 UTC, Chris Kelso
none Details | Review
more good stuff (9.98 KB, patch)
2004-10-07 20:03 UTC, Chris Kelso
none Details | Review

Description Claudio Saavedra 2004-07-21 21:11:31 UTC
steps to reproduce:

* Open GKM.
* Right click in a keyring row in the treeview. It's expected to show a
context-menu or to do nothing.
* The application crashes.

I'll check it out.
Comment 1 Caleb Groom 2004-07-22 02:22:25 UTC
I'm not able to duplicate the crash.  I've tried right clicking on every
treeview in the application, with and without row items.

I grabbed a fresh copy from HEAD to test with.
Comment 2 Claudio Saavedra 2004-07-22 18:21:12 UTC
Created attachment 29801 [details]
Backtrace of #148126
Comment 3 Caleb Groom 2004-07-23 04:46:42 UTC
Claudio,

Add some debugging code before line 1082 of
gnome-keyring-manager-keyring-manager.c to see if
manager->priv->keyring_context_menu is NULL or pointing somewhere it shouldn't.
 I would print out the memory address that keyring_context_menu pointed two when
it was first assigned (in gkm_keyring_manager_init, line 273).

From the backtrace it looks like the G_OBJECT () cast is making it crash.

If you need me to come up with some debugging code I can make a patch for you.
Comment 4 Claudio Saavedra 2004-07-26 19:05:51 UTC
After several tests, including printing debug info as Caleb pointed out, i think
this bug may be GType related, not GKM, as i am using HEAD version of GLib to
work on the code. 

As a last intent I tried adding:

g_return_if_fail (GTK_IS_MENU (manager->priv->keyring_context_menu));

in the beginning of the problematic function (see following attached patch) and
the crash happens in *that* line.
Comment 5 Claudio Saavedra 2004-07-26 19:07:48 UTC
Created attachment 29907 [details]
Test case
Comment 6 Chris Kelso 2004-10-07 13:48:27 UTC
Created attachment 32333 [details] [review]
Patch for fix against head

This may not be proper but it clears in valgrind.  Apparently we are using
gtk_ui_manager to create our drop down and context menus.  We then grab the
menu widget from it so we can do some dynamic changes to the context menu. 
Finally we decrement the reference to our pointer to gtk_ui_manager.  This
causes the menu widget reference to point to nada.  When we later try to access

the widget we segfault and the rest is history.
Comment 7 Chris Kelso 2004-10-07 18:58:52 UTC
Created attachment 32364 [details] [review]
previous fix + utilize ui_manager

This replaces manager->priv->keyring_context_menu with
manager->priv->ui_manager.  Changed the functions to reflect this.  unref
ui_manager in finalize.
Comment 8 Chris Kelso 2004-10-07 20:03:18 UTC
Created attachment 32366 [details] [review]
more good stuff

Same stuff to gkm-keyring-editor.c and added a Changelog entry.
Comment 9 Fernando Herrera 2004-11-28 22:44:22 UTC
Thank you very much for the work on this patch. It's now applied
Comment 10 Fernando Herrera 2004-11-28 22:46:45 UTC
*** Bug 153355 has been marked as a duplicate of this bug. ***
Comment 11 Elijah Newren 2005-02-03 03:53:04 UTC
*** Bug 166097 has been marked as a duplicate of this bug. ***
Comment 12 Christian Kellner 2005-02-10 07:44:11 UTC
*** Bug 163711 has been marked as a duplicate of this bug. ***
Comment 13 James Bowes 2005-03-26 01:00:05 UTC
*** Bug 168111 has been marked as a duplicate of this bug. ***
Comment 14 James Bowes 2005-03-26 01:00:31 UTC
*** Bug 168955 has been marked as a duplicate of this bug. ***
Comment 15 Elijah Newren 2005-03-31 14:18:38 UTC
*** Bug 172208 has been marked as a duplicate of this bug. ***
Comment 16 Elijah Newren 2005-04-10 20:33:39 UTC
*** Bug 300114 has been marked as a duplicate of this bug. ***
Comment 17 Elijah Newren 2005-04-11 21:16:19 UTC
*** Bug 300249 has been marked as a duplicate of this bug. ***
Comment 18 Elijah Newren 2005-04-13 17:44:01 UTC
*** Bug 300511 has been marked as a duplicate of this bug. ***
Comment 19 Elijah Newren 2005-05-19 01:46:27 UTC
*** Bug 304606 has been marked as a duplicate of this bug. ***
Comment 20 Elijah Newren 2005-05-29 04:39:42 UTC
*** Bug 305161 has been marked as a duplicate of this bug. ***
Comment 21 Karsten Bräckelmann 2006-01-30 13:13:33 UTC
*** Bug 329175 has been marked as a duplicate of this bug. ***
Comment 22 Karsten Bräckelmann 2006-07-04 00:37:56 UTC
*** Bug 346377 has been marked as a duplicate of this bug. ***
Comment 23 Emmanuele Bassi (:ebassi) 2006-11-20 11:29:19 UTC
*** Bug 377360 has been marked as a duplicate of this bug. ***