Closed Bug 412851 Opened 18 years ago Closed 18 years ago

/names command duplicates the channel user list

Categories

(Other Applications Graveyard :: ChatZilla, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adh167, Assigned: Gijs)

References

()

Details

(Keywords: memory-leak, regression, Whiteboard: [cz-0.9.81])

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Whenever i /names in a channel, the channels user list in the left hand panel duplicates. Doing it again adds another set of duplicates. Three screenshot shows what happens after i did it twice. Otherwise, the /names function works as expected. Reproducible: Always Steps to Reproduce: 1.Type /names in a channel.
Bah. :-(
Assignee: rginda → gijskruitbosch+bugs
Status: UNCONFIRMED → NEW
Depends on: 315913
Ever confirmed: true
Keywords: regression
OS: Windows XP → All
Hardware: PC → All
A quick look seems to indicate this is because on353 in irc.js ( http://mxr.mozilla.org/seamonkey/source/extensions/irc/js/lib/irc.js#1754 ) erases the channel users (and so also their links with the userlist objects (but they still exists because the view has a hold of them, of course)) and then it creates new channel users. This is not only lousy, I also expect it to leak the crap out of stuff. :-(
Status: NEW → ASSIGNED
We should be able to process either on353 or on366 for the channel in handlers.js and remove the entries no longer in this.users. (Since we do the other work in on366, probably good to do it there also.)
Keywords: mlk
Summary: /names function duplicates the channel user list. → /names command duplicates the channel user list
Attached patch Patch (obsolete) — Splinter Review
This works. Yay. I'm not sure how to make it play nicely with the add/removeUsers API though. Silver, ideas?
Attachment #298334 - Flags: review?(silver)
Since that API takes an array, why not (inside the while) push _userObj into updates and then call this.removeUsers(updates), before resetting updates to an empty array for the additions in the existing code?
Attached patch Better PatchSplinter Review
Haven't tested this, but, like this?
Attachment #298334 - Attachment is obsolete: true
Attachment #299336 - Flags: review?(silver)
Attachment #298334 - Flags: review?(silver)
Comment on attachment 299336 [details] [diff] [review] Better Patch Yes. Like that. :)
Attachment #299336 - Flags: review?(silver) → review+
Checking in mozilla/extensions/irc/xul/content/handlers.js; /cvsroot/mozilla/extensions/irc/xul/content/handlers.js,v <-- handlers.js new revision: 1.168; previous revision: 1.167 done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.81]
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: