antangelo / xdvdfs

Original Xbox DVD Filesystem library and management tool
https://xiso.antangelo.com/
MIT License
80 stars 8 forks source link

Error: IOError: failed to fill whole buffer #65

Closed rizaumami closed 10 months ago

rizaumami commented 12 months ago

xdvdfs throw Error: Error: IOError: failed to fill whole buffer error when repack an already packed 'Teenage Mutant Ninja Turtles 3: Mutant Nightmare (USA).iso' xiso.

How to repro:

What's happens normally? xdvdfs will happily repack an already packed xiso.

~$ DEBUG_LOG=debug ./xdvdfs pack Teenage\ Mutant\ Ninja\ Turtles\ 3\ -\ Mutant\ Nightmare\ \(USA\).iso
Added dir: "/" at sector 33
Added file: "/TMNT3G.DAT" at sector 34
Added file: "/strbgm.vas" at sector 48
Added file: "/SdEffect.bin" at sector 164422
Added file: "/Movie" at sector 164433
Added file: "/default.xbe" at sector 164434
Added file: "/SeData.bin" at sector 166334
Added file: "/TMNT3AC.xbe" at sector 166337
Added file: "/TMNT3.DAT" at sector 167195
Added file: "/TMNT.DIR" at sector 330033
Added file: "/TMNT3AC.DAT" at sector 330034
Added file: "/TMNT3E.DAT" at sector 348164
Added file: "/TMNT3F.DAT" at sector 348222
Added file: "/VOICE0.BIN" at sector 348236
Added file: "/TMNT3S.DAT" at sector 355429
Added file: "/TMNT3I.DAT" at sector 355443
Added file: "/TrSeData.bin" at sector 355457
Added file: "/VOICE1.BIN" at sector 355492
Added file: "/WaveData.bin" at sector 359740
Added dir: "/Movie" at sector 164433
Added file: "/Movie/TMNT3V04.DAT" at sector 373728
Added file: "/Movie/TMNT3V02.DAT" at sector 496388
Added file: "/Movie/TMNT3V01.DAT" at sector 588981
Added file: "/Movie/TMNT3V00.DAT" at sector 705349
Added file: "/Movie/TMNT3V03.DAT" at sector 826695
Added file: "/Movie/TMNT3V06.DAT" at sector 934213
Error: IOError: failed to fill whole buffer
rizaumami commented 12 months ago

BTW, this pack and then repack the image is probably not a common use case. I'm writing a Bash script to manage my xiso and the input is in various forms.

On initial packing, which probably is the intended use case, xdvdfs has no problem and works like a charm.

Let me know if this is bug worthy or probably just ignore it and I just have to create a check logic in my script to avoid repacking an already packed xiso.

Thanx.

antangelo commented 11 months ago

What is the output of xdvdfs info on /Movie/TMNT3V06.DAT and what is the size of the input image file?

rizaumami commented 11 months ago
~$: xdvdfs info Teenage\ Mutant\ Ninja\ Turtles\ 3\ -\ Muta.iso /Movie/TMNT3V06.DAT
Name:                TMNT3V06.DAT
Offset:              106664
Left Child Offset:   None
Right Child Offset:  196 bytes
Data Location:       Sector 1048225 (243576832 bytes)
Attributes:          Archive

Input size:

~$: stat -c %s Teenage\ Mutant\ Ninja\ Turtles\ 3\ -\ Muta.iso 
2220883968