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

[Bug]: Split Error #161

Open
1 task done
psvajaz opened this issue Aug 7, 2023 · 5 comments
Open
1 task done

[Bug]: Split Error #161

psvajaz opened this issue Aug 7, 2023 · 5 comments

Comments

@psvajaz
Copy link

psvajaz commented Aug 7, 2023

bit7z version

4.0.x RC

Compilation options

BIT7Z_AUTO_FORMAT, BIT7Z_USE_NATIVE_STRING

7-zip version

v22.01

7-zip shared library used

7z.dll / 7z.so

Compilers

MSVC

Compiler versions

MSVC2017

Architecture

x86_64

Operating system

Windows

Operating system versions

Windows7 or last

Bug description

If there is an exception in compressing a volume or compressing a package, there will be an exception during the preview process, as the code 'const noexception' has been added to the exception code, resulting in external failure to capture exception information properly
image

Steps to reproduce

No response

Expected behavior

No response

Relevant compilation output

No response

Code of Conduct

@rikyoz
Copy link
Owner

rikyoz commented Aug 7, 2023

Hi!
This is strange! Could you please provide the full stack trace of the error?
Thanks in advance!

@psvajaz
Copy link
Author

psvajaz commented Aug 8, 2023

This is caused by an abnormal environment. When the volume compression (any compression tool) is set to ZIP, the compression program unexpectedly exits, and the compressed files retained on the hard drive may experience this situation during preview execution.
Due to the compressed files provided by users, there may be various situations. Should error information be provided when unrecognized. Otherwise, there will be a program crash

image

@rikyoz
Copy link
Owner

rikyoz commented Aug 8, 2023

Thanks for the details!

I am having some difficulties in trying to replicate the problem.
Just to be sure that I correctly understand it:

  • You create a multi-volume/split ZIP archive using any compression tool (e.g., 7z.exe).
  • For some reason, the tool unexpectedly exits before finishing the compression operation, leaving either some missing volumes or possibly some damaged/incomplete volume files.
  • When you try to read the (incomplete/damaged) multi-volume archive using bit7z, you have that unexpected exception.

Did I understand it correctly?

This is strange. In all my attempts at replicating the issue, bit7z correctly reported some data errors while previewing the archive. But I'm probably missing some detail.

The stack trace you provided is even stranger. The operator == of BitInFormat is const noexcept simply because... It should not throw any exception in typical situations and doesn't modify the member variables.
The fact that this is nullptr is even stranger since the operator should have been called on two valid references, not on two pointers.
I'll need to investigate the issue even further.

It would be handy if you could send me the code snippet you're using and, possibly, the multi-volume archive files giving you the issue. If you can't send the latter, don't worry, I understand!

Also, since I recently made some small changes to the format detection code, you might want to test out bit7z from the v4.0.0 branch. Maybe it doesn't have the same issue.

I really appreciate any help you can provide. 🙏

@psvajaz
Copy link
Author

psvajaz commented Aug 10, 2023

During the testing process, it was found that if the number of volumes exceeds 8188, an error will occur and the compressed volumes will remain on the disk. When using the program to preview and decompress, this exception will occur

@rikyoz
Copy link
Owner

rikyoz commented Aug 12, 2023

if the number of volumes exceeds 8188, an error will occur.

Yeah, I will work on a fix for this limit, but not in the stable version v4.0.

When using the program to preview and decompress, this exception will occur

This is strange, because an exception should occur, but it should be a "normal" BitException due to a data error. How many files are compressed in the multi-volume archive? What kind of files are they? And how big are they?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants