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

Problem in readInline method #31

Open
artemgolubnichenko opened this issue Jul 8, 2015 · 3 comments
Open

Problem in readInline method #31

artemgolubnichenko opened this issue Jul 8, 2015 · 3 comments

Comments

@artemgolubnichenko
Copy link

I have empty ITL file from iTunes 12.2 Mac OS X, but library can't handle it:
java.io.IOException: Expected zero for inline HPtoDFM length (was 125521)
at org.kafsemo.titl.Hdfm.readInline(Hdfm.java:131)
at org.kafsemo.titl.ParseLibrary.drain(ParseLibrary.java:500)
at org.kafsemo.titl.ParseLibrary.parse(ParseLibrary.java:94)
at org.kafsemo.titl.ParseLibrary.parse(ParseLibrary.java:80)

@cinabro
Copy link

cinabro commented Nov 11, 2015

Same problem with a large iTunes itl:
Exception in thread "main" java.io.IOException: Expected zero for inline HDFM length (was 84258304)
at org.kafsemo.titl.Hdfm.readInline(Hdfm.java:131)
at org.kafsemo.titl.ParseLibrary.drain(ParseLibrary.java:500)
at org.kafsemo.titl.ParseLibrary.parse(ParseLibrary.java:94)
at org.kafsemo.titl.ParseLibrary.parse(ParseLibrary.java:80)
at org.kafsemo.titl.tools.ExportRatings.main(ExportRatings.java:44)

@katterfelto
Copy link

I have debugged this and think I have a idea whats going on. It does the following steps:
1 - Reads the first hdfm record (144 bytes)
2 - Decrypts and decompresses the remainder of the file
--- File Length set to 4403636
3 - Reads a hdsm record (96 bytes)
--- Remaining length 4403540
4 - Identifies a hdfm record (144 byte) the code expects the second integer to be zero but it gets 4403780 which seems to be the total deflated file length plus 144 for the initial hdfm record.

I can get past this but then things get out of sync later on :(

@razum2um
Copy link

Same here. Anyone got through that?

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

No branches or pull requests

4 participants