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

Nicotine+ 1.4.2, Debian 9 (64-bit) Downloading file size >2GB appears as negative numbers, files near 4GB download 0 byte. #100

zebulon-1st opened this issue Dec 14, 2019 · 0 comments · Fixed by #174


Copy link

zebulon-1st commented Dec 14, 2019

Surely because of the use of signed 32-bit integers.
Use either unsigned 32-bit integers, or (better) 64-bit integers.

[1] Console output, when I try to continue a file of size 3GB, and I already have downloaded more than 2GB

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/", line 801, in __bootstrap_inner
  File "nicotine-plus/pynicotine/", line 385, in run
    conns, connsinprogress, server_socket = self.process_queue(queue, conns, connsinprogress, server_socket)
  File "nicotine-plus/pynicotine/", line 1004, in process_queue
    conns[msgObj.conn].obuf = conns[msgObj.conn].obuf + struct.pack("<i", msgObj.offset) + struct.pack("<i", 0)
error: 'i' format requires -2147483648 <= number <= 2147483647

After this error, all other downloads are frozen.
And, I have to

  • quit Nicotine+
  • delete temporary downloaded file that make the exception (3GB, downloaded 2GB+)
  • restart Nicotine+
  • reload from 0 that 3GB file, hoping it will be all downloaded once. If the download break after 2GB downloaded, it cannot continue because and will be frozen (as at step [1]), and all other downloads will be frozen too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

1 participant