divelogs download fails

Dirk Hohndel dirk at hohndel.org
Wed Aug 1 20:37:12 PDT 2018


> On Aug 1, 2018, at 7:04 AM, Robert Helling <helling at atdotde.de> wrote:
> 
> Hi,
> 
>> On 1. Aug 2018, at 09:26, Miika Turkia <miika.turkia at gmail.com> wrote:
>> 
>> We have received the same/similar error report. https://github.com/Subsurface-divelog/subsurface/issues/1534
>> 
>> At least my current understanding is that this is Mac specific, and thus I cannot debug it at all. However, if it still works with 4.8.0 and does not work with 4.8.1, then the probelm should be on Subsurface side. If I am not entirely mistaken, there has been some changes in both codebase/libraries and the tooling that is used to produce the binaries for Mac. So could be either one causing the issue.
>> 
> 
> I can reproduce this with the official 4.8.1 binary but not with what can build from current master on my Mac.
> 
> From the error message it appears the problem is that around lines 888pp of subsurfacewebservices.cpp
> 
> #if defined(Q_OS_UNIX) && defined(LIBZIP_VERSION_MAJOR)
> 	int duppedfd = dup(zipFile.handle());
> 	struct zip *zip = NULL;
> 	if (duppedfd >= 0) {
> 		zip = zip_fdopen(duppedfd, 0, &errorcode);
> 		if (!zip)
> 			::close(duppedfd);
> 	} else {
> 		QMessageBox::critical(this, tr("Problem with download"),
> 				      tr("The archive could not be opened:\n"));
> 		return;
> 	}
> #else
> 	struct zip *zip = zip_open(QFile::encodeName(zipFile.fileName()), 0, &errorcode);
> #endif
> 	if (!zip) {
> 		char buf[512];
> 		zip_error_to_str(buf, sizeof(buf), errorcode, errno);
> 		QMessageBox::critical(this, tr("Corrupted download"),
> 				      tr("The archive could not be opened:\n%1").arg(QString::fromLocal8Bit(buf)));
> 		zipFile.close();
> 		return;
> 	}
> 
> zip_open() in the else clause fails. This sounds like a libzip (possibly packaging) problem.
> 

Hmm. The official app is built on this computer - and it uses the "right" libzip. But as we all expected,
I can reproduce the problem. Haven't figured out what causes it, but at least I have a good starting
point where to look.

Thanks, Robert and Rainer.

/D



More information about the subsurface mailing list