Ticket #68 (closed task: fixed)
Getting exception from parseNetworkMessage
| Reported by: | lists@… | Owned by: | daelstorm |
|---|---|---|---|
| Priority: | major | Milestone: | Release 1.3.0 |
| Component: | nicotine | Version: | 1.2.5.1 |
| Keywords: | Cc: |
Description
Very vague report, I know. I just keep getting this exception, and I can't seem to track down the cause. It happens every once in a while, possibly more often when a search returns a huge list of results. Perhaps a more extensive error handling of weird packages in parseNetworkMessage is what is needed...
unpack str size does not match format unpack str size does not match format unpack str size does not match format Exception in thread Thread-1: Traceback (most recent call last):
File "threading.py", line 442, in bootstrap
self.run()
File "/var/lib/python-support/python2.4/pynicotine/slskproto.py", line 263, in run
msgs, conns[i] = self.process_peer_input(conns[i],conns[i].ibuf)
File "/var/lib/python-support/python2.4/pynicotine/slskproto.py", line 448, in process_peer_input
msg.parseNetworkMessage(buffer[8:msgsize+4])
File "/var/lib/python-support/python2.4/pynicotine/slskmessages.py", line 1055, in parseNetworkMessage
for j in range(numattr):
TypeError?: range() integer end argument expected, got NoneType?.
nicotine is Debian/unstable package 1.2.5.1-1
Attachments
Change History
comment:2 Changed 6 years ago by daelstorm
- Status changed from new to assigned
- Milestone set to Release 1.3.0
I've never seen this one before.
Indeed, the handling of malformed/corrupted messages needs considerably more work. This specific error is in FileSearchResult? when some of the file's attributes aren't found.
'unpack str size does not match format' also looks troublesome. :-/
comment:3 Changed 5 years ago by daelstorm
- Status changed from assigned to closed
- Resolution set to fixed
This has since been fixed. It was indeed due to bad search results. Actually, it is caused by missing file attributes. Nicotine+ now checks for file attributes before unpacking search results.
comment:4 Changed 5 years ago by lists@…
- Status changed from closed to reopened
- Resolution fixed deleted
I'm getting this again. Using 1.2.6 from Debian unstable. Though now, it happens specifically when I try to browse user "frazbin".
unpack str size does not match format unpack str size does not match format unpack str size does not match format unpack str size does not match format Exception in thread Thread-1: Traceback (most recent call last):
File "threading.py", line 442, in bootstrap
self.run()
File "/var/lib/python-support/python2.4/pynicotine/slskproto.py", line 263, in run
msgs, conns[i] = self.process_peer_input(conns[i],conns[i].ibuf)
File "/var/lib/python-support/python2.4/pynicotine/slskproto.py", line 449, in process_peer_input
msg.parseNetworkMessage(buffer[8:msgsize+4])
File "/var/lib/python-support/python2.4/pynicotine/slskmessages.py", line 974, in parseNetworkMessage
for k in range(numattr):
TypeError?: range() integer end argument expected, got NoneType?.

Nicotine does not seem to actually crash, but all transferring is stalled and the gui is unresponsive (though it redraws itself)