EOFException when using MoveMusic feature (potential patch attached).
Original issue 18 created by josephw on 2011-12-27T19:29:17.000Z:
What steps will reproduce the problem?
- Copy 'iTunes Library.itl' to c:\tmp
- 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
- 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.
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/InputRange.java:[21,8] duplicate class: org.kafsemo.titl.diag.InputRange [ERROR] /X:/itunes/titl-557e5a8b8e77/titl-core/src/main/java/org/kafsemo/titl/In putImpl.java:[27,8] org.kafsemo.titl.InputImpl is not abstract and does not over ride abstract method readUTF() in java.io.DataInput [ERROR] /X:/itunes/titl-557e5a8b8e77/titl-core/src/main/java/org/kafsemo/titl/Ra ndomizePlaylist.java:[269,26] method readHdsm in class org.kafsemo.titl.ParseLib rary cannot be applied to given types; [ERROR] required: java.io.DataInput,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
Hi, can you post the original patch in this issue? It's no longer available from Google Code.
+1
I cannot find any patch... is the repository dead?
@josephw Hi, can you provide the patch, or how to patch it manually? Thank you.
@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 https://web.archive.org/web/20121003061545/http://code.google.com/p/titl/issues/detail?id=18 but unfortunately, the attached patch is not (archived).
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 😁
@ressom Thanks! Although I don't use iTunes anymore 😄