You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue when I try to close a zip.
I am downloading and caching files to a std::map. When a certain number of bytes have been downloaded. There is a thread that is launched to process files, adding them in the zip and closing the zip after.
Here is the code I am using :
if (totalTempSize > 5000000)
{
for (auto it : Archives)
{
libzippp::ZipArchive z1(it.first);
z1.setErrorHandlerCallback([](const std::string& message,
const std::string& strerror,
int zip_error_code,
int system_error_code)
{
// Handle error hereMessageBoxA(NULL, message.c_str(), strerror.c_str(), 0);
});
if (z1.open(libzippp::ZipArchive::Write))
{
z1.setCompressionMethod(STORE);
for (auto it2 : it.second)
{
totalTempSize -= it2.second.size();
z1.addData(it2.first, it2.second.data(), it2.second.size());
}
z1.close();
it.second.clear();
}
}
}
Randomly, at some moment. The program ends up crashing.
I also checked the zip format and see if there is any problem on it. I couldn't find any.
Is there something I can. I have been struggling for days on this.
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
I have an issue when I try to close a zip.
I am downloading and caching files to a std::map. When a certain number of bytes have been downloaded. There is a thread that is launched to process files, adding them in the zip and closing the zip after.
Here is the code I am using :
Randomly, at some moment. The program ends up crashing.
I also checked the zip format and see if there is any problem on it. I couldn't find any.
Is there something I can. I have been struggling for days on this.
Thanks
The text was updated successfully, but these errors were encountered: