When the window is opened again the app crashes with the error Gtk-CRITICAL **: gtk_widget_get_window: assertion 'GTK_IS_WIDGET (widget)' failed?

Hello!
Write a simple application on python3 + gtk3 that connects to dbus and listens to the add event notifications (notify-send). When the user clicks on the application icon in the system tray, a window appears with a list of all notifications since launch. Code (don't know where exactly the problem + code more than 100 lines): https://github.com/rakshazi/notify-feed/blob/maste...

The problem is reproduced like this:
1. python main.py (line 117)
2. Click on the tray icon - window is opened, it can be empty or can contain notifications that have been sent after the application starts (line 83)
3. Close the window (line 93)
4. Repeat step 2 (the window is empty, even if there was data. Yes, this is a bug, but now it is not important)
5. Click on body of window, then the app will fall with an error:
(gui.py:4882): Gtk-CRITICAL **: gtk_widget_get_window: assertion 'GTK_IS_WIDGET (widget)' failed
[1] 4882 segmentation fault (core dumped) python gui.py


gdb:
(main.py:17310): Gtk-CRITICAL **: gtk_widget_get_window: assertion 'GTK_IS_WIDGET (widget)' failed

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007fffea5cd0b8 in gtk_widget_translate_coordinates () from /usr/lib/libgtk-3.so.0


At the same time, when you first open the window and opening it again the self object.window the same:
<__main__.Window object at 0x7f98b1dcd7e0 (__main__+Window at 0x1502260)>


Please tell me how to debug and fix this problem?

pS: I'm new to python, so might be a stupid question, but Google results are not Yes
July 2nd 19 at 15:09
0 answer

Find more questions by tags PythonGTK+* nix-like systems