Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2116555

Summary: running gsettings in autostart leads to "Object Meta.Background has been already deallocated" errors
Product: Red Hat Enterprise Linux 8 Reporter: Carlos Santos <casantos>
Component: gnome-shellAssignee: Florian Müllner <fmuellner>
Status: CLOSED ERRATA QA Contact: Michal Odehnal <modehnal>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.4CC: fmuellner, jadahl, jwright, midzik, modehnal, sbarcomb, tpopela
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gnome-shell-3.32.2-48.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-08 09:37:25 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:
Deadline: 2022-08-29   

Description Carlos Santos 2022-08-08 19:44:29 UTC
Description of problem:

gnome-shell shows an error like this if an autostart .desktop runs gsettings

    Object Meta.Background (0x55e9bb807190), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
get/set a certain value:

Version-Release number of selected component (if applicable):

gnome-shell-3.32.2-30.el8.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Create a "$HOME/.config/autostart/set-show-desktop-icons.desktop" file
   containing

   [Desktop Entry]
   Type=Application
   Name=Get show-desktop-icons value
   Exec=/usr/bin/gsettings set org.gnome.desktop.background show-desktop-icons true
   OnlyShowIn=GNOME;

2. Log in vi GDM

Actual results:

A error message like this is sent to the system journal:

    Aug  8 15:12:04 rhel-8-3 gnome-shell[16403]: GNOME Shell started at Mon Aug 08 2022 15:12:03 GMT-0300 (-03)
    Aug  8 15:12:05 rhel-8-3 journal[16403]: Object Meta.Background (0x55e9bb807190), has been already deallocated — impossible to access it. This might be caused by the    object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
    Aug  8 15:12:05 rhel-8-3 org.gnome.Shell.desktop[16403]: == Stack trace for context 0x55e9baa262c0 ==
    Aug  8 15:12:05 rhel-8-3 org.gnome.Shell.desktop[16403]: #0   55e9bad7e840 i   resource:///org/gnome/shell/ui/background.js:707 (7fc92cf09790 @ 22)
    Aug  8 15:12:05 rhel-8-3 org.gnome.Shell.desktop[16403]: #1   55e9bad7e7b8 i   resource:///org/gnome/shell/ui/tweener.js:106 (7fc92d2d2dc0 @ 37)
    Aug  8 15:12:05 rhel-8-3 org.gnome.Shell.desktop[16403]: #2   7ffe9369c910 b   resource:///org/gnome/gjs/modules/tweener/tweener.js:208 (7fc92d2da280 @ 54)
    Aug  8 15:12:05 rhel-8-3 org.gnome.Shell.desktop[16403]: #3   7ffe9369ca60 b   resource:///org/gnome/gjs/modules/tweener/tweener.js:342 (7fc92d2da310 @ 1742)
    Aug  8 15:12:05 rhel-8-3 org.gnome.Shell.desktop[16403]: #4   7ffe9369cb10 b   resource:///org/gnome/gjs/modules/tweener/tweener.js:355 (7fc92d2da3a0 @ 100)
    Aug  8 15:12:05 rhel-8-3 org.gnome.Shell.desktop[16403]: #5   55e9bad7e6b0 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:370 (7fc92d2da430 @ 10)
    Aug  8 15:12:05 rhel-8-3 org.gnome.Shell.desktop[16403]: #6   7ffe9369d740 I   resource:///org/gnome/gjs/modules/signals.js:142 (7fc92d2bedc0 @ 386)
    Aug  8 15:12:05 rhel-8-3 org.gnome.Shell.desktop[16403]: #7   55e9bad7e620 i   resource:///org/gnome/shell/ui/tweener.js:238 (7fc92d2d6820 @ 159)
    Aug  8 15:12:05 rhel-8-3 org.gnome.Shell.desktop[16403]: #8   55e9bad7e5a0 i   resource:///org/gnome/shell/ui/tweener.js:209 (7fc92d2d6700 @ 15)
    Aug  8 15:12:05 rhel-8-3 journal[16403]: g_object_run_dispose: assertion 'G_IS_OBJECT (object)' failed

Expected results:

No error

Additional info:

- It happens on RHEL 8.6 too (gnome-shell-3.32.2-44.el8.x86_64).

- It Does not happen on RHEL 9.

- The error can be avoided by running gsettings via dbus-launch, e.g.

   [Desktop Entry]
   Type=Application
   Name=Get show-desktop-icons value
   Exec=/usr/bin/dbus-launch /usr/bin/gsettings set org.gnome.desktop.background show-desktop-icons true
   Exec=/usr/bin/gsettings set org.gnome.desktop.background show-desktop-icons true
   OnlyShowIn=GNOME;

Comment 20 errata-xmlrpc 2022-11-08 09:37:25 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 (gnome-shell bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2022:7547