[Bug 258606] New: Infinite loop when horizontal and vertical scrollbars battle

Matt Whitlock matt at whitlock.name
Thu Dec 2 19:33:51 GMT 2010


https://bugs.kde.org/show_bug.cgi?id=258606

           Summary: Infinite loop when horizontal and vertical scrollbars
                    battle
           Product: kmail
           Version: 1.13.5
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: messageviewer
        AssignedTo: kdepim-bugs at kde.org
        ReportedBy: matt at whitlock.name


Created an attachment (id=54004)
 --> (http://bugs.kde.org/attachment.cgi?id=54004)
screen shot of a problematic message

Version:           1.13.5 (using KDE 4.5.3) 
OS:                Linux

The conditions that cause this bug to manifest are extremely rare, but I've had
it happen on more than one email message (spanning many months, if not years),
and it's 100% reproducible on a message where it happens.  When it happens, I
have to kill the KMail process because it's locked hard in an infinite loop
(using 100% of one CPU core).

This happens when the text of a message has certain pathological dimensions and
line breaking characteristics.  I think I've only ever seen it happen on
Facebook wall post notifications, but I don't believe it's specific to anything
in the message.

I will attempt to characterize the conditions that cause the problem as exactly
as I can.  Reproducing this bug may be very difficult for someone else, as
resizing the message viewer just a few pixels suppresses the bug (on this
message, but probably causes it for another).

Reproducible: Always

Steps to Reproduce:
1. The message fits in the viewer with no scroll bars.  However, one line of
the message contains no breaking whitespace and runs into the region where the
vertical scroll bar would be if it were visible.
2. If the vertical scroll bar were then to be shown, it would force the long
line to break onto a new line, thus increasing the height of the message.
3. The increased height now causes the message to run into the region where the
horizontal scroll bar would be if it were visible.
4. If the horizontal scroll bar were then to be shown, it would no longer be
necessary to break the long line, in which case the message would become short
enough vertically to eliminate the vertical scroll bar.
5. Eliminating the vertical scroll bar means the entire message can now fit in
the viewer with no horizontal scroll bar.
6. Return to step 1.

Actual Results:  
KMail hangs in an infinite loop.

Expected Results:  
Message is displayed with no scroll bars, as none are needed.

Interestingly, if I reposition the horizontal splitter in the inbox window and
then select the problematic message, I can then move the splitter back to its
original position without causing the hang.  However, if I then select a
different message and then re-select the problematic message, KMail hangs.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list