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 460781 - EoG doesn't quit when using python plugins
EoG doesn't quit when using python plugins
Status: RESOLVED OBSOLETE
Product: eog-plugins
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks: 462338
 
 
Reported: 2007-07-27 00:21 UTC by Diego Escalante Urrelo (not reading bugmail)
Modified: 2019-02-22 03:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
python plugin, adapted from epiphany and gedit. (20.00 KB, application/x-tar)
2007-07-27 00:23 UTC, Diego Escalante Urrelo (not reading bugmail)
Details

Description Diego Escalante Urrelo (not reading bugmail) 2007-07-27 00:21:03 UTC
I'm attaching my adaptation of the python console plugin, when active, eog doesn't quit.
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2007-07-27 00:23:06 UTC
Created attachment 92509 [details]
python plugin, adapted from epiphany and gedit.

When this is in use, eog doesn't quit.
Comment 2 Felix Riemann 2007-08-01 14:02:11 UTC
Confirming.

This seems to be a ref counting problem. Enabling the plugin refs EOG's main window (don't know where that comes from) which keeps the finalizer from running. Because of that we are not leaving the main loop. 
Comment 3 Felix Riemann 2007-08-01 14:03:01 UTC
s/where that comes from/where that happens
Comment 4 Felix Riemann 2007-09-23 23:35:28 UTC
Okay, I think the general problem is that as long as an object in the python space has a reference to the window the refcount is +1 preventing the window's finalizer to run (and thus keeping eog running).

The window reference that is passed to PythonConsole's constructor is enough already to produce this (the next one being the reference set in the action (if it is passed to the uimanager).

So, I guess practically we have to make eog leave the mainloop (to reach the plugin cleanup) while the window is not destroyed (is this actually possible?) or at least make sure the plugin engine is shut down once we close the last window.
Comment 5 Felix Riemann 2008-08-19 12:01:28 UTC
Looks like we have a "plugins" component now. :-)
Switching to it.
Comment 6 Felix Riemann 2011-04-14 19:12:31 UTC
This should work better with GNOME 3.0 and the libpeas-based API now.

One still has to be awesomely careful not to catch an unwanted reference to the EogWindow but it's not that easy anymore.