I'm running the old examples/023_cjkfonts against PDF::API2 2.032 (just released), on Win7. Every single page gets a message "Reference is already weak at ...PDF/API2.pm line 1110." Line 1110 is
weaken $self->{'pagestack'}->[0];
in sub page(). My wild guess would be that the array reference $self->{'pagestack'} only needs to be weakened once, and not every time a new page is pushed on it. Does that sound reasonable? Is the ->[0] making it apply only to the page just pushed, or is it something else? Commenting out this line makes the program run without these warnings, but I don't know if this is a safe fix or if there are other interactions to be aware of.
I don't think I have seen this warning message anywhere else, either t tests or other examples, so it may have something to do with the specified CJK fonts themselves, or their supporting Perl files.
#
Wed Jul 05 23:29:31 2017 steve [...] deefs.net - Correspondence added
Thanks for the bug report. That 0 should be a -1.
I've patched it and added a test.
#
Wed Jul 05 23:29:32 2017 The RT System itself - Status changed from 'new' to 'open'
#
Wed Jul 05 23:29:37 2017 steve [...] deefs.net - Status changed from 'open' to 'patched'
#
Fri Jul 07 11:03:30 2017 steve [...] deefs.net - Status changed from 'patched' to 'resolved'
#
Fri Jul 07 11:03:30 2017 steve [...] deefs.net - Fixed in 2.033 added
Wed Jul 05 21:17:33 2017 philperry [...] hvc.rr.com - Ticket created Subject: Reference is already weak Date: Wed, 5 Jul 2017 21:17:21 -0400
I'm running the old examples/023_cjkfonts against PDF::API2 2.032 (just released), on Win7. Every single page gets a message "Reference is already weak at ...PDF/API2.pm line 1110." Line 1110 is
weaken $self->{'pagestack'}->[0];
in
sub page()
. My wild guess would be that the array reference $self->{'pagestack'} only needs to be weakened once, and not every time a new page is pushed on it. Does that sound reasonable? Is the->[0]
making it apply only to the page just pushed, or is it something else? Commenting out this line makes the program run without these warnings, but I don't know if this is a safe fix or if there are other interactions to be aware of.I don't think I have seen this warning message anywhere else, either t tests or other examples, so it may have something to do with the specified CJK fonts themselves, or their supporting Perl files. # Wed Jul 05 23:29:31 2017 steve [...] deefs.net - Correspondence added
Thanks for the bug report. That 0 should be a -1.
I've patched it and added a test. # Wed Jul 05 23:29:32 2017 The RT System itself - Status changed from 'new' to 'open' # Wed Jul 05 23:29:37 2017 steve [...] deefs.net - Status changed from 'open' to 'patched' # Fri Jul 07 11:03:30 2017 steve [...] deefs.net - Status changed from 'patched' to 'resolved' # Fri Jul 07 11:03:30 2017 steve [...] deefs.net - Fixed in 2.033 added