titl icon indicating copy to clipboard operation
titl copied to clipboard

Problem in readInline method

Open artemgolubnichenko opened this issue 9 years ago • 3 comments

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)

artemgolubnichenko avatar Jul 08 '15 06:07 artemgolubnichenko

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)

cinabro avatar Nov 11 '15 21:11 cinabro

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

katterfelto avatar Mar 31 '16 19:03 katterfelto

Same here. Anyone got through that?

razum2um avatar Aug 21 '17 04:08 razum2um