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

error reading source ISO: failed to fill whole buffer #22

Open
pig1800 opened this issue Oct 13, 2024 · 8 comments
Open

error reading source ISO: failed to fill whole buffer #22

pig1800 opened this issue Oct 13, 2024 · 8 comments
Assignees

Comments

@pig1800
Copy link

pig1800 commented Oct 13, 2024

There are certain ISOs cannot be read by the program, not even just read the metadata.
In my 42 games collection, there are 2 games have this problem with following output:

extracting ISO metadata
Error: error reading source ISO

Caused by:
    failed to fill whole buffer

Games that trigger this behavior in my collection is:
Armored Core 4 (Asia ver. with JP/KR language)
Resident Evil ORC (US/EU ver.)

@iliazeus
Copy link
Owner

What version are you using? Can you please try it on both v1.7.0 and v1.6.0 and tell if any of those works?

@iliazeus iliazeus self-assigned this Oct 14, 2024
@pig1800
Copy link
Author

pig1800 commented Oct 14, 2024 via email

@iliazeus
Copy link
Owner

I have a hunch on what might be causing this. Can you please also check if this version works for you?

@pig1800
Copy link
Author

pig1800 commented Oct 14, 2024 via email

@pig1800
Copy link
Author

pig1800 commented Oct 14, 2024

Nope, still having same issue.

@iliazeus
Copy link
Owner

Can you please retry with the environment variable RUST_BACKTRACE=1?

That is, for Linux and MacOS, run RUST_BACKTRACE=1 iso2god <your args here>; for Windows, run set RUST_BACKTRACE=1, and then run iso2god.

@pig1800
Copy link
Author

pig1800 commented Oct 15, 2024

Tried but I don't think it helps...

extracting ISO metadata
Error: error reading source ISO

Caused by:
    failed to fill whole buffer

Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>

@astarivi
Copy link
Contributor

astarivi commented Nov 4, 2024

I was able to reproduce the issue with both games on v1.7.1, the backtrace points to directory_table.rs L91, when the reader position is 7282125053952 it reaches an UnexpectedEof. Before this happens, the decoded filenames become mangled:

level_uss_07_textures.ssg

Ke�
�



rkins_labstringsminimap_bio_birkins_labminimap_1minimap/minimap_birkins_lab_01.pngminimap_2minimap
s_lab_02.pngminimap_3minimap/minimap_birkins_lab_03.pngminimap_4minimap/minimap_birkins_lab_04.pngminimap
imap_birkins_lab_05.pngminimap_6minimap/minimap_birkins_lab_06.pngminimap_7minimap/minimap_birkins_lab_07.
ner12.2mapOriginText <------ origin    �i�+��ʈ�R��L��ʈ�



��L��ʈ����
P���s�R��L
B�
}���*��R��L��ʈ�����

Y�͌R��L��ʈ����
�m�i��R��L��ʈ�����
��8�'�R��L��ʈ��{�
1�3T'�
 �Iy'-Rk��i�_�I�$(i���y�����@�r0~�tCvO�ER�g�^��w�Ho�R�����ݦ�CCUL
%��_�
�C�>��j-kK8���|
,��9̊�1�H�c
ݽ����RZ��C!R��X´F�#��I�>���e�֦*� �ǹ��h�t�&��P�#��0��|@J�
�Z���%Pϓ�����>  "���x���~�D����u�ꠗi�e��#2����ƤݿJvQ3(��`�[����x��        �Q�]�4��� �⸮���Ĉ��U
l#>��]޵�G�(z�!I!�$
{�RƲ����x���m%����

Backtrace:

Stack backtrace:
   0: std::backtrace_rs::backtrace::dbghelp64::trace
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
   1: std::backtrace_rs::backtrace::trace_unsynchronized
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2: std::backtrace::Backtrace::create
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library\std\src\backtrace.rs:331
   3: std::backtrace::Backtrace::capture
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library\std\src\backtrace.rs:296
   4: anyhow::error::impl$1::from<std::io::error::Error>
             at E:\Program Files\Rust\registry\src\index.crates.io-6f17d22bba15001f\anyhow-1.0.89\src\backtrace.rs:27
   5: core::result::impl$27::from_residual<enum2$<core::option::Option<iso2god::iso::directory_table::DirectoryEntry> >,std::io::error::Error,anyhow::Error>
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c\library\core\src\result.rs:1989
   6: iso2god::iso::directory_table::DirectoryEntry::read<ref_mut$<std::fs::File> >
             at .\src\iso\directory_table.rs:91
   7: iso2god::iso::directory_table::DirectoryTable::read<ref_mut$<std::fs::File> >
             at .\src\iso\directory_table.rs:67
   8: iso2god::iso::directory_table::DirectoryEntry::read<ref_mut$<std::fs::File> >
             at .\src\iso\directory_table.rs:115
   9: iso2god::iso::directory_table::DirectoryTable::read<ref_mut$<std::fs::File> >
             at .\src\iso\directory_table.rs:67
  10: iso2god::iso::directory_table::DirectoryEntry::read<ref_mut$<std::fs::File> >
             at .\src\iso\directory_table.rs:115
  11: iso2god::iso::directory_table::DirectoryTable::read<ref_mut$<std::fs::File> >
             at .\src\iso\directory_table.rs:67
  12: iso2god::iso::directory_table::DirectoryEntry::read<ref_mut$<std::fs::File> >
             at .\src\iso\directory_table.rs:115
  13: iso2god::iso::directory_table::DirectoryTable::read<ref_mut$<std::fs::File> >
             at .\src\iso\directory_table.rs:67
  14: iso2god::iso::directory_table::DirectoryEntry::read<ref_mut$<std::fs::File> >
             at .\src\iso\directory_table.rs:115
  15: iso2god::iso::directory_table::DirectoryTable::read<ref_mut$<std::fs::File> >
             at .\src\iso\directory_table.rs:67
  16: iso2god::iso::directory_table::DirectoryEntry::read<ref_mut$<std::fs::File> >
             at .\src\iso\directory_table.rs:115
  17: iso2god::iso::directory_table::DirectoryTable::read<ref_mut$<std::fs::File> >
             at .\src\iso\directory_table.rs:67
  18: iso2god::iso::directory_table::DirectoryTable::read_root<ref_mut$<std::fs::File> >
             at .\src\iso\directory_table.rs:45
  19: iso2god::iso::IsoReader<std::fs::File>::read<std::fs::File>
             at .\src\iso\mod.rs:23
  20: iso2god::main
             at .\src\bin\iso2god.rs:69
  21: core::ops::function::FnOnce::call_once<enum2$<core::result::Result<tuple$<>,anyhow::Error> > (*)(),tuple$<> >
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c\library\core\src\ops\function.rs:250
  22: std::sys::backtrace::__rust_begin_short_backtrace<enum2$<core::result::Result<tuple$<>,anyhow::Error> > (*)(),enum2$<core::result::Result<tuple$<>,anyhow::Error> > >
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c\library\std\src\sys\backtrace.rs:152
  23: std::rt::lang_start::closure$0<enum2$<core::result::Result<tuple$<>,anyhow::Error> > >
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c\library\std\src\rt.rs:162
  24: std::rt::lang_start_internal::closure$2
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library\std\src\rt.rs:141
  25: std::panicking::try::do_call
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library\std\src\panicking.rs:557
  26: std::panicking::try
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library\std\src\panicking.rs:521
  27: std::panic::catch_unwind
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library\std\src\panic.rs:350
  28: std::rt::lang_start_internal
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library\std\src\rt.rs:141
  29: std::rt::lang_start<enum2$<core::result::Result<tuple$<>,anyhow::Error> > >
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c\library\std\src\rt.rs:161
  30: main
  31: invoke_main
             at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  32: __scrt_common_main_seh
             at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  33: BaseThreadInitThunk
  34: RtlUserThreadStart

The source iso is XGD2, and it successfully extracts on both extract-xiso and xdvdfs. Rebuilt images also seem to work fine, so it has to be an issue with decoding the full (Redump verified) image.

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

3 participants