Skip Menu |

This queue is for tickets about the PDL-EditDistance CPAN distribution.

Report information
The Basics
Id: 76461
Status: resolved
Priority: 0/
Queue: PDL-EditDistance

People
Owner: Nobody in particular
Requestors: chm [...] cpan.org
SREZIC [...] cpan.org
Cc: moocow.bovine [...] googlemail.com
AdminCc:

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



Subject: Test failure with bleadperl
With bleadperl (perl v5.15.9-85-gd005e6a and v5.15.9-123-gbd9cbc4) I get a failure while running make test: Error in _edit_distance_full:Wrong dims at Basic/Core/Core.pm.PL (i.e. PDL::Core.pm) line 396. PDL::Core::barf('Error in _edit_distance_full:Wrong dims\x{a}') called at t/01_distance.t line 62 main::test_distance_full() called at t/01_distance.t line 76 t/01_distance.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 23/29 subtests Everything's fine on the same system with perl 5.14.2. Regards, Slaven
RT-Send-CC: andk [...] cpan.org
On Tue Apr 10 03:11:16 2012, SREZIC wrote: Show quoted text
> With bleadperl (perl v5.15.9-85-gd005e6a and v5.15.9-123-gbd9cbc4) I get > a failure while running make test: > > Error in _edit_distance_full:Wrong dims > at Basic/Core/Core.pm.PL (i.e. PDL::Core.pm) line 396. > PDL::Core::barf('Error in _edit_distance_full:Wrong dims\x{a}') > called at t/01_distance.t line 62 > main::test_distance_full() called at t/01_distance.t line 76 > t/01_distance.t .. > Dubious, test returned 255 (wstat 65280, 0xff00) > Failed 23/29 subtests > > Everything's fine on the same system with perl 5.14.2.
Andreas König, could you do a binary search?
v5.15.8-62-g345d70e 345d70e3f599db40c8311185ac403b1a5b35d2a5 is the first bad commit commit 345d70e3f599db40c8311185ac403b1a5b35d2a5 Author: Father Chrysostomos <sprout@cpan.org> Date: Thu Mar 1 12:24:38 2012 -0800 [perl #107366] Allow attributes to set :lvalue on defined sub Greetings,
RT-Send-CC: andk [...] cpan.org
On Fri Apr 13 02:28:04 2012, ANDK wrote: Show quoted text
> v5.15.8-62-g345d70e > > 345d70e3f599db40c8311185ac403b1a5b35d2a5 is the first bad commit > commit 345d70e3f599db40c8311185ac403b1a5b35d2a5 > Author: Father Chrysostomos <sprout@cpan.org> > Date: Thu Mar 1 12:24:38 2012 -0800 > > [perl #107366] Allow attributes to set :lvalue on defined sub
I can’t see how that could have caused the problem. Before that commit, did you get a pass, or did you simply get a different mode of failure? If the latter, could you try doing a binary search with this commit (345d70e3f; at least the ext/attributes/* changes) applied to each commit during the binary search? In those cases where it won’t apply, I imagine you get a pass anyway.
It seemed much less work to take the recent bleadperl v5.15.9-134-g8aed2c6 and revert 345d70e3, and voila: PDL-EditDistance works with it. Although I should have mentioned one thing earlier: I based the whole investigation on CHM/PDL-2.4.10_003.tar.gz, not on stock 2.4.10. So what the exact trick is that fools us here, I cannot say. Lots of dependencies involved...
RT-Send-CC: andk [...] cpan.org
On Sun Apr 15 11:12:18 2012, ANDK wrote: Show quoted text
> It seemed much less work to take the recent bleadperl > v5.15.9-134-g8aed2c6 and revert 345d70e3, and voila: PDL-EditDistance > works with it. > > Although I should have mentioned one thing earlier: I based the whole > investigation on CHM/PDL-2.4.10_003.tar.gz, not on stock 2.4.10. > > So what the exact trick is that fools us here, I cannot say. Lots of > dependencies involved...
It was a bit tricky, but I figured out how to write a PDL patch to address this: https://rt.cpan.org/Ticket/Display.html?id=76577
CC: moocow.bovine [...] googlemail.com
Subject: PDL::EditDistance test now fails for perl 5.16
See the rt bug #76577 or the ticket opened in the sourceforge
net bug tracker for PDL.  The test appears to be using reshape
in an invalid way---to increase the size of the piddle.

--Chris
On Sun Apr 15 18:09:17 2012, CHM wrote: Show quoted text
> See the rt bug #76577 or the ticket opened in the sourceforge > net bug tracker for PDL. The test appears to be using reshape > in an invalid way---to increase the size of the piddle.
This is the same bug as #76461.
On 2012-04-15 18:09:17, CHM wrote: Show quoted text
> See the rt bug #76577 or the ticket opened in the sourceforge > net bug tracker for PDL. The test appears to be using reshape > in an invalid way---to increase the size of the piddle.
Oops, that would be my fault. It seems to me that the docs indicate this ought to be a valid use of reshape() though: The data elements are preserved, obviously they will wrap differently and get truncated if the new array is shorter. If the new array is longer it will be zero-padded. ... and indeed I've been (ab?)using reshape() in this way in other contexts (which may also explode now) for quite some time. Is there a recommended way to dynamically grow an existing piddle other than e.g. $new = zeroes(@new_dims); $new->indexND($old->whichND) .= $old; ? marmosets, Bryan
CC: SREZIC [...] cpan.org, chm [...] cpan.org, moocow.bovine [...] googlemail.com
Subject: Re: [rt.cpan.org #76461] Test failure with bleadperl
Date: Tue, 17 Apr 2012 07:54:00 -0400
To: bug-PDL-EditDistance [...] rt.cpan.org
From: Chris Marshall <devel.chm.01 [...] gmail.com>
Hi Bryan-it appears to be my misunderstanding of how reshape works. It appears to be documented for extending the piddle. I guess I had always assumed that I would need to copy/extend the piddle myself. Sorry, that doen't appear to be the problem... :-( --Chris On 4/16/12, Bryan Jurish via RT <bug-PDL-EditDistance@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=76461 > > > On 2012-04-15 18:09:17, CHM wrote:
>> See the rt bug #76577 or the ticket opened in the sourceforge >> net bug tracker for PDL. The test appears to be using reshape >> in an invalid way---to increase the size of the piddle.
> > Oops, that would be my fault. It seems to me that the docs indicate > this ought to be a valid use of reshape() though: > > The data elements are preserved, obviously they will wrap differently > and get truncated if the new array is shorter. If the new array is > longer it will be zero-padded. > > ... and indeed I've been (ab?)using reshape() in this way in other > contexts (which may also explode now) for quite some time. Is there a > recommended way to dynamically grow an existing piddle other than e.g. > > $new = zeroes(@new_dims); > $new->indexND($old->whichND) .= $old; > > ? > > marmosets, > Bryan >
RT-Send-CC: moocow.bovine [...] googlemail.com
The proposed patch has been applied in CHM/PDL-2.4.10_005.tar.gz which is the PDL-2.4.11-rc2.
Please confirm that this version fixes the problem so we can close the ticket.  Please see
http://mailman.jach.hawaii.edu/pipermail/perldl/2012-May/006891.html for details.  Thanks.

On Fri May 18 13:47:50 2012, CHM wrote: Show quoted text
> The proposed patch has been applied in CHM/PDL-2.4.10_005.tar.gz which > is the > PDL-2.4.11-rc2. > Please confirm that this version fixes the problem so we can close the > ticket. > Please see > http://mailman.jach.hawaii.edu/pipermail/perldl/2012-May/006891.html > for > details. Thanks.
It indeed does.
upstream patch fixed the bug; no new problems here; marking as resolved.