Bug 2359 - SlimServer 6.2.0 crashes when trying to build database
: SlimServer 6.2.0 crashes when trying to build database
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 6.2.0
: PC RedHat Linux
: P2 major (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-24 21:36 UTC by Dave McGaugh
Modified: 2008-09-15 14:37 UTC (History)
0 users

See Also:
Category: ---


Attachments
output from slimserver.pl --d_scan (7.16 MB, text/plain)
2005-10-24 22:08 UTC, Dave McGaugh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave McGaugh 2005-10-24 21:36:18 UTC
SlimServer 6.2.0 crashes with the following error:
Slim::DataStores::DBI::Album can't SELECT id, title, titlesort, contributor, compilation, year, 
artwork_path, disc, discc, musicmagic_mixable
FROM   albums
WHERE  compilation = ? AND disc = ? AND title = ?
: Cannot call execute with a reference (ARRAY(0xaaeb388))
 at /usr/local/slimserver/Slim/DataStores/DBI/DBIStore.pm line 1543

When scanning database (either with clear and rescan, or normal rescan)

Tried turning on scan debugs, but I loose debug state when crash occurs. The above error was 
observed by running slimserver.pl from the command line...
Comment 1 Dan Sully 2005-10-24 21:39:37 UTC
Can you run with --d_scan to see which file it's crashing on?

And upload that to this bug?

If you feel comfortable editing perl - can you add this at line 1452?

print Data::Dumper::Dumper($search);

and run from the command line?

Thanks.
Comment 2 Dave McGaugh 2005-10-24 22:08:57 UTC
Created attachment 938 [details]
output from slimserver.pl --d_scan

I assume you wanted the Data::Dumper string added to slimserver.pl, line 1452
(i.e. the end of the script)...

I have attached the output of slimserver.pl --d_scan with the Data::Dumper
string added.

Also, after browsing over DBIStore.pm, in and around line 1543, I have an idea
what might be causing it. My library consists exclusively of FLACs. I have been
using the "COMPILATION" tag for some time now, but rather than defining the tag
for compilations and not-defining it for non-compilations, I use a
"COMPILATION=0" or "COMPILATION=1" style. Not sure if its choking on my
COMPILATION tags that are defined but of no value, i.e. 0.
Comment 3 Dan Sully 2005-10-24 22:13:18 UTC
Dave - actually add the Data::Dumper line to DBIStore.pm at 1452

The COMPILATION=1|0 should be fine.

Could you perhaps upload the first couple of Kbytes of the file:

file:///export/share/music/albums.hi-fi/The%20Duhks%20-%20The%20Duhks/02.%20The%20Duhks%20-
%20Mists%20of%20Down%20Below.flac ?
Comment 4 Dave McGaugh 2005-10-24 22:39:14 UTC
Hah! I think I found it. I had the "COMPILATION=0" tag defined twice for all the FLACs which are part of 
The Duhks album. After removing both and resetting the tag (only once this time), the DB scan runs 
successfully past that album.

It then crashed again (further along this time) on another album where I had the COMPILATION tag set 
twice (not sure how I managed this), so this is definitely reproduceable.

* Before fixing:
METADATA block #2
  type: 4 (VORBIS_COMMENT)
  is last: false
  length: 263
  vendor string: reference libFLAC 1.1.2 20050205
  comments: 10
    comment[0]: ARTIST=Wanda Jackson
    comment[1]: ALBUM=Rockin' with Wanda
    comment[2]: DISCNUMBER=1/1
    comment[3]: GENRE=Country
    comment[4]: TITLE=Rock Your Baby
    comment[5]: TRACKNUMBER=1/18
    comment[6]: DATE=1960
    comment[7]: COMPILATION=0
    comment[8]: COMMENT=Extracted from CD with CDparanoia
    comment[9]: COMPILATION=0

* After fixing:
METADATA block #2
  type: 4 (VORBIS_COMMENT)
  is last: false
  length: 246
  vendor string: reference libFLAC 1.1.2 20050205
  comments: 9
    comment[0]: ARTIST=Wanda Jackson
    comment[1]: ALBUM=Rockin' with Wanda
    comment[2]: DISCNUMBER=1/1
    comment[3]: GENRE=Country
    comment[4]: TITLE=Rock Your Baby
    comment[5]: TRACKNUMBER=1/18
    comment[6]: DATE=1960
    comment[7]: COMMENT=Extracted from CD with CDparanoia
    comment[8]: COMPILATION=0

I can still add the Data::Dumper line if you want, but since everything is working now, it probably won't 
give you any interesting information?

So... I'm not sure if this would actually be considered a bug since I shouldn't have had the 
COMPILATION tag set multiple times to begin with. :)

Comment 5 Dan Sully 2005-10-25 10:26:39 UTC
Change 4766 catches the error. Thanks.