Skip to content

EOFException when using MoveMusic feature (potential patch attached). #18

@josephw

Description

@josephw

Original issue 18 created by josephw on 2011-12-27T19:29:17.000Z:

What steps will reproduce the problem?

  1. Copy 'iTunes Library.itl' to c:\tmp
  2. Execute command line: java -cp titl-core-0.3-SNAPSHOT.jar org.kafsemo.titl.tools.MoveMusic "C:\tmp\iTunes Library.itl" "C:\Documents and Settings<USER_NAME>\My Documents\My Music\iTunes" C:\Users<USER_NAME>\Music\iTunes
  3. Processes over 1600 entries, but fails with exception noted below.

What is the expected output? What do you see instead?

Expected: MoveMusic invocation to complete without error.
Actual: EOFException with following stack trace:

Exception in thread "main" java.io.EOFException
at java.io.DataInputStream.readFully(Unknown Source)
at java.io.DataInputStream.readFully(Unknown Source)
at org.kafsemo.titl.ProcessLibrary.process(ProcessLibrary.java:112)
at org.kafsemo.titl.ProcessLibrary.process(ProcessLibrary.java:60)
at org.kafsemo.titl.tools.MoveMusic.main(MoveMusic.java:137)


What version of the product are you using? On what operating system?

iTunes Library version 10.5.2 (also have copy @ version 8.2.1)
iTunes software version 10.5.2.11 (64 bit)
Windows 7 (Professional 64bit)
JDK 1.6.0_22
titl 0.3 (checked out from repository and built library using maven integration of IntelliJ)


Please provide any additional information below.

I have been attempting to move my iTunes library from a WinXP x64 installation to a Win 7 x64 installation. Hence the two different style user home paths.

I have tried converting the iTunes library using both an 8.2.1 version and the 10.5.2 version with the same exception result.

10.5.2 version was generated/converted by iTunes from the 8.2.1 version.

I believe the root cause of the exception is an unexpected hdsm record form.

I have attached a .png screen cap highlighting the troublesome hdsm record.

Note how the (usual) Length indicator is 0x60 (96 bytes) and Block Type is 0x03.

The interesting 4 bytes between Length and Block Type seem to be an 'extended length' indication.

The value 0x0120 (288 bytes) is exactly the length of the current hdsm record (up to the next hdsm record, a Block Type 4 record).

I have obfuscated the extended data in the screen cap as I do not know if it is personally sensitive information (e.g. username/password/other security token).

If you need a copy of my 'iTunes Library.itl' files, I would be happy to send them direct via a secured method.

The net result of this discovery is the attached .patch file. I am a Java developer by trade and I was able to come up with
a potential solution to this hdsm/block type 3 condition.

The .patch is somewhat messy, but the details of changes can be found in the patch_summary.txt attachment.

With the changes applied, I was able to convert my iTunes library file and successfully open it with iTunes 10.5.2.

With the patch applied, everything seems to be working as expected.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions