Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#1448 closed defect (fixed)

Padre::Plugin::My Right-clicking in Editor window crashes Padre (instead of showing context menu)

Reported by: Manfred Jebram Owned by:
Priority: major Milestone:
Component: plugins Version: 0.96
Keywords: Cc:

Description

When I press the second mouse button in a Padre editor window/pane,
Padre crashes (With an error message complaining about
event_on_context_menu not found). I can reproduce this under
Linux (with perl 5.16.0) and MS Windows (Older Strawberry perl 5.10.0,
the old "Almost Six" release with updated Padre).


Padre version info:
                   Padre 0.96
Core...
                  osname linux
                archname i486-linux-gnu-thread-multi
            Distribution Ubuntu 9.10 
                  Kernel 2.6.22.18-co-0.7.4
                    Perl 5.16.0
                 Threads 10
                     RAM 252.3MB
Wx...
                      Wx 0.9908
               WxWidgets 2.8.10
                 unicode 1
        Alien::wxWidgets 0.59
 Wx::Perl::ProcessStream 0.32
           Wx::Scintilla 0.3801
Other...
                     PPI 1.215
           Debug::Client 0.20
                  Config /home/mj/.local/share/.padre

Same for Strawberry/Windows?:

                   Padre 0.96
Core...
                  osname MSWin32
                archname MSWin32-x86-multi-thread
                    Perl 5.10.0
                 Threads 9
                     RAM 167.2MB
Wx...
                      Wx 0.9909
               WxWidgets 2.8.10
                 unicode 1
        Alien::wxWidgets 0.51
 Wx::Perl::ProcessStream 0.29
           Wx::Scintilla 0.3801
Other...
                     PPI 1.213
           Debug::Client 0.20
                  Config D:\Documents and Settings\Manfred Jebram\Local Settings\Application Data\Perl\Padre

The crash(es) happen in Padre::PluginManager::on_context_menu

sub on_context_menu {
	my $self = shift;

	foreach my $handle ( $self->handles ) {
		next unless $handle->can_context;
		foreach my $handle ( $self->handles ) {
			$handle->plugin->event_on_context_menu(@_);
		}
	}

	return ();
}

(The inner loop looks unneeded to me, expect for the
"event_on_context_menu" invocation. But perhaps I don't understand.)
bowtie has suggested this might be an issue with
outdated Padre::Plugin::* -Modules.
I have unchanged copies of:
Padre::Plugin::My 0.96
Popularity Contest 0.96
Padre::Plugin::Git 0.03
Padre Devolper Tools 0.96 (?)
Under Strawberry, I also have Padre::Plugin::PerlCritic? 0.12 installed.

Also see: http://paste.scsys.co.uk/205431

Change History (5)

comment:1 Changed 2 years ago by bowtie

update p-p-My to api v2 (BOWTIE)
Checkin created revision 19187

see -> http://padre.perlide.org/trac/browser/trunk/Padre/lib/Padre/Plugin/My.pm

please test with above code

Version 0, edited 2 years ago by bowtie (next)

comment:2 Changed 2 years ago by Manfred Jebram

Dear bowtie;

I have replaced my copy of /opt/perl5_16_0/lib/site_perl/5.16.0/Padre/Plugin/My.pm

with the trunk version You provided. (And I undid my changes in PluginManager?.pm).

The right mouse button press in Padre editor window does work now (without crashes),

as long as I only enable Padre::Plugin::My or no Plugin!


However, I still get crashes as soon as I enable Padre::Plugin::Git 0.03.

(Time to close this ticket and open a new one for the Git Plugin?)

comment:3 Changed 2 years ago by bowtie

thanks

Manfred Jebram

comment:4 Changed 2 years ago by bowtie

  • Resolution set to fixed
  • Status changed from new to closed

comment:5 Changed 2 years ago by bowtie

  • Summary changed from Right-clicking in Editor window crashes Padre (instead of showing context menu) to Padre::Plugin::My Right-clicking in Editor window crashes Padre (instead of showing context menu)
Note: See TracTickets for help on using tickets.