Random decompression errors #182
-
|
I may encounter "Cannot read file entry: 参数错误。" (from ex.what()) when decompressing on other computer. Trying to get the HRESULT value, the print shows: But I use NUnit on my own computer, call my C++ DLL from C#, and decompress it 10,000 times without encountering an error. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
The |
Beta Was this translation helpful? Give feedback.

The
-2147024809error code corresponds to theE_INVALIDARGHRESULT error (0x80070057in hex, https://learn.microsoft.com/en-us/windows/win32/seccrypto/common-hresult-values).This same error happens due to the issue #181, so you may be experiencing it too.
If this is the case, the problem is due to an old bug in MSVC's std::filesystem, which was fixed only in the latest versions of the compiler.
One possible workaround that I proposed is to use the new
BIT7Z_DISABLE_USE_STD_FILESYSTEMCMake option provided in thehotfix/v4.0.5branch, as it makes bit7z avoid using std::filesystem altogether.