[mythtv-commits] Ticket #9101: Timing issue with alphapulse + mythuibuttontree preventing display sometimes

MythTV noreply at mythtv.org
Thu Feb 17 05:37:50 UTC 2011


#9101: Timing issue with alphapulse + mythuibuttontree preventing display
sometimes
---------------------------------------------+-----------------------------
 Reporter:  markk                            |          Owner:  stuartm
     Type:  defect                           |         Status:  assigned
 Priority:  minor                            |      Milestone:  unknown
Component:  MythTV - User Interface Library  |        Version:  Unspecified
 Severity:  medium                           |     Resolution:
 Keywords:                                   |  Ticket locked:  0
---------------------------------------------+-----------------------------

Comment (by mlord@…):

 Thanks to Mark.K. for the pointer to this ticket.
 I can reproduce this with 100% certainty on 0.25pre.

 Based on the info already here,  I had a quick look at the code and
 immediately spotted a signed/unsigned comparison error (actually, two of
 them together).

 This patch makes the crash go away, though I don't really understand
 why m_activeListID is -1 on entry there.
 {{{
 --- mythtv/libs/libmythui/mythuibuttontree.cpp.orig     2011-02-17
 00:24:52.916137874 -0500
 +++ mythtv/libs/libmythui/mythuibuttontree.cpp  2011-02-17
 00:22:25.322386506 -0500
 @@ -457,8 +457,13 @@
      bool doUpdate = false;
      if (right)
      {
 -        if ((m_activeListID < m_visibleLists - 1) &&
 -            (m_activeListID < (uint)m_buttonlists.count() - 1))
 +        /*
 +         * Be careful to guard against comparing negatives with uint
 values here.
 +         * First time in with RIGHT arrow in mythvideo gives these
 values:
 +         *      m_activeListID=-1 m_visibleLists=3
 m_buttonlists.count()=3
 +         */
 +        if ((m_activeListID + 1 < m_visibleLists) &&
 +            (m_activeListID + 1 < (uint)m_buttonlists.count()))
              m_activeListID++;
          else if (m_currentNode && m_currentNode->visibleChildCount() > 0)
          {
 }}}

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/9101#comment:2>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list