Ticket #68 (closed task: fixed)

Opened 2 years ago

Last modified 21 months ago

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

Changed 2 years ago by lists@…

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

Changed 2 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. :-/

Changed 22 months 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.

Changed 22 months 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?.

Changed 21 months ago by daelstorm

  • status changed from reopened to closed
  • resolution set to fixed

fixed in svn and 1.2.7, but not in 1.2.6

Add/Change #68 (Getting exception from parseNetworkMessage)

Author



Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.