Adium

Ticket #13362 (new defect)

Opened 4 months ago

Last modified 15 hours ago

message history loads some sections of conversation multiple times

Reported by: mathuaerknedam Owned by: cbarrett
Milestone: Adium 1.4 Component: Message View
Version: 1.5hg Severity: regression
Keywords: Cc:
Patch Status:

Description (last modified by mathuaerknedam) (diff)

Summary

Message history loads some sections of conversation multiple times.

Steps to reproduce

When I see it, it's consistent in that opening and closing the window or changing messages styles doesn't affect the bug. But I don't often notice it happening, so I don't know how to reproduce it. Since message history is loaded from the logs, maybe I can find a problem log and attach it to let others try reproducing this. Should that work?

Expected results

Each message in the chat transcript should be loaded once, up to the set number of lines.

Actual results

Some sections of conversation are repeated. In the conversation for the attached pic, the visible segment of conversation was repeated 4 times in 200 lines of history.

Regression

I think I've seen this for a long time, at least as long ago as when IRC was added, but it's always been hard to reproduce and I've often gone long periods without seeing it. It's also in 1.5hgr2871, but I don't believe it happens in 1.3.

Attachments

Picture 57.png (239.6 KB) - added by mathuaerknedam 4 months ago.
#adium (2009-11-10T14.58.36-0600).xml (99.4 KB) - added by mathuaerknedam 4 months ago.
Logfile from #adium
Picture 44.png (140.0 KB) - added by mathuaerknedam 4 months ago.
Pic of the chat window after loading attached log as message history
##php (2009-11-09T09.45.16-0600).xml (96.3 KB) - added by mathuaerknedam 4 months ago.
##php log
Picture 51.png (319.9 KB) - added by mathuaerknedam 4 months ago.

Change History

Changed 4 months ago by mathuaerknedam

  • severity changed from normal to regression
  • description modified (diff)
  • milestone set to Adium 1.4

Changed 4 months ago by mathuaerknedam

Changed 4 months ago by mathuaerknedam

Logfile from #adium

Changed 4 months ago by mathuaerknedam

Pic of the chat window after loading attached log as message history

Changed 4 months ago by mathuaerknedam

##php log

Changed 4 months ago by mathuaerknedam

I've attached two log files, hopefully someone can use them to reproduce this. Looking at the pic, you can easily see how the messages from ThainEshKelch and holdenss are duplicated. In the ##php log the messages from "FSX, basically" to "I thought drupal" gets repeated a few times, and the attached pic shows how the message history doesn't even appear to be loading and/or displaying the logs in chronological order.

Changed 4 months ago by mathuaerknedam

Changed 4 months ago by mathuaerknedam

I just verified that if I delete all other logs from #adium and open the chat window, the problem reoccurs. With a message history of 200 lines, the two messages are repeated twice at the very end (as seen int eh pic) and then occur only once before that. I tried changing the message history to 10 lines, and the problem still exists, so I don't think it's related to any particular message history line count.

Changed 4 months ago by cbarrett

  • owner set to cbarrett

I'm going to try to repro this with the attached logs. If I can reproduce, I'll take a stab at fixing it.

Changed 4 months ago by evands

Excellent, Colin.

Changed 4 months ago by Zachary West <zacw@…>

(In  37f86ef91f64) Code simplification; remove the old preferences, and don't use a static variable to count the lines. Refs #13362.

I can't imagine using a static variable like this wouldn't cause problems, especially with "save chats" enabled; we'd be messing with the same static variable like crazy. I'm betting this explains some weird context problems, so let's see if this helps #13362.

Changed 4 months ago by Zachary West <zacw@…>

(In  fa988de96a94) Don't deal with autorelease pools on the file level; deal with it in terms of chats. Refs #13362.

Changed 4 months ago by Zachary West <zacw@…>

(In  2a385da3eace) Don't use any instance variables to control parsing, use the parser's context info. Refs #13362.

Changed 4 months ago by Zachary West <zacw@…>

(In  24c471ce6c9e) Avoid draining items we're still using; fix for some reason putting "Value" in this context object. Refs #13362.

Changed 4 months ago by Zachary West <zacw@…>

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

(In  0eb39f6eb39c) Fix the context parser ignoring pages. Fixes #13362.

Every iteration was doing:

  1. Move to location for reading.
  2. Read
  3. Move to location for next read.

So we were skipping reads like a mofo here. I believe this fixes any remaining context issues that un-instance-variableing didn't hit.

Changed 4 months ago by Robby

  • milestone Adium 1.4 deleted

Changed 4 months ago by zacw

  • milestone set to Adium 1.4

Changed 4 months ago by zacw

  • status changed from closed to new
  • resolution fixed deleted

There's just a whole mess of bugs in the context stuff.

These fixed a set of bugs, too. but I am seeing the "multiple" problem too; it's not in the parser now, it's in dealing with LMX.

Changed 4 months ago by Zachary West <zacw@…>

(In  51687f71fc63) Fix a few more issues with context reading; if we're reading less than readSize, we need to decrement readSize too. Refs #13362.

Changed 4 months ago by Zachary West <zacw@…>

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

(In  fd43f6298e71) LMX.framework with my change at  http://bitbucket.org/zacwest/lmx-currentindexfix/changeset/9c19b3a4067c/, fixes currentIndex being lost, and repeating elements when processing multiple chunks. Fixes #13362.

Changed 4 months ago by Zachary West <zacw@…>

(In  37762b593bc4) LMX.framework with my change at  http://bitbucket.org/zacwest/lmx-x86_64-currentindexfix/changeset/c6c1e2dedf92/, fixes currentIndex being lost, and repeating elements when processing multiple chunks. Refs #13362.

/me shakes fist at sholt for applying his changes to the branch.

Changed 4 months ago by Robby

  • milestone Adium 1.4 deleted

Changed 19 hours ago by David Munch

This problem has resurfaced again in 1.4hg, and I assume it is caused by the commit that Evan made in #13499?

My console spits this out, don't know if it is related: 15/03/10 10.46.38, 15. mar, uge 11 Adium[142] Attempting to correct for old proxy listobject, keyed IRC.psychs-#growl.3

Changed 15 hours ago by mathuaerknedam

  • status changed from closed to new
  • resolution fixed deleted
  • milestone set to Adium 1.4
Note: See TracTickets for help on using tickets.