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 633883 - set_engine segfault trying to access client->engine with NULL client
set_engine segfault trying to access client->engine with NULL client
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: registry
1.32.x
Other Linux
: Normal normal
: ---
Assigned To: Li Yuan
At-spi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-11-03 08:23 UTC by Sandro Bonazzola
Modified: 2012-08-21 09:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix missing g_type_init (469 bytes, patch)
2010-11-03 08:23 UTC, Sandro Bonazzola
committed Details | Review

Description Sandro Bonazzola 2010-11-03 08:23:27 UTC
Created attachment 173754 [details] [review]
Fix missing g_type_init

The bug was found using at-spi on Fedora 13 and 14 and reported here: https://bugzilla.redhat.com/show_bug.cgi?id=603376.
It is present in at-spi 1.30.1, 1.31.1, 1.32.0.

If the system is configured without a default client, at-spy-registryd segfault instead of exiting cleanly because g_type_init was not called before the calls to gconf_client_get_default:

  • #0 set_engine
    at gconf-client.c line 268
  • #0 set_engine
    at gconf-client.c line 268
  • #1 gconf_client_get_default
    at gconf-client.c line 447
  • #2 main
    at registry-main.c line 201


#  /usr/libexec/at-spi-registryd

(process:3583): GLib-GObject-CRITICAL **: gtype.c:2710: You forgot to call
g_type_init()

(process:3583): GLib-GObject-CRITICAL **: g_object_new: assertion
`G_TYPE_IS_OBJECT (object_type)' failed

(process:3583): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT
(object)' failed
Segmentation fault (core dumped)


Just calling g_type_init before calling gconf_client_get_default fixes the issue.
Here is the patch already submitted to Fedora bugzilla.
Comment 1 Sandro Bonazzola 2010-11-24 09:29:02 UTC
Any other info needed?
Comment 2 Li Yuan 2010-11-24 13:06:51 UTC
Review of attachment 173754 [details] [review]:

Thanks for the patch.
Comment 3 Matthias Clasen 2011-02-19 14:15:41 UTC
need_to_quit now does a g_type_init (even though that seems silly, you can just move the g_type_init() call in main up two lines...)
Comment 4 Mardy 2011-10-06 05:06:14 UTC
I cannot see any g_type_init() in registry-main.c, and the bug is still there (at least in Ubuntu).
Am I looking at the wrong repository?

http://git.gnome.org/browse/at-spi/tree/registryd/registry-main.c
Comment 5 Mardy 2011-10-06 05:22:58 UTC
OK, I see that there are two repositories, at-spi (which still has the bug) and at-spi2-core (which is fixed).

Can we please reopen this bug for at-spi?
Comment 6 Tobias Mueller 2011-10-22 15:39:13 UTC
reopening
Comment 7 André Klapper 2012-02-26 10:44:54 UTC
[Resetting QA Contact to newly introduced "at-spi-maint@gnome.bugs". 
Reason: So far it was impossible to watch changes in at-spi bug reports without following all the specific persons (Li Yuan, Bill Haneman, Jeff Wai, ...) and also their activity outside of at-spi reports.

IMPORTANT: Anyone interested in following all bug activity (including all maintainers) must watch the "at-spi-maint@gnome.bugs" dummy user by adding it to the 'Users to watch' list under Preferences->Email preferences. This is also the default procedure nowadays in GNOME when setting up new products.]
Comment 8 André Klapper 2012-08-20 15:18:08 UTC
The patch has the status "accepted commit now" for ages now.
Could an at-spi maintainer take a look and update its status?
Comment 9 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-08-20 16:03:40 UTC
(In reply to comment #8)
> The patch has the status "accepted commit now" for ages now.
> Could an at-spi maintainer take a look and update its status?

All three people included as maintainers on at-spi.doap have been working lately on other stuff. Something that makes sense because after all at-spi is dead. It still depends on bonobo. Two years since last release. We already have at-spi2 in production. Not sure if this dead is official or not, but if not I think that it is a good moment to think on that.

Having said so, that patch has a accept-commit-now flag. Code hasn't changed a lot since then. I have just applied it and at-spi compiles without problem. My vote is just apply that patch and close the bug. Mardy, do you have commit access to gnome? If not I can do that commit.
Comment 10 Mardy 2012-08-21 05:34:10 UTC
Nope, Alejandro, I don't have commit access. Please go ahead.

Thanks!
Comment 11 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-08-21 09:11:36 UTC
Patch comitted. Closing bug.