Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#3962 closed defect (fixed)

MythFrontend segfaults after getting stuck in ComboBoxSetting::addSelection loop

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

Description

The frontend from SVN 14490 crashes for me at startup. GDB trace shows that a ton of ComboBoxSetting::addSelection calls happen causing the segfault. Gdb shows this is in settings.cpp line 1143, backtrace shows:

(gdb) backtrace #0 ComboBoxSetting::addSelection (this=0x82a9028, label=@0xbfed2540, value={static null = {static null = <same as static member of an already seen type>, d = 0x819b310, static shared_null = 0x819b310}, d = 0x82a90c8, static shared_null = 0x819b310}, select=false) at settings.cpp:1148 #1 0x080d373e in AspectOverride? () at globalsettings.cpp:2134 #2 0x080e8ff6 in PlaybackSettings? (this=0xbfed2800) at globalsettings.cpp:4364 #3 0x0806f251 in WriteDefaults? () at main.cpp:573 #4 0x08076c60 in main (argc=3, argv=0xbfed2d14) at main.cpp:1223

Here is some text from gdb.txt (clipped because it goes on forever until I kill the program):

Thread 1 (Thread -1256171808 (LWP 32037)): #0 0xb6c706f2 in ComboBoxSetting::addSelection (this=0x82ea358, label=@0xb2c0c8a0, value={static null = {static null = <same as static member of an already seen type>, d = 0x819b310, static shared_null = 0x819b310}, d = 0x82e9b28, static shared_null = 0x819b310}, select=false) at settings.cpp:1142 No locals. #1 0xb6c70739 in ComboBoxSetting::addSelection (this=0x82ea358, label=@0xb2c0c8a0, value={static null = {static null = <same as static member of an already seen type>, d = 0x819b310, static shared_null = 0x819b310}, d = 0x82e9b28, static shared_null = 0x819b310}, select=false) at settings.cpp:1143 No locals. #2 0xb6c70739 in ComboBoxSetting::addSelection (this=0x82ea358, label=@0xb2c0c8a0, value={static null = {static null = <same as static member of an already seen type>, d = 0x819b310, static shared_null = 0x819b310}, d = 0x82e9b28, static shared_null = 0x819b310}, select=false) at settings.cpp:1143 No locals.

Attachments (1)

3962-v1.patch (899 bytes) - added by danielk 12 years ago.
Possible fix

Download all attachments as: .zip

Change History (8)

comment:1 Changed 12 years ago by anonymous

More info:

#104802 0xb6c48739 in ComboBoxSetting::addSelection (this=0x82d0f90, label=@0xb2be58a0, value={static null = {static null = <same as static member of an already seen type>, d = 0x819b310, static shared_null = 0x819b310}, d = 0x82b7158, static shared_null = 0x819b310}, select=201) at settings.cpp:1143 #104803 0xb6c48739 in ComboBoxSetting::addSelection (this=0x82d0f90, label=@0xb2be58a0, value={static null = {static null = <same as static member of an already seen type>, d = 0x819b310, static shared_null = 0x819b310}, d = 0x82b7158, static shared_null = 0x819b310}, select=true) at settings.cpp:1143 #104804 0xb6c457e6 in SelectSetting::addSelection (this=0x82d0f90, label=@0xb2be58a0, value={static null = {static null = <same as static member of an already seen type>, d = 0x819b310, static shared_null = 0x819b310}, d = 0x82b7158, static shared_null = 0x819b310}, select=false) at settings.cpp:647 #104805 0xb2bcc008 in GameType::GameType? () from /usr/local/lib/mythtv/plugins/libmythgame.so #104806 0xb2bc81a8 in MythGamePlayerSettings::MythGamePlayerSettings? () from /usr/local/lib/mythtv/plugins/libmythgame.so #104807 0xb2ba290e in mythplugin_init () from /usr/local/lib/mythtv/plugins/libmythgame.so #104808 0xb6cc803d in MythPlugin::init (this=0x8306da0, libversion=0xb6d9a93f "0.21.20070910-2") at mythplugin.cpp:33 #104809 0xb6cc901d in MythPluginManager::init_plugin (this=0x83aa800, plugname=@0xbfc68530) at mythplugin.cpp:150 #104810 0xb6cc8d54 in MythPluginManager? (this=0x83aa800) at mythplugin.cpp:131 #104811 0x08077035 in main (argc=3, argv=0xbfc68ab4) at main.cpp:1255

comment:2 Changed 12 years ago by anonymous

Looks to be mythgame related somewhere in gamesettings.cpp

Changed 12 years ago by danielk

Attachment: 3962-v1.patch added

Possible fix

comment:3 Changed 12 years ago by danielk

Does the attached patch prevent the segfault?

comment:4 Changed 12 years ago by anonymous

This patch fixes the issue. Thanks! Sorry for the delay in getting back to you.

comment:5 Changed 12 years ago by danielk

Milestone: unknown0.21
Owner: changed from Isaac Richards to danielk
Status: newassigned
Version: unknownhead

comment:6 Changed 12 years ago by danielk

Resolution: fixed
Status: assignedclosed

(In [14609]) Fixes #3962. Adds QDeepCopy for some QString's that were causing segfaults.

comment:7 Changed 12 years ago by danielk

(In [14610]) Refs #3962. Adds more QDeepCopy calls in settings.{h,cpp} to avoid potential segfaults due to QString data sharing.

Note: See TracTickets for help on using tickets.