divelogs download fails

Robert Helling helling at atdotde.de
Wed Aug 1 07:04:11 PDT 2018


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.

Best
Robert



--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics
                      Scientific Coordinator
                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik
                      Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339
                      http://www.atdotde.de

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515  BB44 0820 367C 36BC 0C1D    and
DCED 37B6 251C 7861 270D  5613 95C7 9D32 9A8D 9B8F





-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 528 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20180801/59b953fd/attachment.sig>


More information about the subsurface mailing list