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]: Large file volume compression error issue CMultiVolumeOutStream #279

Open
1 task done
ywapple opened this issue Mar 4, 2025 · 1 comment
Open
1 task done
Assignees
Labels

Comments

@ywapple
Copy link

ywapple commented Mar 4, 2025

bit7z version

4.0.x

Compilation options

BIT7Z_AUTO_FORMAT, BIT7Z_PATH_SANITIZATION, BIT7Z_USE_NATIVE_STRING

7-zip version

v23.01

7-zip shared library used

7z.dll / 7z.so

Compilers

MSVC

Compiler versions

vs2022

Architecture

x86

Operating system

Windows

Operating system versions

windows11

Bug description

Scenario: Compressing a folder consisting of a large number of small files (over 15GB in size) into volumes ranging from 20MB to 4481MB will result in the deletion of the first volume package when compressing to the second file
Then it leads to an exception:
void BitOutputArchive::compressOut( ....
{
const HRESULT result = outArc->UpdateItems( outStream, itemsCount(), updateCallback );
//result = HRESULT_FROM_WIN32(ERROR_FILE_EXISTS)
}
If the file I need to compress is relatively small or a single large file (the calculation speed should be fast), I won't have this problem
I found that the principle in CMultiVolumeOutStream during debugging is:

  1. Advance CMultiVolumeOutStream::Write to generate multiple compressed files of 001-0.. and check if there is enough space
    2.CMultiVolumeOutStream:: SetSize and delete the pre generated volume files
  2. Then CMultiVolumeOutStream: Write started compression in progress
    The scenario I described above is that CMultiVolumeOutStream was not called: Write to pre generate a compressed file of volumes
    After compressing the first volume directly, call CMultiVolumeOutStream at. 001: Settize deleted the first volume 001, resulting in an exception failure
    Could you please help me deal with this situation by right clicking on the emergency button? Can you guide me to modify the code there?

Steps to reproduce

No response

Expected behavior

No response

Relevant compilation output

Code of Conduct

@rikyoz
Copy link
Owner

rikyoz commented Mar 5, 2025

Hi!

Scenario: Compressing a folder consisting of a large number of small files (over 15GB in size) into volumes ranging from 20MB to 4481MB will result in the deletion of the first volume package when compressing to the second file

Sorry, the scenario you're describing is not entirely clear to me.
Are you trying to compress to a multivolume archive, but bit7z fails when it tries to write to the second volume?

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

No branches or pull requests

2 participants