problems adding to music database (1 Viewer)

bo.morville

Portal Member
January 13, 2008
12
1
Home Country
Denmark Denmark
TV-Server Version: 1.0.1
MediaPortal Version: 1.0.1
MediaPortal Skin: Bluewide3
Windows Version: Vista Ultimate SP1
CPU Type: AMD 4850e
HDD: western digital 500 GB Green Power
Memory: 2GB Kingston
Motherboard:
Video Card: ATI 3650
Video Card Driver: Sound Card: Catalyst 09.4
Sound Card AC3: Builtin
Sound Card Driver:
1. TV Card: FireDTV
1. TV Card Type: DVB-C
1. TV Card Driver:
2. TV Card: FireDTV
2. TV Card Type: DVB-C
2. TV Card Driver:
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec: PowerDVD
MPEG2 Audio Codec: AC3 filter
h.264 Video Codec: PowerDVD
Satelite/CableTV Provider: Yousee
HTPC Case: HFX Mini
Cooling: builtin
Power Supply: builtin
Remote: MCE
TV: Samsung 40"
TV - HTPC Connection: HDMI

I am unable to update my music database. It scans for files, but then stops when it should be adding new files to the database.

The logs (attached) shows the following errors:

2009-04-16 19:39:14.758000 [Info.][Config Main]: Musicdatabasereorg: Beginning music database reorganization...
2009-04-16 19:39:14.763000 [Info.][Config Main]: Musicdatabasereorg: Last import done at 01-01-0001 00:00:00
2009-04-16 19:39:14.791000 [Info.][Config Main]: Musicdatabasereorg: CleanupForeignKeys completed
2009-04-16 19:39:14.898000 [Info.][Config Main]: Musicdatabasereorg: starting song cleanup for 10593 songs
2009-04-16 19:39:55.471000 [Info.][Config Main]: Musicdatabasereorg: DeleteNonExistingSongs completed. Removed 0 non-existing songs
2009-04-16 19:40:55.341000 [Info.][Config Main]: Musicdatabasereorg: Found 43686 files.
2009-04-16 19:40:55.346000 [Info.][Config Main]: Musicdatabasereorg: Now check for new / updated files.
2009-04-16 19:41:01.823000 [Info.][Config Main]: Musicdatabasereorg: Unhandled error Length cannot be less than zero.
Parameter name: length - scan aborted!
mscorlib
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at MediaPortal.TagReader.CueSheet.ParseCue(String[] file)
at MediaPortal.TagReader.CueSheet.ReadCueSheet(String filename, Encoding encoding)
at MediaPortal.TagReader.CueSheet..ctor(String cuefilename)
at MediaPortal.TagReader.CueUtil.CUEFileListFilter[T](IList`1 fileList, ICueTrackFileBuilder`1 builder)
at MediaPortal.TagReader.CueUtil.CUEFileListFilterList[T](IList`1 fileList, ICueTrackFileBuilder`1 builder)
at MediaPortal.Music.Database.MusicDatabase.GetAndAddOrUpdateFiles(Boolean aCheckForNewFiles, Boolean aExcludeHiddenFiles, Int32 StartProgress, Int32 EndProgress, Int32& fileCount)
at MediaPortal.Music.Database.MusicDatabase.MusicDatabaseReorg(ArrayList shares, MusicDatabaseSettings setting)
2009-04-16 19:41:01.827000 [ERROR][Config Main]: Musicdatabasereorg: Unhandled error Length cannot be less than zero.
Parameter name: length - scan aborted!
mscorlib
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at MediaPortal.TagReader.CueSheet.ParseCue(String[] file)
at MediaPortal.TagReader.CueSheet.ReadCueSheet(String filename, Encoding encoding)
at MediaPortal.TagReader.CueSheet..ctor(String cuefilename)
at MediaPortal.TagReader.CueUtil.CUEFileListFilter[T](IList`1 fileList, ICueTrackFileBuilder`1 builder)
at MediaPortal.TagReader.CueUtil.CUEFileListFilterList[T](IList`1 fileList, ICueTrackFileBuilder`1 builder)
at MediaPortal.Music.Database.MusicDatabase.GetAndAddOrUpdateFiles(Boolean aCheckForNewFiles, Boolean aExcludeHiddenFiles, Int32 StartProgress, Int32 EndProgress, Int32& fileCount)
at MediaPortal.Music.Database.MusicDatabase.MusicDatabaseReorg(ArrayList shares, MusicDatabaseSettings setting)
2009-04-16 19:41:01.876000 [Debug][Config Main]: MusicDatabase: Commit will effect 0 rows
2009-04-16 19:41:03.543000 [Info.][Config Main]: Musicdatabasereorg: Compress completed
2009-04-16 19:41:03.548000 [Info.][Config Main]: Musicdatabasereorg: Music database reorganization done. Processed 0 tracks in: 00:01:48

Any input as to how to get scanning to work (or how to add files to the database in a different way)?
 

HTPCSourcer

Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,336
    Home Country
    Germany Germany
    Any input as to how to get scanning to work (or how to add files to the database in a different way)?
    Hello morville,

    Maybe one song file is corrupted. It appears that there is at least one file with incorrect header information that leads MP to read negative lenght values in one or more fields.

    To test this hypothesis you could copy just a few files to a different directory, change the music folder to this new directory and run the database scan once again. If things work, you will "simply" need" to find the corrupt file. For example by moving subfolders from one directory to the other by the dozen or hundreds.

    You can also use some small tools such as MP3TEST to check your music files, however, I have no personal experience with such software since I never experienced any problems like this.

    Regards, HTPC_Sourcer
     

    bo.morville

    Portal Member
    January 13, 2008
    12
    1
    Home Country
    Denmark Denmark
    hi HTPC_Sourcer

    You may be on to something regarding one or more files being corrupt. I don't understand why though, as the files were working flawlessly on an old MediaPortal 1.0 installation.

    Strangely I seem to be able to add some files, but when I add more, it crashes again. More testing seems to be required on my part unless someone has a solution.

    Testing more than 43000 music files is however going to be a crappy task...
     

    bo.morville

    Portal Member
    January 13, 2008
    12
    1
    Home Country
    Denmark Denmark
    Further testing seems to show that it is the cue files and related music files that are the problem. Or at least I was able to add my flac files after removing those folders and files containing cue files. So it seems that all that remains for me now is to ensure that no cue files are needed to playback my music collection.

    That is not as big a task as checking the entire music collection.

    Thanks for all the help so far.

    Regards,
    Bo
     

    rtv

    Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    Did you notice anything specific? E.g. are only some flac files affected?

    Testing more than 43000 music files is however going to be a crappy task...

    Try MP3val - home page

    You do need to search and delete the automatic backups that are produced, but that does not take long using the correct parameters.
    MPTagThat can fix "broken" MP3s as well ;)
     

    bo.morville

    Portal Member
    January 13, 2008
    12
    1
    Home Country
    Denmark Denmark
    I did a quick scan of my flac collection checking for cue files - and moved albums with cue files out of the directory added to the music database. After this all flac files were added without problems. I know that - at least some of - the cue files work using foobar, but I am going to have to test more to see if it is cue files in general there causes problems.

    But for now I am able to get most of my music added to the database, and that is acceptable untill I have more time on my hands.

    I will report here if I find that cue files in general causes problems.
     

    Users who are viewing this thread

    Top Bottom