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 1451299

Summary: pygtk2: import crashes when Gtk3 is imported beforehand
Product: Red Hat Enterprise Linux 7 Reporter: Tomas Orsava <torsava>
Component: pygtk2Assignee: Matthew Barnes <mbarnes>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-28 08:44:38 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:    
Bug Blocks: 1115589    

Description Tomas Orsava 2017-05-16 11:01:12 UTC
Description of problem:
Python crashes with a segmentation fault when importing Gtk2 when Gtk3 has already been imported.
Specifically, in BZ#1115589 a customer is complaining about a segmentation fault when running the following:


$ python -c 'from gi.repository import Gtk; from gtk import _gtk'

** (-c:32700): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-2FqQZPcFbX: Connection refused
/usr/lib64/python2.7/site-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: specified class size for type `PyGtkGenericCellRenderer' is smaller than the parent type's `GtkCellRenderer' class size
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed
  from gtk import _gtk
Segmentation fault


In order to close the customer ticket it would be best to sanitise this, perhaps by adding an assert statement to pygtk2 that tests for this eventuality.



Version-Release number of selected component (if applicable):
Reproduced now with:
pygtk2-2.24.0-9.el7.x86_64
python-gobject-base-3.22.0-1.el7.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. yum group install 'Server with GUI'
2. python -c 'from gi.repository import Gtk; from gtk import _gtk'

Actual results:
Segmentation fault

Expected results:
Without a segmentation fault

Additional info: