GNOME Bugzilla – Bug 784698
Trying to send a GNotification crashes
Last modified: 2017-09-05 14:20:29 UTC
This minimal example crashs on windows import sys import gi gi.require_version('Gtk', '3.0') from gi.repository import Gio from gi.repository import Gtk class App(Gtk.Application): def __init__(self): Gtk.Application.__init__(self, application_id="org.gnome.example", flags=Gio.ApplicationFlags.FLAGS_NONE) def do_activate(self): window = Gtk.ApplicationWindow(application=self) grid = Gtk.Grid() button = Gtk.Button('Notify') button.connect('clicked', self.on_button_clicked) grid.add(button) window.add(grid) window.show_all() def on_button_clicked(self, *args): notif = Gio.Notification.new('TESTMESSAGE') notif.set_body('TEST') self.send_notification('new_message', notif) if __name__ == '__main__': app = App() app.run(sys.argv) apptest2.py:27: Warning: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed self.send_notification('new_message', notif)
Thanks, reproduced. I haven't looked, but my guess would be that GioNotification isn't implemented on Windows. It shouldn't crash though.
*** This bug has been marked as a duplicate of bug 776583 ***