Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

josephw opened this issue Mar 13, 2015 · 8 comments


Copy link

josephw commented Mar 13, 2015

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 "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"
at Source)
at Source)
at org.kafsemo.titl.ProcessLibrary.process(
at org.kafsemo.titl.ProcessLibrary.process(

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 (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.

Copy link
Owner Author

josephw commented Mar 13, 2015

Comment #1 originally posted by josephw on 2014-11-18T19:12:34.000Z:

I'm having the exact same issue on Windwos and was finally able to apply your patch, but after doing so can no longer compile the project because I get the following error and I'm not smart enough to figure it out:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.
1:compile (default-compile) on project titl-core: Compilation failure: Compilati
on failure:
[ERROR] /X:/itunes/titl-557e5a8b8e77/titl-core/src/main/java/org/kafsemo/titl/di
ag/[21,8] duplicate class: org.kafsemo.titl.diag.InputRange
[ERROR] /X:/itunes/titl-557e5a8b8e77/titl-core/src/main/java/org/kafsemo/titl/In[27,8] org.kafsemo.titl.InputImpl is not abstract and does not over
ride abstract method readUTF() in
[ERROR] /X:/itunes/titl-557e5a8b8e77/titl-core/src/main/java/org/kafsemo/titl/Ra[269,26] method readHdsm in class org.kafsemo.titl.ParseLib
rary cannot be applied to given types;
[ERROR] required:,org.kafsemo.titl.Input,int
[ERROR] found: org.kafsemo.titl.Input,int
[ERROR] reason: actual and formal argument lists differ in length

Can anyone help? Thanks, Jonas

Copy link

willb commented Sep 2, 2015

Hi, can you post the original patch in this issue? It's no longer available from Google Code.

Copy link

antwan commented Oct 5, 2015


Copy link

I cannot find any patch... is the repository dead?

Copy link

narze commented May 14, 2017

@josephw Hi, can you provide the patch, or how to patch it manually? Thank you.

Copy link

daladim commented Jun 15, 2020

@josephw Up! Is there a way you could provide this patch so that we can test it?
I encounter the exact same error as the original poster.

This thread is archived on but unfortunately, the attached patch is not (archived).

Copy link

ressom commented Jun 16, 2020

Hey everyone. I'm the original patch maker. Through the magic of the internet and my ridiculous keeping of digital things, I am happy to provide the patch again. Please find it attached to this message.

I cannot provide any support for it as I have long since stopped being a Java developer...and well, it's nearly a decade ago 😁

Copy link

narze commented Jun 17, 2020

@ressom Thanks! Although I don't use iTunes anymore 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

7 participants