Skip Menu |

This queue is for tickets about the Audio-TagLib CPAN distribution.

Report information
The Basics
Id: 114906
Status: open
Priority: 0/
Queue: Audio-TagLib

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

Bug Information
Severity: Normal
Broken in: 1.65
Fixed in: (no value)



Subject: [Win32] Some test failures with perl-5.24.0
Hi Geoff, Just an FYI. On Windows, I've built Audio-TagLib-1.65 (taglib-1.9.1) on a number of perls (both 32-bit and 64-bit) ranging from 5.12.0 through to 5.24.0. All tests pass, except for the 5.24.0 perls which all produce the following 2 failures: ############################### C:\Audio-TagLib-1.65>perl -Mblib t/TagLib_File.t 1..13 ok 1 - use Audio::TagLib::File; ok 2 - Audio::TagLib::File->can(...) not ok 3 # Failed test at t/TagLib_File.t line 24. # got: 'd' # expected: 'sample/guitar.mp3' # method name() failed TagLib: File::length() -- Failed to get the file size. ok 4 ok 5 ok 6 ok 7 TagLib: File::seek() -- Failed to set the file pointer. TagLib: File::tell() -- Failed to get the file pointer. TagLib: File::length() -- Failed to get the file size. TagLib: File::seek() -- Failed to set the file pointer. ok 8 ok 9 ok 10 TagLib: File::seek() -- Failed to set the file pointer. TagLib: File::tell() -- Failed to get the file pointer. ok 11 ok 12 ok 13 # Looks like you failed 1 test of 13. C:\Audio-TagLib-1.65>perl -Mblib t/TagLib_FileRef.t 1..15 ok 1 - use Audio::TagLib::FileRef; ok 2 - Audio::TagLib::FileRef->can(...) ok 3 TagLib: Could not open file sample/guitar.mp3 TagLib: Could not open file sample/guitar.mp3 not ok 4 # Failed test at t/TagLib_FileRef.t line 17. # got: '|' # expected: 'sample/guitar.mp3' # method create(file) failed ok 5 - An object of class 'Audio::TagLib::FileRef' isa 'Audio::TagLib::FileRef' ok 6 - An object of class 'Audio::TagLib::FileRef' isa 'Audio::TagLib::FileRef' ok 7 - An object of class 'Audio::TagLib::FileRef' isa 'Audio::TagLib::FileRef' ok 8 - An object of class 'Audio::TagLib::FileRef' isa 'Audio::TagLib::FileRef' ok 9 - An object of class 'Audio::TagLib::Tag' isa 'Audio::TagLib::Tag' ok 10 - An object of class 'Audio::TagLib::AudioProperties' isa 'Audio::TagLib::AudioProperties' ok 11 - An object of class 'Audio::TagLib::File' isa 'Audio::TagLib::File' ok 12 ok 13 ok 14 ok 15 # Looks like you failed 1 test of 15. ############################### I have 4 builds of perl-5.24.0: MSWin32-x64-multi-thread MSWin32-x64-multi-thread-ld MSWin32-x86-multi-thread-64int MSWin32-x86-multi-thread-64int-ld Cheers, Rob
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Tue, 31 May 2016 15:36:11 -0700
To: bug-Audio-TagLib [...] rt.cpan.org
From: Geoffrey Leach <geoff [...] hughes.net>
Hi Sisyphus, Thanks for the data. I'll see if I can figure it out! Geoffrey On 05/31/2016 06:33:19 AM, Sisyphus via RT wrote: Show quoted text
> Tue May 31 09:33:14 2016: Request 114906 was acted upon. > Transaction: Ticket created by SISYPHUS > Queue: Audio-TagLib > Subject: [Win32] Some test failures with perl-5.24.0 > Broken in: 1.65 > Severity: Normal > Owner: Nobody > Requestors: sisyphus@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 > > > > Hi Geoff, > > Just an FYI. > > On Windows, I've built Audio-TagLib-1.65 (taglib-1.9.1) on a number of > perls (both 32-bit and 64-bit) ranging from 5.12.0 through to 5.24.0. > > All tests pass, except for the 5.24.0 perls which all produce the > following 2 failures: > > ############################### > C:\Audio-TagLib-1.65>perl -Mblib t/TagLib_File.t > 1..13 > ok 1 - use Audio::TagLib::File; > ok 2 - Audio::TagLib::File->can(...) > not ok 3 > # Failed test at t/TagLib_File.t line 24. > # got: 'd' > # expected: 'sample/guitar.mp3' > # method name() failed > TagLib: File::length() -- Failed to get the file size. > ok 4 > ok 5 > ok 6 > ok 7 > TagLib: File::seek() -- Failed to set the file pointer. > TagLib: File::tell() -- Failed to get the file pointer. > TagLib: File::length() -- Failed to get the file size. > TagLib: File::seek() -- Failed to set the file pointer. > ok 8 > ok 9 > ok 10 > TagLib: File::seek() -- Failed to set the file pointer. > TagLib: File::tell() -- Failed to get the file pointer. > ok 11 > ok 12 > ok 13 > # Looks like you failed 1 test of 13. > > C:\Audio-TagLib-1.65>perl -Mblib t/TagLib_FileRef.t > 1..15 > ok 1 - use Audio::TagLib::FileRef; > ok 2 - Audio::TagLib::FileRef->can(...) > ok 3 > TagLib: Could not open file sample/guitar.mp3 > TagLib: Could not open file sample/guitar.mp3 > not ok 4 > # Failed test at t/TagLib_FileRef.t line 17. > # got: '|' > # expected: 'sample/guitar.mp3' > # method create(file) failed > ok 5 - An object of class 'Audio::TagLib::FileRef' isa > 'Audio::TagLib::FileRef' > ok 6 - An object of class 'Audio::TagLib::FileRef' isa > 'Audio::TagLib::FileRef' > ok 7 - An object of class 'Audio::TagLib::FileRef' isa > 'Audio::TagLib::FileRef' > ok 8 - An object of class 'Audio::TagLib::FileRef' isa > 'Audio::TagLib::FileRef' > ok 9 - An object of class 'Audio::TagLib::Tag' isa > 'Audio::TagLib::Tag' > ok 10 - An object of class 'Audio::TagLib::AudioProperties' isa > 'Audio::TagLib::AudioProperties' > ok 11 - An object of class 'Audio::TagLib::File' isa > 'Audio::TagLib::File' > ok 12 > ok 13 > ok 14 > ok 15 > # Looks like you failed 1 test of 15. > > ############################### > > I have 4 builds of perl-5.24.0: > MSWin32-x64-multi-thread > MSWin32-x64-multi-thread-ld > MSWin32-x86-multi-thread-64int > MSWin32-x86-multi-thread-64int-ld > > Cheers, > Rob > > > > >
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Wed, 1 Jun 2016 09:38:01 +1000
To: <bug-Audio-TagLib [...] rt.cpan.org>
From: <sisyphus1 [...] optusnet.com.au>
Hi Geoff, I haven't given you much to work with. My perls-5.24.0 and taglib-1.9.1 were all built using the same gcc-5.3.0. In t/TagLib_File.t I tried changing the line: my $file = "sample/guitar.mp3"; to my $file = "sample\\guitar.mp3"; but that, unsurprisingly, makes no difference and test 3 still reports that I got (apparently) random garbage. However, if I move guitar.mp3 up to the top level source directory (and set '$file = "guitar.mp3"') then all tests pass: ################################## C:\sis\Audio-TagLib-1.65>perl t/TagLib_File.t 1..13 ok 1 - use Audio::TagLib::File; ok 2 - Audio::TagLib::File->can(...) ok 3 ok 4 ok 5 ok 6 ok 7 TagLib: File::seek() -- Failed to set the file pointer. ok 8 ok 9 ok 10 ok 11 ok 12 ok 13 C:\sis\Audio-TagLib-1.65>pmver Audio::TagLib 1.65 ################################## Or, I can get the same result by leaving $file set to "guitar.mp3" and cd'ing to the "sample" directory: ################################## C:\sis\Audio-TagLib-1.65\sample>perl ../t/TagLib_File.t 1..13 ok 1 - use Audio::TagLib::File; ok 2 - Audio::TagLib::File->can(...) ok 3 ok 4 ok 5 ok 6 ok 7 TagLib: File::seek() -- Failed to set the file pointer. ok 8 ok 9 ok 10 ok 11 ok 12 ok 13 ################################## Does this ring any alarm bells for you ? It doesn't help *me* to figure out what's going awry ;-) Do you have access to a Windows machine with Strawberry Perl ? (I haven't yet tested on Strawberry Perl 5.24.0, but I will.) Cheers, Rob
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Tue, 31 May 2016 16:48:55 -0700
To: bug-Audio-TagLib [...] rt.cpan.org
From: Geoffrey Leach <geoff [...] hughes.net>
Hmmmm ... verrrry interesting. Clearly, I was ignoring Windoze. There are ways to fix that. Stay tuned. On 05/31/2016 04:39:02 PM, sisyphus1@optusnet.com.au via RT wrote: Show quoted text
> Queue: Audio-TagLib > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 > > > Hi Geoff, > > I haven't given you much to work with. > My perls-5.24.0 and taglib-1.9.1 were all built using the same > gcc-5.3.0. > > In t/TagLib_File.t I tried changing the line: > > my $file = "sample/guitar.mp3"; > to > my $file = "sample\\guitar.mp3"; > > but that, unsurprisingly, makes no difference and test 3 still reports > that > I got (apparently) random garbage. > > However, if I move guitar.mp3 up to the top level source directory > (and set > '$file = "guitar.mp3"') then all tests pass: > > ################################## > C:\sis\Audio-TagLib-1.65>perl t/TagLib_File.t > 1..13 > ok 1 - use Audio::TagLib::File; > ok 2 - Audio::TagLib::File->can(...) > ok 3 > ok 4 > ok 5 > ok 6 > ok 7 > TagLib: File::seek() -- Failed to set the file pointer. > ok 8 > ok 9 > ok 10 > ok 11 > ok 12 > ok 13 > > C:\sis\Audio-TagLib-1.65>pmver Audio::TagLib > 1.65 > ################################## > > Or, I can get the same result by leaving $file set to "guitar.mp3" and > > cd'ing to the "sample" directory: > > ################################## > C:\sis\Audio-TagLib-1.65\sample>perl ../t/TagLib_File.t > 1..13 > ok 1 - use Audio::TagLib::File; > ok 2 - Audio::TagLib::File->can(...) > ok 3 > ok 4 > ok 5 > ok 6 > ok 7 > TagLib: File::seek() -- Failed to set the file pointer. > ok 8 > ok 9 > ok 10 > ok 11 > ok 12 > ok 13 > ################################## > > Does this ring any alarm bells for you ? > It doesn't help *me* to figure out what's going awry ;-) > > Do you have access to a Windows machine with Strawberry Perl ? > (I haven't yet tested on Strawberry Perl 5.24.0, but I will.) > > Cheers, > Rob > > > > > >
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Sun, 26 Jun 2016 14:44:32 -0700
To: bug-Audio-TagLib [...] rt.cpan.org
From: Geoffrey Leach <geoff [...] hughes.net>
Sorry for the delay. Please try "..\sample\guitar.mp3". I believe that this correctly reflects the path structure under windows. Sorry, but I don't have access to windows Perl. On 05/31/2016 04:39:02 PM, sisyphus1@optusnet.com.au via RT wrote: Show quoted text
> Queue: Audio-TagLib > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 > > > Hi Geoff, > > I haven't given you much to work with. > My perls-5.24.0 and taglib-1.9.1 were all built using the same > gcc-5.3.0. > > In t/TagLib_File.t I tried changing the line: > > my $file = "sample/guitar.mp3"; > to > my $file = "sample\\guitar.mp3"; > > but that, unsurprisingly, makes no difference and test 3 still reports > that > I got (apparently) random garbage. > > However, if I move guitar.mp3 up to the top level source directory > (and set > '$file = "guitar.mp3"') then all tests pass: > > ################################## > C:\sis\Audio-TagLib-1.65>perl t/TagLib_File.t > 1..13 > ok 1 - use Audio::TagLib::File; > ok 2 - Audio::TagLib::File->can(...) > ok 3 > ok 4 > ok 5 > ok 6 > ok 7 > TagLib: File::seek() -- Failed to set the file pointer. > ok 8 > ok 9 > ok 10 > ok 11 > ok 12 > ok 13 > > C:\sis\Audio-TagLib-1.65>pmver Audio::TagLib > 1.65 > ################################## > > Or, I can get the same result by leaving $file set to "guitar.mp3" and > > cd'ing to the "sample" directory: > > ################################## > C:\sis\Audio-TagLib-1.65\sample>perl ../t/TagLib_File.t > 1..13 > ok 1 - use Audio::TagLib::File; > ok 2 - Audio::TagLib::File->can(...) > ok 3 > ok 4 > ok 5 > ok 6 > ok 7 > TagLib: File::seek() -- Failed to set the file pointer. > ok 8 > ok 9 > ok 10 > ok 11 > ok 12 > ok 13 > ################################## > > Does this ring any alarm bells for you ? > It doesn't help *me* to figure out what's going awry ;-) > > Do you have access to a Windows machine with Strawberry Perl ? > (I haven't yet tested on Strawberry Perl 5.24.0, but I will.) > > Cheers, > Rob > > > > > >
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Mon, 27 Jun 2016 21:57:17 +1000
To: <bug-Audio-TagLib [...] rt.cpan.org>
From: <sisyphus1 [...] optusnet.com.au>
Show quoted text
-----Original Message----- From: geoff@hughes.net via RT Sent: Monday, June 27, 2016 7:45 AM To: sisyphus@cpan.org Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0 <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 >
> Please try "..\sample\guitar.mp3". I believe that this correctly reflects > the path structure under windows. Sorry, but I don't have access to > windows Perl.
The current setting of "sample/guitar.mp3" is correct for all systems (including Windows). When running 'make test', the cwd is the top level source folder. The file sample/guitar.mp3 is found ok - the problem is that, for some reason, there are function calls that will succeed only if guitar.mp3 is in the cwd ( && if TagLib_File.t's $file specifies the guitar.mp3 that's in the cwd). I think that, somewhere, there must be something that mangles windows paths. Do you know of anything in the source (including xs files) that's geared towards Windows specifically ? (I couldn't find any Windows-specific stuff at all.) Do you know of anything in the source (including xs files) that assumes that the filepath separator is a forward slash ? Windows generally recognizes both / and \ as filepath separators but they are not *always* interchangeable. Incidentally - when I have guitar.mp3 in the cwd (and all tests pass) I get: C:\sisyphusion\Audio-TagLib-1.65>perl t/TagLib_File.t 1..13 ok 1 - use Audio::TagLib::File; ok 2 - Audio::TagLib::File->can(...) ok 3 ok 4 ok 5 ok 6 ok 7 TagLib: File::seek() -- Failed to set the file pointer. ok 8 ok 9 ok 10 ok 11 ok 12 ok 13 Does that "TagLib: File::seek() -- Failed to set the file pointer." in the middle indicate that something did not work as expected ? Cheers, Rob
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Mon, 27 Jun 2016 14:59:00 -0700
To: bug-Audio-TagLib [...] rt.cpan.org
From: Geoffrey Leach <geoff [...] hughes.net>
Hmmm... clearly I know nothing about the interaction on windows ):- The only thing that I can think of is that the problem resides in the taglib code. Have you tried the test using a fully-qualified path (with backslashes and volume?) On 06/27/2016 04:58:12 AM, sisyphus1@optusnet.com.au via RT wrote: Show quoted text
> Queue: Audio-TagLib > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 > > > -----Original Message----- > From: geoff@hughes.net via RT > Sent: Monday, June 27, 2016 7:45 AM > To: sisyphus@cpan.org > Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with > perl-5.24.0 > > <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 > >
> > Please try "..\sample\guitar.mp3". I believe that this correctly
> reflects
> > the path structure under windows. Sorry, but I don't have access to > > windows Perl.
> > The current setting of "sample/guitar.mp3" is correct for all systems > (including Windows). > When running 'make test', the cwd is the top level source folder. > The file sample/guitar.mp3 is found ok - the problem is that, for some > > reason, there are function calls that will succeed only if guitar.mp3 > is in > the cwd ( && if TagLib_File.t's $file specifies the guitar.mp3 that's > in the > cwd). > > I think that, somewhere, there must be something that mangles windows > paths. > Do you know of anything in the source (including xs files) that's > geared > towards Windows specifically ? (I couldn't find any Windows-specific > stuff > at all.) > > Do you know of anything in the source (including xs files) that > assumes that > the filepath separator is a forward slash ? > Windows generally recognizes both / and \ as filepath separators but > they > are not *always* interchangeable. > > Incidentally - when I have guitar.mp3 in the cwd (and all tests pass) > I get: > > C:\sisyphusion\Audio-TagLib-1.65>perl t/TagLib_File.t > 1..13 > ok 1 - use Audio::TagLib::File; > ok 2 - Audio::TagLib::File->can(...) > ok 3 > ok 4 > ok 5 > ok 6 > ok 7 > TagLib: File::seek() -- Failed to set the file pointer. > ok 8 > ok 9 > ok 10 > ok 11 > ok 12 > ok 13 > > Does that "TagLib: File::seek() -- Failed to set the file pointer." in > the > middle indicate that something did not work as expected ? > > Cheers, > Rob > > > > >
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Tue, 28 Jun 2016 10:50:40 +1000
To: <bug-Audio-TagLib [...] rt.cpan.org>, <sisyphus [...] cpan.org>
From: <sisyphus1 [...] optusnet.com.au>
Show quoted text
-----Original Message----- From: geoff@hughes.net via RT Sent: Tuesday, June 28, 2016 7:59 AM To: sisyphus@cpan.org Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0 <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 >
> The only thing that I can think of is that the problem resides in the > taglib code. > Have you tried the test using a fully-qualified path (with backslashes and > volume?)
Good idea - and if I specify the full path to the guitar.mp3 that's in the cwd, then the failure occurs. Going a bit further, in Taglib_File.t I can specify ./guitar.mp3 in a number of ways: $file = "guitar.mp3"; $file = "./guitar.mp3"; $file = "sample/../guitar.mp3"; $file = "C:/sisyphusion/Audio-TagLib-1.65/guitar.mp3"; All of those point to the same file - ie to the copy of guitar.mp3 that I placed in the top level source folder. The first 2 work fine, but the next 2 produce the error. It would have been better if the second one had failed. Then we would have compelling evidence that the problem was caused by the presence of the filepath separator (/). But perhaps the second one works only because the "./" gets removed before the location gets passed to taglib. I don't think it's because taglib wants to receive a POSIX path - because the third attempt uses a valid POSIX path but still fails. Anyway, I think you're notion that the problem is something in taglib is probably correct. I think my pre-5.24.0 perl builds of Audio-TagLib use an earlier version of taglib - which may well be the reason that they pass. Does Audio-TagLib provide a function to display the version of the underlying taglib library ? (I couldn't spot one.) Whatever the problem is, it seems to be quite specific to whatever test 3 is testing. At least the workaround is fairly simple (if a bit tedious ;-) Cheers, Rob
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Tue, 28 Jun 2016 14:19:18 -0700
To: bug-Audio-TagLib [...] rt.cpan.org
From: Geoffrey Leach <geoff [...] hughes.net>
Surely a fully-qualified path should work. There's something funny going on. The most recent version of taglib is 11.1. Are you using that? Are you building it from source? I'll try to come up with some diagnostic patches. On 06/27/2016 05:51:35 PM, sisyphus1@optusnet.com.au via RT wrote: Show quoted text
> Queue: Audio-TagLib > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 > > > > > -----Original Message----- > From: geoff@hughes.net via RT > Sent: Tuesday, June 28, 2016 7:59 AM > To: sisyphus@cpan.org > Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with > perl-5.24.0 > > <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 > >
> > The only thing that I can think of is that the problem resides in
> the
> > taglib code. > > Have you tried the test using a fully-qualified path (with
> backslashes and
> > volume?)
> > Good idea - and if I specify the full path to the guitar.mp3 that's in > the > cwd, then the failure occurs. > > Going a bit further, in Taglib_File.t I can specify ./guitar.mp3 in a > number > of ways: > > $file = "guitar.mp3"; > $file = "./guitar.mp3"; > $file = "sample/../guitar.mp3"; > $file = "C:/sisyphusion/Audio-TagLib-1.65/guitar.mp3"; > > All of those point to the same file - ie to the copy of guitar.mp3 > that I > placed in the top level source folder. > The first 2 work fine, but the next 2 produce the error. > > It would have been better if the second one had failed. Then we would > have > compelling evidence that the problem was caused by the presence of the > > filepath separator (/). > But perhaps the second one works only because the "./" gets removed > before > the location gets passed to taglib. > I don't think it's because taglib wants to receive a POSIX path - > because > the third attempt uses a valid POSIX path but still fails. > > Anyway, I think you're notion that the problem is something in taglib > is > probably correct. > I think my pre-5.24.0 perl builds of Audio-TagLib use an earlier > version of > taglib - which may well be the reason that they pass. > Does Audio-TagLib provide a function to display the version of the > underlying taglib library ? (I couldn't spot one.) > > Whatever the problem is, it seems to be quite specific to whatever > test 3 is > testing. > > At least the workaround is fairly simple (if a bit tedious ;-) > > Cheers, > Rob > > > >
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Wed, 29 Jun 2016 11:28:49 +1000
To: <bug-Audio-TagLib [...] rt.cpan.org>
From: <sisyphus1 [...] optusnet.com.au>
Show quoted text
-----Original Message----- From: geoff@hughes.net via RT Sent: Wednesday, June 29, 2016 7:19 AM To: sisyphus@cpan.org Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0 <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 >
> Surely a fully-qualified path should work. There's something funny going > on.
Definitely. Although the fully qualified path enables the file to be found, this code doesn't work as intended: my $fileref = Audio::TagLib::FileRef->new($file); my $i = $fileref->file(); is($i->name(), $file) or diag("method name() failed"); For some reason $i->name is returning garbage. I have taglib-1.9.1. I prefer to build from source and I see: https://taglib.github.io/releases/taglib-1.11.tar.gz. I'll give that a try and report back. Other than that, do you have any code that gives us a meaningful look at what's in $fileref and $fileref->file() ? Cheers, Rob
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Tue, 28 Jun 2016 19:57:16 -0700
To: bug-Audio-TagLib [...] rt.cpan.org
From: Geoffrey Leach <geoff [...] hughes.net>
The error message that you're getting comes from .../taglib-1.11/taglib/toolkit/tfilestream.cpp at 372. It appears that the author has neglected to follow the reccomended code for handling errors from seeking. Here's some code that can give us more insight. Beginning at line 367: #if GCL SetFilePointer(d->file, offset, NULL, whence); const int lastError = GetLastError(); if(lastError != NO_ERROR && lastError != ERROR_NEGATIVE_SEEK) debug("FileStream::seek() -- Failed to set the file pointer."); #endif DWORD dwPtr = SetFilePointer(d->file, offset, NULL, whence); if (dwPtr == INVALID_SET_FILE_POINTER) // Test for failure { // Obtain the error code. DWORD dwError = GetLastError() ; cerr << "FileStream::seek() -- Failed to set the file pointer (new code)" << endl; cerr << "FileStream::seek() -- SetFilePointer returns INVALID_SET_FILE_POINTER" << endl; cerr << "FileStream::seek() -- GetLastError returns " << dwError << endl; } // end of GCL patch I can't test this, so I need to lean on your help to diagnose. I would not be surprised if it turns out that the error message goes away. On 06/28/2016 06:29:46 PM, sisyphus1@optusnet.com.au via RT wrote: Show quoted text
> Queue: Audio-TagLib > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 > > > -----Original Message----- > From: geoff@hughes.net via RT > Sent: Wednesday, June 29, 2016 7:19 AM > To: sisyphus@cpan.org > Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with > perl-5.24.0 > > <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 > >
> > Surely a fully-qualified path should work. There's something funny
> going
> > on.
> > Definitely. Although the fully qualified path enables the file to be > found, > this code doesn't work as intended: > > my $fileref = Audio::TagLib::FileRef->new($file); > my $i = $fileref->file(); > is($i->name(), $file) or > diag("method name() failed"); > > For some reason $i->name is returning garbage. > > I have taglib-1.9.1. > I prefer to build from source and I see: > https://taglib.github.io/releases/taglib-1.11.tar.gz. > > I'll give that a try and report back. > > Other than that, do you have any code that gives us a meaningful look > at > what's in $fileref and $fileref->file() ? > > Cheers, > Rob > > >
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Wed, 29 Jun 2016 19:49:36 +1000
To: <bug-Audio-TagLib [...] rt.cpan.org>
From: <sisyphus1 [...] optusnet.com.au>
Using 1.11, things look a lot worse - though I suspect they are, in fact, no worse: t/TagLib.t ....................................... 1/1 # Using taglib 1.11 t/TagLib.t ....................................... ok t/TagLib_APE_Footer.t ............................ ok t/TagLib_APE_Item.t .............................. 1/14 # Failed test 'Using taglib 1.11' # at t/TagLib_APE_Item.t line 44. # got: 27 # expected: 13 # method size() failed # Looks like you failed 1 test of 14. t/TagLib_APE_Item.t .............................. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/14 subtests t/TagLib_APE_ItemListMap.t ....................... ok t/TagLib_APE_ItemListMap_Iterator.t .............. ok t/TagLib_APE_Tag.t ............................... ok t/TagLib_AudioProperties.t ....................... 1/6 # Failed test at t/TagLib_AudioProperties.t line 13. # got: 6 # expected: 7 # method length() failed # Looks like you failed 1 test of 6. t/TagLib_AudioProperties.t ....................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/6 subtests t/TagLib_ByteVector.t ............................ ok t/TagLib_ByteVector_Iterator.t ................... ok t/TagLib_ByteVectorList.t ........................ ok t/TagLib_File.t .................................. 1/13 # Failed test at t/TagLib_File.t line 26. # got: 'H' # expected: 'sample/guitar.mp3' # method name() failed # Failed test at t/TagLib_File.t line 31. # got: 101 # expected: 1024 # method readBlock(blocksize) failed # Looks like you failed 2 tests of 13. t/TagLib_File.t .................................. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/13 subtests t/TagLib_FileRef.t ............................... 1/15 TagLib: Could not open file sample/guitar.mp3 TagLib: Could not open file sample/guitar.mp3 # Failed test at t/TagLib_FileRef.t line 17. # got: '^' # expected: 'sample/guitar.mp3' # method create(file) failed # Looks like you failed 1 test of 15. t/TagLib_FileRef.t ............................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/15 subtests t/TagLib_FileRef_FileTypeResolver.t .............. ok t/TagLib_FLAC_File.t ............................. 1/10 TagLib: FLAC::File::streamInfoData() -- This function is obsolete. Returning an empty ByteVector. TagLib: FLAC::File::streamLength() -- This function is obsolete. Returning zero. # Failed test at t/TagLib_FLAC_File.t line 36. # got: 0 # expected: 343788 # method streamLength() failed # Looks like you failed 1 test of 10. t/TagLib_FLAC_File.t ............................. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/10 subtests t/TagLib_FLAC_Properties.t ....................... 1/7 # Failed test at t/TagLib_FLAC_Properties.t line 15. # got: 396 # expected: 458 # method bitrate() failed # Looks like you failed 1 test of 7. t/TagLib_FLAC_Properties.t ....................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/7 subtests t/TagLib_ID3v1.t ................................. ok t/TagLib_ID3v1_GenreMap.t ........................ ok t/TagLib_ID3v1_GenreMap_Iterator.t ............... 1/8 # Failed test at t/TagLib_ID3v1_GenreMap_Iterator.t line 21. # got: 148 # expected: 34 # method next() failed # Looks like you failed 1 test of 8. t/TagLib_ID3v1_GenreMap_Iterator.t ............... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/8 subtests t/TagLib_ID3v1_StringHandler.t ................... ok t/TagLib_ID3v1_Tag.t ............................. ok t/TagLib_ID3v2_AttachedPictureFrame.t ............ 1/10 TagLib: A picture frame must contain at least 5 bytes. t/TagLib_ID3v2_AttachedPictureFrame.t ............ ok t/TagLib_ID3v2_CommentsFrame.t ................... ok t/TagLib_ID3v2_ExtendedHeader.t .................. ok t/TagLib_ID3v2_Footer.t .......................... ok t/TagLib_ID3v2_Frame.t ........................... ok t/TagLib_ID3v2_FrameFactory.t .................... ok t/TagLib_ID3v2_FrameList.t ....................... ok t/TagLib_ID3v2_FrameList_Iterator.t .............. ok t/TagLib_ID3v2_FrameListMap.t .................... ok t/TagLib_ID3v2_FrameListMap_Iterator.t ........... ok t/TagLib_ID3v2_Header.t .......................... 1/24 # Failed test 'Using taglib 1.11' # at t/TagLib_ID3v2_Header.t line 113. # Compared $data->[3] # got : '4' # expect : '2' # method render() failed # Looks like you failed 1 test of 24. t/TagLib_ID3v2_Header.t .......................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/24 subtests t/TagLib_ID3v2_RelativeVolumeFrame.t ............. ok t/TagLib_ID3v2_RelativeVolumeFrame_PeakVolume.t .. ok t/TagLib_ID3v2_SynchData.t ....................... ok t/TagLib_ID3v2_Tag.t ............................. ok t/TagLib_ID3v2_TextIdentificationFrame.t ......... ok t/TagLib_ID3v2_UniqueFileIdentifierFrame.t ....... ok t/TagLib_ID3v2_UnknownFrame.t .................... ok t/TagLib_ID3v2_UserTextIdentificationFrame.t ..... ok t/TagLib_MPC_File.t .............................. ok t/TagLib_MPC_Properties.t ........................ ok t/TagLib_MPEG_File.t ............................. 1/16 # Failed test at t/TagLib_MPEG_File.t line 32. # got: 0 # expected: 104 # method firstFrameOffset() failed # Failed test at t/TagLib_MPEG_File.t line 38. # got: 27794 # expected: -1 # method lastFrameOffset() failed # Looks like you failed 2 tests of 16. t/TagLib_MPEG_File.t ............................. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/16 subtests t/TagLib_MPEG_Header.t ........................... 1/15 TagLib: MPEG::Header::Header() - This constructor is no longer used. # Failed test at t/TagLib_MPEG_Header.t line 34. # got: 'Version1' # expected: 'Version2' # method version() failed # Failed test at t/TagLib_MPEG_Header.t line 37. # got: 0 # expected: 3 # method layer() failed # Failed test at t/TagLib_MPEG_Header.t line 41. # got: 0 # expected: 576 # method samplesPerFrame() failed # Failed test at t/TagLib_MPEG_Header.t line 44. # got: 0 # expected: 16000 # method sampleRate() failed # Failed test at t/TagLib_MPEG_Header.t line 50. # got: # expected: 1 # method isValid() failed # Failed test at t/TagLib_MPEG_Header.t line 53. # got: # expected: 1 # method isPadded() failed # Failed test at t/TagLib_MPEG_Header.t line 56. # got: # expected: 1 # method isOriginal() failed # Failed test at t/TagLib_MPEG_Header.t line 62. # got: 0 # expected: 289 # method frameLength() failed # Failed test at t/TagLib_MPEG_Header.t line 68. # got: 0 # expected: 64 # method bitrate() failed # Looks like you failed 9 tests of 15. t/TagLib_MPEG_Header.t ........................... Dubious, test returned 9 (wstat 2304, 0x900) Failed 9/15 subtests t/TagLib_MPEG_Properties.t ....................... 1/12 # Failed test at t/TagLib_MPEG_Properties.t line 13. # got: 6 # expected: 7 # method length() failed # Looks like you failed 1 test of 12. t/TagLib_MPEG_Properties.t ....................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/12 subtests t/TagLib_MPEG_XingHeader.t ....................... ok t/TagLib_Ogg_FieldListMap.t ...................... ok t/TagLib_Ogg_FieldListMap_Iterator.t ............. ok t/TagLib_Ogg_File.t .............................. ok t/TagLib_Ogg_FLAC_File.t ......................... ok t/TagLib_Ogg_Page.t .............................. ok t/TagLib_Ogg_PageHeader.t ........................ ok t/TagLib_Ogg_Vorbis_File.t ....................... ok t/TagLib_Ogg_Vorbis_Properties.t ................. ok t/TagLib_Ogg_XiphComment.t ....................... 1/18 # Failed test at t/TagLib_Ogg_XiphComment.t line 51. # got: 105 # expected: 109 # method render() failed # Failed test at t/TagLib_Ogg_XiphComment.t line 53. # got: 105 # expected: 109 # method render(addFramingBit) failed # Looks like you failed 2 tests of 18. t/TagLib_Ogg_XiphComment.t ....................... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/18 subtests t/TagLib_String.t ................................ ok t/TagLib_String_Iterator.t ....................... ok t/TagLib_StringList.t ............................ ok t/TagLib_Tag.t ................................... ok t/TagLib_Vorbis_File.t ........................... ok t/TagLib_Vorbis_Properties.t ..................... ok Here's one way of patching TagLib_APE_Item.t and TagLib_ID3v2_Header.t to remove their bugs: ############################# --- t/TagLib_APE_Item.t_orig 2016-06-29 18:43:25 +1000 +++ t/TagLib_APE_Item.t 2016-06-29 19:09:14 +1000 @@ -38,7 +38,7 @@ $ver = qx{taglib-config --version}; chomp $ver; -$is18 = $ver ge '1.8'; +$is18 = v_num($ver) >= v_num('1.8'); $size = $is18 ? 27 : 13; cmp_ok($i->size(), "==", $size, "Using taglib $ver") or @@ -64,3 +64,8 @@ $i->setType("Text"); ok(not $i->isEmpty()) or diag("method isEmpty() failed"); + +sub v_num { + my @v = split /\./, $_[0]; + return ($v[0] * 10000) + $v[1]; +} --- t/TagLib_ID3v2_Header.t_orig 2016-06-29 19:20:50 +1000 +++ t/TagLib_ID3v2_Header.t 2016-06-29 19:28:31 +1000 @@ -75,7 +75,7 @@ $ver = qx{taglib-config --version}; chomp $ver; -$is18 = $ver ge '1.8'; +$is18 = v_num($ver) >= v_num('1.8'); # Render changes things a bit # The point to this test is to demonstrate that the @@ -119,3 +119,8 @@ $i = Audio::TagLib::ID3v2::Header->new($data); cmp_ok($i->majorVersion(), '==', 97) or diag("method majorVersion() failed"); + +sub v_num { + my @v = split /\./, $_[0]; + return ($v[0] * 10000) + $v[1]; +} ############################# Those bugs should not be specific to Windows. And it looks like there's a couple of instances of the test scripts using functions/constructors that are no longer supported in 1.11. Other than that, I think the failures are related to that same problem with "samples/guitar.mp3" path. I'll take a closer look when I get a chance. Cheers, Rob
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Tue, 5 Jul 2016 22:09:05 +1000
To: <bug-Audio-TagLib [...] rt.cpan.org>
From: <sisyphus1 [...] optusnet.com.au>
Hi Geoff, Just looking at t/TagLib_AudioProperties.t. It fails only one test - the one that tests the length of the file (in seconds). With 1.11 I'm getting a value of 6, though 7 is what's expected and 7 is what I get with 1.9.1. So ... looking at the 1.11 audioproperties.h, there's a comment about length: * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. But there's no such comment in the 1.9.1 audioproperties.h. Is it possible that 1.11 and 1.9.1 measure length differently ? Could 1.9.1 have rounded *up* to the nearest whole second ? .... or rounded to nearest ? Have you built Audio-TagLib-1.65 against taglib-1.11 and experienced no problems ? Cheers, Rob
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Tue, 05 Jul 2016 10:35:05 -0700
To: bug-Audio-TagLib [...] rt.cpan.org
From: Geoffrey Leach <geoff [...] hughes.net>
I'm assuming that the difference is the result of changes to the taglib code. There's a fair amount of that. On 07/05/2016 05:09:54 AM, sisyphus1@optusnet.com.au via RT wrote: Show quoted text
> Queue: Audio-TagLib > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 > > > > Hi Geoff, > > Just looking at t/TagLib_AudioProperties.t. > > It fails only one test - the one that tests the length of the file (in > > seconds). > > With 1.11 I'm getting a value of 6, though 7 is what's expected and 7 > is > what I get with 1.9.1. > > So ... looking at the 1.11 audioproperties.h, there's a comment about > length: > > * Returns the length of the file in seconds. The length is rounded > down to > * the nearest whole second. > > But there's no such comment in the 1.9.1 audioproperties.h. > Is it possible that 1.11 and 1.9.1 measure length differently ? > Could 1.9.1 have rounded *up* to the nearest whole second ? .... or > rounded > to nearest ? > > Have you built Audio-TagLib-1.65 against taglib-1.11 and experienced > no > problems ? > > Cheers, > Rob > > >
Subject: Re: [rt.cpan.org #114906] [Win32] Some test failures with perl-5.24.0
Date: Thu, 07 Jul 2016 17:39:53 -0700
To: bug-Audio-TagLib [...] rt.cpan.org
From: Geoffrey Leach <geoff [...] hughes.net>
An update on my previous reply. I checked the file with audacity, and it reports that the length of the file is, indeed, 7 seconds. On 07/05/2016 05:09:54 AM, sisyphus1@optusnet.com.au via RT wrote: Show quoted text
> Queue: Audio-TagLib > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=114906 > > > > Hi Geoff, > > Just looking at t/TagLib_AudioProperties.t. > > It fails only one test - the one that tests the length of the file (in > > seconds). > > With 1.11 I'm getting a value of 6, though 7 is what's expected and 7 > is > what I get with 1.9.1. > > So ... looking at the 1.11 audioproperties.h, there's a comment about > length: > > * Returns the length of the file in seconds. The length is rounded > down to > * the nearest whole second. > > But there's no such comment in the 1.9.1 audioproperties.h. > Is it possible that 1.11 and 1.9.1 measure length differently ? > Could 1.9.1 have rounded *up* to the nearest whole second ? .... or > rounded > to nearest ? > > Have you built Audio-TagLib-1.65 against taglib-1.11 and experienced > no > problems ? > > Cheers, > Rob > > > >