Bug 1683 - Artist 'Infinity' mapped to artist '0' in db
: Artist 'Infinity' mapped to artist '0' in db
Status: RESOLVED INVALID
Product: Logitech Media Server
Classification: Unclassified
Component: Tagging
: 6.1.0
: PC Other
: P4 minor (vote)
: Future
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-16 15:54 UTC by Jason Holtzapple
Modified: 2011-03-16 04:40 UTC (History)
0 users

See Also:
Category: ---


Attachments
mp3 with artist tag 'Infinity' (8.00 KB, audio/mpeg)
2005-06-20 07:25 UTC, Jason Holtzapple
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Holtzapple 2005-06-16 15:54:53 UTC
Here's a strange one. I have an mp3 file by an artist called 'Infinity'.

id3v1 tag info for trance_europe_express_3_-_211_infinity_-_i-94.mp3:
Title  : i-94                            Artist: Infinity                      
Album  : Trance Europe Express 3         Year: 1994, Genre: Unknown (255)
Comment: uberstd 3.90.3 mp3gain          Track: 23

However, when it is scanned the artist is changed to '0' (zero) and is sorted as
such in the Browse Artists part of the web interface.

When browsing on Squeezebox1 or Softsqueeze the Artist is totally blank.

I don't see artist 'Infinity' anywhere in the sqlite database, so I think it is
getting lost between the tag read and database write.

I guess it's quite possible that perl is interpreting 'Infinity' as a number
instead of string when used in a numeric context, so there may need to be a
safety check or an explicit cast added somewhere.
Comment 1 Blackketter Dean 2005-06-18 14:57:32 UTC
Please attach a sample file that exhibits this problem.  Thanks.
Comment 2 Jason Holtzapple 2005-06-20 07:25:35 UTC
Created attachment 556 [details]
mp3 with artist tag 'Infinity'
Comment 3 Jason Holtzapple 2005-06-20 07:28:51 UTC
I added a small mp3 attachment to the bug that exhibits the problem. Here is
some debug information. It looks like Artist isn't even making it this far:

2005-06-20 07:14:28.8571 New track for
file:///export/music/eval/tmp/infinity-artist.mp3
2005-06-20 07:14:28.8601 readTag was 1 for
file:///export/music/eval/tmp/infinity-artist.mp3
2005-06-20 07:14:28.8638 reading tags for:
file:///export/music/eval/tmp/infinity-artist.mp3
2005-06-20 07:14:28.9860 isFile(/export/music/eval/tmp/infinity-artist.mp3) == 1
2005-06-20 07:14:29.0094 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : TAG to 1
2005-06-20 07:14:29.0246 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : BLOCKALIGN to 1
2005-06-20 07:14:29.0404 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : TITLESORT to TEST INFINITY
2005-06-20 07:14:29.0579 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : TRACKNUM to 1
2005-06-20 07:14:29.0745 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : TITLE to Test-Infinity
2005-06-20 07:14:29.0796 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : VBR_SCALE to 78
2005-06-20 07:14:29.0832 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : SIZE to 8610
2005-06-20 07:14:29.0865 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : FS to 8192
2005-06-20 07:14:29.0903 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : YEAR to 2005
2005-06-20 07:14:29.0937 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : OFFSET to 1763
2005-06-20 07:14:29.1103 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : SECS to 0.57469387755102
2005-06-20 07:14:29.1131 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : CT to mp3
2005-06-20 07:14:29.1312 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : TAGVERSION to ID3v2.3.0
2005-06-20 07:14:29.1548 Adding
file:///export/music/eval/tmp/infinity-artist.mp3 : AGE to 1119276733
2005-06-20 07:14:29.1634 Adding file:///export/music/eval/tmp/infinity-artist.mp
3 : BITRATE to 119000
2005-06-20 07:14:29.3526 isFile(/export/music/eval/tmp/infinity-artist.mp3) == 1

However, just using MP3::Info::get_tags by hand seems to work:

$VAR1 = {
          'YEAR' => '2005',
          'ARTIST' => 'Infinity',
          'COMMENT' => 'EAC 0.95b2 / LAME v3.90.3 --alt-preset standard / mp3gain',
          'ALBUM' => 'Test-Infinity',
          'TITLE' => 'Test-Infinity',
          'GENRE' => '',
          'TRACKNUM' => '1',
          'TAGVERSION' => 'ID3v2.3.0'
        };

Hope this helps track it down a bit.
Comment 4 Jason Holtzapple 2005-06-20 16:00:33 UTC
I've tracked down where this is happening, but I don't have a fix.

In ContributorTrack.pm, line 90:

                        $artistObj = Slim::DataStores::DBI::Contributor->find_or_
create({
                                namesort => $sort,
                        });

Right before artistObj creation, $sort is normal ('INFINITY')

Inside DataModel.pm, line 729:

sub find_or_create { 
        my $class = shift;

        my $hash     = ref $_[0] eq "HASH" ? shift: {@_};
        my ($exists) = $class->_do_search("="  => $hash);
        return defined($exists) ? $exists : $class->_create($hash);
}

If you examine $class instead of 'INFINITY' it is now '0'.

I don't understand what's happening here, but I will keep investigating.
Comment 5 KDF 2005-08-09 13:07:52 UTC
sample provided seems to be working with in 6.2 svn 3909. can re-open if there
are any other examples.
Comment 6 Jason Holtzapple 2005-08-14 22:22:57 UTC
I still have this problem in 2005-08-14. Perhaps it is a perl version or
arch-specific issue?

my perl is: This is perl, v5.8.7 built for i386-netbsd

I can also try on a Solaris machine to see if it also has the problem.
Comment 7 Dan Sully 2005-08-27 13:18:18 UTC
Jason - what does your Solaris box do?
Comment 8 Jason Holtzapple 2005-08-27 15:38:00 UTC
I tried and Solaris 10/Sparc does not have this bug. It may be netbsd-specific.

Dan, my Solaris box is primarily a desktop machine. I run slimserver for our
house slimp3s and squeezeboxen on the netbsd file server, but can test with the
Solaris box when necessary.
Comment 9 Dan Sully 2005-08-27 17:30:14 UTC
That is really bizzare. Try rebuilding perl on the netbsd box perhaps? It definitely sounds like a netbsd 
specific problem.
Comment 10 Jason Holtzapple 2005-08-27 19:15:18 UTC
Yes, rebuilding perl should be part of the plan to figure this all out. I do
know that everything was OK during 6.0.x, but this may be a red herring as I
might have upgraded perl around that time as well.

My time to debug this has essentially dropped to almost zero (new job), but I do
intend to get to the bottom of it later or sooner.
Comment 11 Jason Holtzapple 2005-08-30 22:14:04 UTC
It turns out that this is a problem with perl 5.8.7 on NetBSD i386. Perl 5.8.6
doesn't have the issue.