Opened 9 years ago

Closed 7 years ago

Last modified 7 years ago

#9101 closed Bug Report - General (Works for me)

Timing issue with alphapulse + mythuibuttontree preventing display sometimes

Reported by: markk Owned by: stuartm
Priority: minor Milestone: 0.25
Component: MythTV - User Interface Library Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Steps to reproduce:-

  • select Graphite theme (may not be relevant)
  • enter Video List screen
  • sometimes the list is not populated
  • press the 'right' button when the list is not populated and it crashes

Strangely, the list is properly populated if I switch focus away from the frontend and back again - so perhaps some obscure interaction with the X server?

Backtrace to follow

Attachments (2)

video-list-crash.log (30.5 KB) - added by markk 9 years ago.
89_mythvideo_right_arrow_fix.patch (858 bytes) - added by mlord@… 9 years ago.
Patch to fix RIGHT-arrow crash on entry to mythvideo.

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by markk

Attachment: video-list-crash.log added

comment:1 Changed 9 years ago by robertm

Component: Plugin - MythVideoMythTV - User Interface Library
Owner: changed from robertm to stuartm
Status: newassigned
Summary: Crash when entering the MythVideo Video List screenTiming issue with alphapulse + mythuibuttontree preventing display sometimes

updating summary to reflect the fixed segfault and remaining possible issue.

comment:2 Changed 9 years ago 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)
         {

Changed 9 years ago by mlord@…

Patch to fix RIGHT-arrow crash on entry to mythvideo.

comment:3 Changed 8 years ago by Raymond Wagner

Version: UnspecifiedTrunk Head

comment:4 Changed 8 years ago by stuartm

Milestone: unknown0.26
Status: assignedinfoneeded

The cause of the failure to populate the list is still a mystery, won't be solved for 0.25

comment:5 Changed 8 years ago by Github

Fix segfault in MythUIButtonTree when list is empty and we attempt to navigate it. Refs #9101

Signed-off-by: Stuart Morgan <smorgan@…>

Branch: master Changeset: f3efafe2d71efcee847c3be5710eef42d49e066f

comment:6 Changed 8 years ago by stuartm

Type: defectBug Report - General

comment:7 Changed 7 years ago by stuartm

Resolution: Works for me
Status: infoneededclosed

I'm going to close this for now, I cannot reproduce and there isn't enough information here to debug it without reproducing.

comment:8 Changed 7 years ago by stuartm

Milestone: 0.260.25
Note: See TracTickets for help on using tickets.