Private messages going to the channel above them, goes away if I click back and forth a bit. #89

Closed
bitemyapp opened this Issue Mar 4, 2012 · 14 comments

Projects

None yet

4 participants

@bitemyapp

Sometimes my private messages erroneously get PRIVMSG'd to a channel or other /query to a different user in the conversation/channel above the one my UI is pointed at.

This happens from time to time and could cause serious problems. It doesn't get double-fired in my case, it gets sent once, simply to the wrong channel.

Cheers!

@thedjpetersen

Does it usually happen after a small amount of inactivity? This might be a focus issue.

@bitemyapp

It has happened after inactivity, but I know of at least one instance where I was in a steady conversation in a /query, with little/no pauses and I saw in my terminal that the JSON was getting PRIVMSG'd to the channel above (to my mild embarrassment).

So inactivity may be one cause, as that had happened before, but not necessarily.

I will attempt a repro and start dumping data once I have it occurring. Is there any data in particular in the front-end client you would like me to snag?

@thedjpetersen

I believe this is still causing problems: https://github.com/thedjpetersen/subway/blob/master/assets/js/views/chat_application.js#L29

As far as I can tell this is a race condition where the client loses focus and somehow the previous window gets assigned as the active one.

@thedjpetersen

I haven't been able to duplicate the issue, as far as I can tell the focus for you is never getting fired. Could you confirm that L29 is getting called? @bitemyapp

@akavlie

@bitemyapp What browser/version/OS are you on?

@bitemyapp

Mac OS X, Chrome 17.

@akavlie

Well that rules out browser differences as the cause then. Same OS/browser here.

@bitemyapp

Pretty sure if you join multiple channels, and use it for a few days in a row, you'll see it crop up.

@akavlie

This could be related:
https://github.com/thedjpetersen/subway/blob/master/assets/js/collections.js#L37

@bitemyapp does it seem to trigger by certain actions (focus on another app, add/remove channels, new private message, etc.), or does it seem to happen randomly mid-conversation?

@bitemyapp

There might've been a pause between two messages, but I doubt the mid-conversation misdirection was due to any changes in UI focus.

@bitemyapp

Found a potential cause, appeared to occur when the network and/or my computer was slowing down.

This is lame as hell, but I can't actually determine which of those symptoms caused it at the time, but it definitely seemed related when it occurred.

I would recommend simulating packet loss/connection loss, and if that doesn't reproduce it, try loading the machine down.

@hermansc
Collaborator

Heh, this seemed pretty random. I have not experienced it lately. Anyone care to look into this, or should we just close it?

@thedjpetersen

Closing as this should be fixed in the new client. If more people run into it I think it will get reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment