Bug 1168600

Summary: [glib 2.40 regression] Attempt to add property xxx after class was initialised
Product: Red Hat Enterprise Linux 7 Reporter: Milan Crha <mcrha>
Component: glib2Assignee: Colin Walters <walters>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: ayadav, tpelka, vbenes, yacao
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The version of glib2 in 7.1 emitted warning messages when programs added GObject properties after the class was initialized. Consequence: A warning message appeared, but the program continued to function. Fix: This functionality was un-deprecated due to backwards compatibility concerns. Result: No error messages about properties appear.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 08:15:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1104372    
Bug Blocks:    

Description Milan Crha 2014-11-27 11:29:46 UTC
I've installed glib2-2.40.0-4.el7.x86_64 and when I run evolution I see quite many runtime warnings similar (different property names) as this one:

> (evolution:7520): GLib-GObject-WARNING **: Attempt to add property
> EShellSettings::start-offline after class was initialised

It comes from here:
#0  0x00007fffecbd0830 in g_logv () from /lib64/libglib-2.0.so.0
#1  0x00007fffecbd0c7f in g_log () from /lib64/libglib-2.0.so.0
#2  0x00007fffecec91bf in g_object_class_install_property () from /lib64/libgobject-2.0.so.0
#3  0x00007ffff7bba265 in e_shell_settings_install_property (pspec=0x83ac60) at e-shell-settings.c:371
#4  0x00007ffff7bba445 in e_shell_settings_install_property_for_key (property_name=0x7ffff7bcc94e "start-offline", schema=0x7ffff7bcc95c "org.gnome.evolution.shell", key=0x7ffff7bcc94e "start-offline")
    at e-shell-settings.c:427
#5  0x00007ffff7baf288 in e_shell_init (shell=0x824190) at e-shell.c:1278
#6  0x00007fffecee43cb in g_type_create_instance () from /lib64/libgobject-2.0.so.0
#7  0x00007fffecec8335 in g_object_new_internal () from /lib64/libgobject-2.0.so.0
#8  0x00007fffececa554 in g_object_new_valist () from /lib64/libgobject-2.0.so.0
#9  0x00007fffed15efc9 in g_initable_new_valist () from /lib64/libgio-2.0.so.0
#10 0x00007fffed15f0c9 in g_initable_new () from /lib64/libgio-2.0.so.0
#11 0x00000000004039dd in create_default_shell () at main.c:403
#12 0x0000000000403d2d in main (argc=1, argv=0x7fffffffde78) at main.c:651

Evolution 3.8.5 uses an EShellSettings object into which it adds properties when needed. The documentation for g_object_class_install_property () says:
> Installs a new property. This is usually done in the class initializer.
It doesn't says its forbidden to install a new property out of a class_init(), thus either the warning is just to confuse people (users will see it), or the documentation is outdated, but I do not know how to change evolution easily to adapt to such drastic change in RHEL7.

Looking into the glib sources the warning is only informative, the function does its job anyway, thus I'd say it's a regression in RHEL7 and should be avoided.

Comment 2 Colin Walters 2014-12-01 18:51:02 UTC
Agreed, let's remove the warning.  It's similar to https://bugzilla.redhat.com/show_bug.cgi?id=1104372#c11

Comment 4 Colin Walters 2015-06-29 22:10:13 UTC
This will be addressed with 2.42. https://bugzilla.gnome.org/show_bug.cgi?id=698614

Comment 7 errata-xmlrpc 2015-11-19 08:15:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2116.html

Comment 8 Richard W.M. Jones 2015-11-24 10:59:53 UTC
*** Bug 1155913 has been marked as a duplicate of this bug. ***