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

Failure to properly unzip online content with zlib 1.2.4 #3753

Closed
DorpsGek opened this issue Apr 10, 2010 · 8 comments
Closed

Failure to properly unzip online content with zlib 1.2.4 #3753

DorpsGek opened this issue Apr 10, 2010 · 8 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

planetmaker opened the ticket and wrote:

With an update of zlib to version 1.2.4 the extraction of the downloaded gzip files from the online content results in truncated tars.

When I use version 1.2.3_3 everything works as expected and as usual.

I'm not entirely sure whether this is an OSX - specific thing or a general issue; but as switching the library changes it, I suspect that it might be reproducable on other OS, too.

Also I'm not sure one needs to draw any consequences on OpenTTD's side for now, but it's definitely worth being noted that it can fail with the wrong zlib version; maybe some lib usage needs updating as since December 2009 there have been a number of updates to zlib.

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/3753
@DorpsGek
Copy link
Member Author

planetmaker wrote:

EDIT: zlib 1.2.3.4 is also fine.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3753#comment7830

@DorpsGek
Copy link
Member Author

SmatZ wrote:

OpenGFX-0.2.3/changelog.txt
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

The extracted .tar file has suspicious size:
5373952 = 65536 * 82
so it looks like last incomplete part isn't retrieved
Correct file size is 5386240, so 12288 bytes are missing.

with zlib-1.2.4 under x86_64-linux
works fine with zlib-1.2.3

I wonder if that affects only the content download system


This comment was imported from FlySpray: https://bugs.openttd.org/task/3753#comment7831

@DorpsGek
Copy link
Member Author

SmatZ wrote:

Looks like zlib bug. gzeof() returns true prematurely, eg. checking read == 0 works, but only with zlib 1.2.3.5 and newer...


This comment was imported from FlySpray: https://bugs.openttd.org/task/3753#comment7832

@DorpsGek
Copy link
Member Author

SmatZ wrote:

http://devs.openttd.org/~smatz/something_like_this_fs3753.diff
works with both 1.2.4 and 1.2.3 (most likely <1.2.3.5)

I am not sure it is the correct solution, eg. how gzeof() behaves in the case of other errors, but current situation, eg. ALL files being truncated with 1.2.4, is very bad.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3753#comment7833

@DorpsGek
Copy link
Member Author

planetmaker wrote:

That fix works for me (tested 1.2.4 and 1.2.3.3)


This comment was imported from FlySpray: https://bugs.openttd.org/task/3753#comment7834

@DorpsGek
Copy link
Member Author

SmatZ wrote:

Updated patch

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3753#comment7869

@DorpsGek
Copy link
Member Author

Rubidium wrote:

This bug has been acknowledged by the zlib developer and it will be fixed in the next release of zlib.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3753#comment7873

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Won't fix

The developer of zlib said a fixed zlib will be released before a new release of OpenTTD. So working it around won't have much effect.
It is mentioned in known-bugs.txt since r19645.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3753

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant