After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784698 - Trying to send a GNotification crashes
Trying to send a GNotification crashes
Status: RESOLVED DUPLICATE of bug 776583
Product: pygobject
Classification: Bindings
Component: gio
3.24.x
Other Windows
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-08 16:14 UTC by lovetox
Modified: 2017-09-05 14:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description lovetox 2017-07-08 16:14:26 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)
Comment 1 Christoph Reiter (lazka) 2017-07-09 08:19:07 UTC
Thanks, reproduced.

I haven't looked, but my guess would be that GioNotification isn't implemented on Windows. It shouldn't crash though.
Comment 2 Daniel Boles 2017-09-05 14:20:29 UTC

*** This bug has been marked as a duplicate of bug 776583 ***