Summary: | Messages sent whilst offline aren't appearing in text-ui | ||
---|---|---|---|
Product: | [Unmaintained] telepathy | Reporter: | RussianNeuroMancer <russianneuromancer> |
Component: | text-ui | Assignee: | Telepathy Bugs <kde-telepathy-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | kde, mail |
Priority: | NOR | ||
Version: | 0.6.1 | ||
Target Milestone: | Future | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/telepathy-text-ui/02f5c46161ab558ef7a13eb153db998109224009 | Version Fixed In: | 0.6.2 |
Sentry Crash Report: |
Description
RussianNeuroMancer
2013-04-18 11:44:37 UTC
This has nothing to do with being in the first tab or not. I think that may have been coincidence. There definitely is something wrong. On my local prosody setup: 2 accounts 1 on prosody, 1 in KTp - Send a message from PSI -> KTp - Disable my local account in KTp - Send a message from PSI -> KTp - Enable my local account in KTp - I get a notification from somewhere (not sure if approver or text-ui) - it does not appear in the UI. - it is in the logger. The cause of this is pretty obvious. When we call setTextChannel() we don't check and process anything in the messageQueue. We need to loop through this and add everything to the view. I just tried to reproduce this but couldn't, was it fixed? Okay, reproduced it now. It's even worse than described here if I get it right. Can someone try this: 1. Have two accounts in pidgin (or whatever IM) 2. Go offline with your KTP account 3. Send messages from the Pidgin account(s) to the KTP account 4. Go online with your KTP account 5. Randomly, both or just one of the chat windows will be empty when opening ktp-text-ui. Okay, so far that's what is described in the report already. Now: 6. From the account that has the empty view, send another message. For me, that message is not displayed either. Only if you send a message *to* the account with the empty window and then send another one *from* that account, it gets displayed again. Can someone reproduce that? I investigated the reason for this a bit, and I found that the empty view (which, as you might have noticed, don't have backlog either!) have no HTML <body>. It's just missing. Thus, the javascript which adds the message fails (the error message is discarded and the return value is not being checked either). I tried this with two different themes, a custom one and the default (I think?) Renkoo theme -- same thing for both. I'll try to find out why that is tomorrow (too late for today *yawn*) but maybe someone has an idea in the meantime already which makes this easier? ;) Ah, I checked for what David said in comment #2 -- this does not seem to be the problem. I added debug output to AdiumThemeView::addMessage (quite at the bottom of the call stack for adding messages) and it gets called just fine for the offline messages. This is a "Heisenbug"... it disappears when adding enough debug output ;) Anyways, after some investigation, the problem seems to be somewhere in KWebPage. Telling the KWebView constructor to not use a KWebPage, but the default instead (or assigning a custom QWebPage via setPage()) fixes the problem for me. Could someone please test if this fix is reproducable? Here's the patch: http://paste.kde.org/740102/raw/ Worth shipping anyway. Will make startup faster. I don't see how this patch will fix the issue. (or at least what I thought the issue was) As far as I can tell there will potentially be messages in the messageQueue when setTextChannel is called. These will never be processed. Git commit dd8ea96d3e9bf3dc1534c45bb433c56df36b8cf1 by Sven Brauch. Committed on 08/05/2013 at 20:59. Pushed by brauch into branch 'master'. Use a QWebPage instead of a KWebPage in the text UI. According to my tests, this fixes bug 318549, although I have no idea why it does. But since using QWebPage is preferable to KWebPage anyways (we don't use anything from KWebPage), the change makes sense even without that. M +1 -1 lib/adium-theme-view.cpp http://commits.kde.org/telepathy-text-ui/dd8ea96d3e9bf3dc1534c45bb433c56df36b8cf1 Git commit 02f5c46161ab558ef7a13eb153db998109224009 by David Edmundson. Committed on 10/05/2013 at 20:44. Pushed by davidedmundson into branch 'kde-telepathy-0.6'. Fix messages not appearing when text channel reloads REVIEWED-BY: Sven Brauch M +9 -1 lib/chat-widget.cpp http://commits.kde.org/telepathy-text-ui/02f5c46161ab558ef7a13eb153db998109224009 |