Application Crashed When "require/use Gtk2" in A Perl Plugin of Pidgin

View: New views
4 Messages — Rating Filter:   Alert me  

Application Crashed When "require/use Gtk2" in A Perl Plugin of Pidgin

by Leno Lin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm developing a Perl plugin for Pidgin, which uses embedding Perl as an plugin interpretor.
For now, my plugin keep crashing Pidgin(more precisely, crashing Perl) when I try to "require/use Gtk2" module.
I tracebacked to the source and found that it crashed in the function "void Perl_push_scope(pTHX)" in scope.c.
Since I have no idea how to debug perl and perl-gtk2 in the dynamic library, it would be great if somebody could help me out.
Thx in advance.

I'm using Perl-GTK2 1.221, Perl 5.10.0, and Pidgin 2.6.2.

Chih-Chun Lin

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@...
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

Re: Application Crashed When "require/use Gtk2" in A Perl Plugin of Pidgin

by Emmanuel Rodriguez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Sun, Oct 4, 2009 at 8:34 PM, Leno Lin <leno.lin@...> wrote:
Hi,

I'm developing a Perl plugin for Pidgin, which uses embedding Perl as an plugin interpretor.  
For now, my plugin keep crashing Pidgin(more precisely, crashing Perl) when I try to "require/use Gtk2" module.
Did you follow the instructions here: http://developer.pidgin.im/doxygen/dev/html/perl-howto.html ?
It is mentioned there that Gtk2 can be loaded but it has to be done with "require Gtk2;".

I tried a long time ago to write a Gaim plugin in Perl and I had to revert to C as the language for the plugin. From what I remember writing a Perl plugin was quite easy but the Perl API didn't had access to all the Gaim/Pidgin API (that's why I had to use C).


--
Emmanuel Rodriguez

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@...
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

Re: Application Crashed When "require/use Gtk2" in A Perl Plugin of Pidgin

by Leno Lin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, Emmanuel:

Yeah, I've read this article before and imported Gtk2 by using "require Gtk2".
My script used to worked fine in Pidgin 2.5.x, but keep crashing Pidgin after upgrading to 2.6.x. either "require" or "use"
And yes, I think the support to Perl API is indeed weaker than native C API.
For example, I originally wanted to call some of my callback functions through the conversation menu items, but since Perl API hasn't support it yet, I had to move this to slash command.
However, using Perl still takes advantage of easy installation and at least supports the basic functions that I need.
That's the reason I still stick on Perl.
Anyway, thanks to your kindly reminder.

Chih-Chun Lin

On Mon, Oct 5, 2009 at 3:55 AM, Emmanuel Rodriguez <emmanuel.rodriguez@...> wrote:


On Sun, Oct 4, 2009 at 8:34 PM, Leno Lin <leno.lin@...> wrote:
Hi,

I'm developing a Perl plugin for Pidgin, which uses embedding Perl as an plugin interpretor.  
For now, my plugin keep crashing Pidgin(more precisely, crashing Perl) when I try to "require/use Gtk2" module.
Did you follow the instructions here: http://developer.pidgin.im/doxygen/dev/html/perl-howto.html ?
It is mentioned there that Gtk2 can be loaded but it has to be done with "require Gtk2;".

I tried a long time ago to write a Gaim plugin in Perl and I had to revert to C as the language for the plugin. From what I remember writing a Perl plugin was quite easy but the Perl API didn't had access to all the Gaim/Pidgin API (that's why I had to use C).


--
Emmanuel Rodriguez


_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@...
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

Re: Application Crashed When "require/use Gtk2" in A Perl Plugin of Pidgin

by Emmanuel Rodriguez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Oct 5, 2009 at 2:39 AM, Leno Lin <leno.lin@...> wrote:
Hi, Emmanuel:

Yeah, I've read this article before and imported Gtk2 by using "require Gtk2".
My script used to worked fine in Pidgin 2.5.x, but keep crashing Pidgin after upgrading to 2.6.x. either "require" or "use"
And yes, I think the support to Perl API is indeed weaker than native C API.
Sad :(
I have a feeling that the Perl bindings for Pidgin are not supported.
 
For example, I originally wanted to call some of my callback functions through the conversation menu items, but since Perl API hasn't support it yet, I had to move this to slash command.
However, using Perl still takes advantage of easy installation and at least supports the basic functions that I need.
That's the reason I still stick on Perl.
You can still try to write a Perl script that would use Pidgin's D-Bus API. It exposes a lot of functions, but not all. Take a look at the scripts that I have here:

http://bratislava.pm.org/presentation/dbus/index.html

The script dbus-pidgin.pl should help you getting started.

--
Emmanuel Rodriguez

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@...
http://mail.gnome.org/mailman/listinfo/gtk-perl-list