[Users] [Bug 3231] segfault on unload python
pf at pfortin.com
pf at pfortin.com
Wed Jul 23 23:36:37 CEST 2014
On Wed, 23 Jul 2014 22:52:01 +0200 Holger Berndt wrote:
>On Mi, 23.07.2014 16:42, Pierre Fortin wrote:
>
>>>unloading the plugin (who would ever want to do that, anyways? ;)
>>
>>It's been a while since I loaded Python... was really trying to see if
>>this was how the Help->Python API Doc was added to the Help menu and
>>stumbled upon this...
>>
>>Trying to find the instructions to do a better debug... (asked on IRC)
>>
>>Thanks for the response! Now to grok it... :)
>
>The example startup script also adds an interface to Claws-Mail on the
>session bus. So, any external program can trigger Claws Mail's menu
>items by calling this interface.
>
>If you don't want that, comment the last line in the startup script
>(dbus_interface = add_dbus_interface()) by preceding it with #. If my
>assumption is correct, your crash on plugin-unload should go away.
>
>The correct fix would be to unregister the D-Bus service again in the
>"shutdown" script, but I don't know enough Python D-Bus to do that.
Isolated it to the startup script just as your response came in...
commenting that line stops the crash.
Tried researching python-dbus stuff...
Added this to startup:
OUT = open("/tmp/CMdbus",'w')
OUT.write("dbus_interface=%s\n" % dbus_interface)
OUT.close()
Gives:
dbus_interface=<dbus.service.BusName org.ClawsMail.PythonPlugin on
<dbus._dbus.SessionBus (session) at 0x31f6e30> at 0x3250210>
but you knew that... :)
So, assuming startup ends, I'm still looking for how to pass the dbus
info to a shutdown script in a way to issue a close()...
BTW, any objections to adding this line to the examples as first line?:
# -*- Mode: python; -*-
It tells emacs to load python-mode since the files don't end in .py
>Holger
>_______________________________________________
>Users mailing list
>Users at lists.claws-mail.org
>http://lists.claws-mail.org/cgi-bin/mailman/listinfo/users
>
More information about the Users
mailing list