Post without Account — your post will be reviewed, and if appropriate, posted under Anonymous. You can also use this link to report any problems registering or logging in.

RT 122372 - Reference is already weak

  • 2 Replies
  • 1360 Views
*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 417
    • View Profile
RT 122372 - Reference is already weak
« July 05, 2017, 09:25:09 PM »
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

Code: [Select]
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.

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 417
    • View Profile
Re: RT 122372 - Reference is already weak
« Reply #1: July 06, 2017, 09:45:13 AM »
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'

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 417
    • View Profile
Re: RT 122372 - Reference is already weak
« Reply #2: July 07, 2017, 01:34:42 PM »
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