GtkClutter.init() and GlutterGst.init() cause segmentation fault if autostarted
Hi!
My environment: Fedora 32 (GNOME 3.36.2)
❯ rpm -qa | grep gobject
pygobject2-2.28.7-7.fc32.x86_64
libvirt-gobject-3.0.0-2.fc32.x86_64
gobject-introspection-devel-1.64.1-1.fc32.x86_64
gobject-introspection-1.64.1-1.fc32.x86_64
cairo-gobject-1.16.0-8.fc32.i686
python3-gobject-3.36.0-2.fc32.x86_64
cairo-gobject-1.16.0-8.fc32.x86_64
cairo-gobject-devel-1.16.0-8.fc32.x86_64
python3-gobject-base-3.36.0-2.fc32.x86_64
❯ pip3 list | grep PyGObject
PyGObject 3.36.0
As the title says, I'm running into this weird problem. It is 100% reproducible with the following script. Please help.
The script to reproduce the issue:
#!/bin/python
import gi
gi.require_version("Gtk", "3.0")
gi.require_version('GtkClutter', '1.0')
gi.require_version('ClutterGst', '3.0')
from gi.repository import Gtk, GtkClutter, ClutterGst
class MyWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="Demo")
GtkClutter.init()
ClutterGst.init()
win = MyWindow()
win.connect("destroy", Gtk.main_quit)
win.show_all()
Gtk.main()
A blank window should appear if the script is executed under normal circumstances. No problem here. However, if I try to autostart this script on GNOME using a .desktop
file, it causes a segmentation fault.
The .desktop
file:
[Desktop Entry]
Type=Application
Name=Test
Exec=test.py
StartupNotify=false
Terminal=false
Icon=
Categories=System;Monitor;
Logs: core_backtrace
Edited by Jeff Shee