Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#3921 closed defect (fixed)

Segfault leaving Inactive Screens in Screen Setup

Reported by: anonymous Owned by: danielk
Priority: minor Milestone: 0.21
Component: mythweather Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Subversion trunk 14374 has a reproducible (for me at least) segfault when doing the following. Go into MythWeather? setup and choose Screens which brings up "Screen Setup" screen. I have never installed MythWeather? on this machine before so there are no screens currently defined. "Current Conditions" is highlighted under "Inactive Screens". Down arrow to the last item on the list (18 Hour Forecast) and then down arrow once more to encounter the segfault.

Notes:

  1. This DOES NOT HAPPEN if you have any active screens defined.
  1. This DOES NOT HAPPEN if you have had an active screen defined and then removed it, UNTIL you escape back one screen and then re-enter Screen Setup with no active items on the list.

Backtrace will be attached.

Attachments (3)

gdb.txt.gz (1.1 KB) - added by taco_mel@… 12 years ago.
Backtrace
3921_diff.patch.txt (452 bytes) - added by Joe Ripley <vitaminjoe@…> 12 years ago.
Disables initial focus for m_active_list if the list contains no items
3921_diff.patch (452 bytes) - added by Joe Ripley <vitaminjoe@…> 12 years ago.
Disables initial focus for m_active_list if the list contains no items

Download all attachments as: .zip

Change History (13)

Changed 12 years ago by taco_mel@…

Attachment: gdb.txt.gz added

Backtrace

comment:1 Changed 12 years ago by taco_mel@…

This is supposed to be for mythweather but got put in mythtv. Sorry about that. Could someone please fix.

comment:2 Changed 12 years ago by stuartm

Component: mythtvmythweather
Milestone: unknown0.21
Owner: changed from Isaac Richards to stuartm

comment:3 Changed 12 years ago by Joe Ripley <vitaminjoe@…>

This problem occurs because the active_list is given focus when it has no elements in it. This can be fixed by disabling focus on the active_list after the buildFocusList() function runs.

The attached patch fixes the problem for me.

-- Joe Ripley vitaminjoe@…

Changed 12 years ago by Joe Ripley <vitaminjoe@…>

Attachment: 3921_diff.patch.txt added

Disables initial focus for m_active_list if the list contains no items

Changed 12 years ago by Joe Ripley <vitaminjoe@…>

Attachment: 3921_diff.patch added

Disables initial focus for m_active_list if the list contains no items

comment:4 Changed 12 years ago by Joe Ripley <vitaminjoe@…>

Sorry, that '.txt' extension crept in somehow... :) I've re-attached the patch with the correct filename.

-- Joe Ripley vitaminjoe@…

comment:5 Changed 12 years ago by stuartm

Resolution: fixed
Status: newclosed

(In [14566]) Fix segfault in mythweather based on patch by Joe Ripley.

Fixes #3921

comment:6 Changed 12 years ago by Joe Ripley <vitaminjoe@…>

Resolution: fixed
Status: closedreopened

Changeset [14566] calls m_active_list->allowFocus(false) in wireUI(). This sets the allowFocus property before buildFocusList() is called. As a result, it is impossible to access the 'Active Screens' list to set up location information for the active screens.

Kevin Hayes reported this on the mythtv-users mailing list. I can confirm that I have the same behavior with [14566].

-- Joe Ripley vitaminjoe@…

comment:7 Changed 12 years ago by Joe Ripley <vitaminjoe@…>

Relevant mythtv-users thread: http://www.gossamer-threads.com/lists/mythtv/users/296787

-- Joe Ripley vitaminjoe@…

comment:8 Changed 12 years ago by danielk

Owner: changed from stuartm to danielk
Status: reopenednew

I'm going to try to fix this so we can finish testing #4132.

comment:9 Changed 12 years ago by danielk

Resolution: fixed
Status: newclosed

(In [14887]) Fixes #3921. Fixes segfaults without breaking focus cycle.

comment:10 Changed 12 years ago by danielk

(In [14888]) Refs #4132. Fixes some miscellaneous problems with MythWeather?.

There were three problems which made it impossible to test MythWeather? dialogs.

  • When sources are not defined (see #3921) the text of the error dialog is not visible.
  • doListSelect() used an unchecked return value from showButtonPopup as an index into an array.
  • connectScreen()/disconnectScreen() segfault when sources are not properly configured.

This fixes these problems so we can test the dialogs.

Note: See TracTickets for help on using tickets.