rvmparser
rvmparser copied to clipboard
Failed to parse 3.rvm: After chunk HEAD, expected offset 0xcc, current offset is 0xac
I seem to be having a big problem parsing the rvm header.
It‘s error content is: Failed to parse ./../rvm/3.rvm: After chunk HEAD, expected offset 0xcc, current offset is 0xac
hexdump file is:
Correct example file hexdump is:
some code like this,I just add some print test code:
The result of parse 3.rvm is as follows:
The correct result of parse 6.rvm is as follows:
How can I fix this problem to fit ’3.rvm‘. I have a lot of rvm files here that have the same problem with ’3.rvm‘.
Dunno if this is any help But I made a tool to myself to split rvm files before using them with RVM parser. One per SITE. Due to memory issues in azure when converting files.
https://github.com/vegarringdal/rvmsplitter
It just copies the header to each file, but you can look on the part that adds next chuck in BIG endian and make it fix actual header too.
From a quick look, it looks like the first file has encoding (stored after the user name), but the second file has not.
However, both files have head chunk version 1 (offset 0x28). Until now I only have seen encoding present in version 2 of the head chunk, and I test for that (see line 126 in ParserRVM.cpp).
If you can compile it yourself, you can try:
curr_ptr = base_ptr + expected_next_chunk_offset;
if (!verifyOffset(ctx, "HEAD", base_ptr, curr_ptr, expected_next_chunk_offset)) return nullptr;
at line 133 to skip this test and just use the expected end.
Is this just a single file or does it happen often?
There are many such files, and the rvm file provided by the design institute is based on the export of the same software. Here are some files we can see: https://qwq2x.com/share/1.rvm https://qwq2x.com/share/2.rvm https://qwq2x.com/share/3.rvm