Skip to content

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

Description

@zebulon-1st

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/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "nicotine-plus/pynicotine/slskproto.py", line 385, in run
    conns, connsinprogress, server_socket = self.process_queue(queue, conns, connsinprogress, server_socket)
  File "nicotine-plus/pynicotine/slskproto.py", 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions