acb.py icon indicating copy to clipboard operation
acb.py copied to clipboard

IndexError when using cue's ReferenceIndex

Open ksikou23 opened this issue 1 year ago • 1 comments

I was trying to extract some acb, awb files from theaterdays' assets. Almost all of acb, awb files can be eatracted, but several acb files can't. I attach some sample acb files which is not able to be extracted, and simplified codes.

These bad(?) acb files seem to be contain cues which access out of range index of syns.rows. So IndexError occurs when below code is executed at TrackList class's constructor in acb.py. r_data = syns.rows[row["ReferenceIndex"]]["ReferenceItems"]

I tried to add below codes before accessing syns.rows, at my fork repository. if row["ReferenceIndex"] >= len(syns.rows): continue In this situation, cues which have bad-index are ignored, but other cues which access in safe index are extracted. sample.zip

ksikou23 avatar May 07 '24 10:05 ksikou23