Opened 3 years ago

Closed 3 years ago

#1273 closed defect (fixed)

Padre::Plugin::Swarm patch for reloading

Reported by: bowtie Owned by: submersible_toaster
Priority: minor Milestone:
Component: plugins Version: 0.87
Keywords: Cc:

Description

Hope this helps,

  • lib/Padre/Plugin/Swarm.pm

     
    290290        $self->wx(undef); 
    291291 
    292292        undef $instance; 
     293         
     294        $self->unload('Padre::Plugin::Swarm::Wx::Chat'); 
     295        $self->unload('Padre::Plugin::Swarm::Wx::Resources'); 
     296        $self->unload('Padre::Plugin::Swarm::Wx::Editor'); 
     297        $self->unload('Padre::Plugin::Swarm::Wx::Preferences'); 
     298        $self->unload('Padre::Plugin::Swarm::Transport::Global::WxSocket'); 
     299        $self->unload('Padre::Plugin::Swarm::Transport::Local::Multicast'); 
     300        $self->unload('Padre::Plugin::Swarm::Universe'); 
     301        $self->unload('Padre::Plugin::Swarm::Geometry'); 
    293302 
    294303 
    295304    } 
  • lib/Padre/Plugin/Swarm/Transport.pm

     
    1717    my %args = @_; 
    1818    $args{marshal} ||= $class->_marshal; 
    1919    my $self = bless \%args, $class; 
    20     my $message_event  = Wx::NewEventType; 
     20    my $message_event  = Wx::NewEventType(); 
    2121    $self->{message_event} = $message_event; 
    2222    return $self; 
    2323} 

Change History (3)

comment:1 Changed 3 years ago by bowtie

I have added some more thing to delete,

$self->unload('Padre::Plugin::Swarm::Wx::Chat');
$self->unload('Padre::Plugin::Swarm::Wx::Resources::TreeCtrl');
$self->unload('Padre::Plugin::Swarm::Wx::Resources');
$self->unload('Padre::Plugin::Swarm::Wx::Editor');
$self->unload('Padre::Plugin::Swarm::Wx::Preferences');
$self->unload('Padre::Plugin::Swarm::Transport::Global::WxSocket');
$self->unload('Padre::Plugin::Swarm::Transport::Local::Multicast::Service');
$self->unload('Padre::Plugin::Swarm::Transport::Local::Multicast');
$self->unload('Padre::Plugin::Swarm::Transport');
$self->unload('Padre::Plugin::Swarm::Universe');
$self->unload('Padre::Plugin::Swarm::Geometry');

comment:2 Changed 3 years ago by submersible_toaster

Thanks - there are bigger issues with unloading and reloading this plugin. In some situations on linux this will segfault . possibly because the background task from the previous incarnation has not been properly cleaned up and still trying to send events to a defunct WX obj. , I really don't know.

comment:3 Changed 3 years ago by bowtie

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

P-P-Swarm now supports Plug-in re-loading

Note: See TracTickets for help on using tickets.