[sylpheed:34576] Re: Minimal working plug-in in FreePascal

Hiroyuki Yamamoto hiro-y at kcn.ne.jp
Mon May 16 10:55:59 JST 2011


Hello,

On Sun, 15 May 2011 19:51:10 +0400
Anton Shepelev <anton.txt at gmail.com> wrote:

> Hello all,
> 
> I  have tried to write a minimal working plugin for Sylpheed
> in FreePascal, using Hiroyuki Yamamoro's sample  "Test  Plu-
> gin" as reference, and have run into a strange proglem.
> 
> My  plugin  successfully loads, adds a menu item, intercepts
> plugin signals (syl_plugin_signal_connect)  and  application
> signals  (g_signal_connect),  but it seems somehow to damage
> the Gtk-2.0's window showing functions.
> 
> For example, a click on the
> 
>     Configuration -> Common preferences
> 
> causes Sylpheed to crash with the last message in the  debug
> window being:
> 
>     Creating common preferences window...
> 
> The  same  happens  when  trying to create a new window from
> within the plugin. The exception occurs during the  call  to
> the gtk_widget_show_all function.
> 
> Do  you have any ideas as to the way a plugin can indirectly
> cause a crash? Should anybody want to look into the problem,
> I will provide the sources and binaries of my test plugin.

There can be some cause for that.

1. memory corruption (double free etc.)
2. missing thread locking
   For example, glib callback function (timeout, watch, idle func)
   requires g_threads_enter/leave() locking.

-- 
Hiroyuki Yamamoto <hiro-y at kcn.ne.jp>


More information about the Sylpheed mailing list