Skip Menu |
 

This queue is for tickets about the Tickit CPAN distribution.

Report information
The Basics
Id: 122216
Status: new
Priority: 0/
Queue: Tickit

People
Owner: Nobody in particular
Requestors: TEAM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.63
Fixed in: (no value)



Subject: Expose events can be called on windows that have already gone out of scope
Download (untitled) / with headers
text/plain 827b
I think this one needs a proper test case to confirm the behaviour I'm seeing, but: $event_ids->{expose} = $window->bind_event( expose => sub { my ( $win, undef, $info ) = @_; $win->is_visible or return; $info->rb->setpen( $self->{pen} ); $self->render_to_rb( $info->rb, $info->rect ); }); That $win->is_visible check can fail with this: Error: Can't call method "is_visible" on an undefined value at .../Tickit/Widget.pm line 526. which I think was triggered by this: my $win = ...temporary window with refcount 1...; $tickit->later(sub { $win->expose }); # immediately after the ->expose call, $win goes out of scope so the window refcount drops to zero Changing that line to check for '$win && $win->is_visible' instead seems to be enough to fix it.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.