[mythtv] QT Slots Corruption Issue on Shield Tube

Peter Bennett pb.mythtv at gmail.com
Thu Mar 10 14:11:26 UTC 2022


On 3/10/22 01:51, David Hampton via mythtv-dev wrote:
> On Thu, 2022-03-10 at 13:13 +1100, Mark Spieth wrote:
>> On 10/03/2022 9:49 am, Peter Bennett wrote:
>>> On 3/9/22 16:33, Mark Spieth wrote:
>>>> On 10/03/2022 3:07 am, Peter Bennett wrote:
>>>>> This is the bug report:
>>>>>
>>>>> https://github.com/MythTV/mythtv/issues/368
>>>>>
>>>>> This only happens on the user's Shield Tube, but has been
>>>>> happening
>>>>> for eight months. During playback he crashes at random times.
>>>>>
>>>>> The backtrace and debug prints he has supplied show that an
>>>>> address
>>>>> is being corrupted in the Qt slot system. In the first
>>>>> parameter,
>>>>> the first digit of the address is changed from 0xa to 0x2. It
>>>>> crashes in moc_mythsocket.cpp while trying to build the
>>>>> parameter
>>>>> list for calling MythSocket::ReadStringListReal or
>>>>> MythSocket::ReadReal. The call originates in
>>>>> MythSocket::ReadStringList or MythSocket::Read which use the
>>>>> slot
>>>>> mechanism to call the "Real" versions of those methods, which
>>>>> may be
>>>>> in a different thread.
>>>>>
>>>>> Does anybody have any ideas how to proceed? I cannot recreate
>>>>> it
>>>>> myself as I do not have a Shield Tube. Also I do not understand
>>>>> how
>>>>> QT internal address lists could get corrupted.
>>>> Is it fixed in QT6 or latest?
>>>>
>>>> Is it a regression? Should we downgrade QT? If so to which
>>>> version?
>>>>
>>>> I can do a QT update if I know it will help.
>>>>
>>>> Mark
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>> We can try the latest QT and see if that helps. I don't know the
>>> status of getting QT6 to work with MythTV. What is involved in
>>> building with QT6 ? Do we just update the download location?
>> There will be a whole new set of patches. May be lucky and no patches
>> are required.
>>
>> Just tried with 5.15.3 but wouldn't download. Will spend some time on
>> the weekend updating to at least 5.15.3 and we'll see how that goes.
>>
>> The current one is 5.14.1
>>
>> I've also had issues with 32bit on firetv max so have been using
>> leanfront.
>>
>> It sounded like the issue is known but there is no patch yet.
>>
>> Maybe Ill try qt6 just for fun. I seem to remember some work was done
>> to make that work.
> There's a major issue with the Qt6 version that I haven't run to ground
> yet. (Or even tried recently, as last time I spent days banging my head
> against my desk.)  If you run an operation on the front end that causes
> a process to be forked off, then the display stops updating.
> Mythfrontend is still running, keystrokes are still accepted, and you
> can back all the way out and quit mythfrontend, but nothing changes on
> the screen.  I believe I could trigger it reliably by trying to
> retrieve the metadata on a video.  (As I said, its been a while.)  It
> also happened at other times, but I could always trace it back to a
> process being executed in the background.  The problem has to do with
> the MythMainWindow code hiding and later re-showing the window.  Its
> not a QT problem, as it doesn't happen when I hack the code and force
> mythfrontend to use the Qt painter.  It does happen with both the
> OpenGL and Vulkan painters that are part of the MythTV code.  Also, for
> some reason this only happens when the frontend and backend are on
> different systems.  Makes it harder to debug on a single development
> system.
>
> I thought I had filed an issue about this, but I can't find anything on
> github.  I'll try and find time in the next couple of days to write it
> up.
>
> Compiling with qt6 is easy. All you should need is to cherry-pick
> commit 004bdfb747 into your tree and then add the --qmake argument to
> your call to configure.  That commit hacks out all the code in mythtv
> that references classes that were removed in qt6.  All the real qt6
> related changes were committed to the main branch a long time ago.
> There is a devel/qt6 branch you could check out that differs from
> master by that one commit, but its a six weeks out of date and needs to
> be updated.  I should probably just pull a new branch as the current
> one was created a year ago.  Its already had four merges commits that
> brought in over 800 commits from the main branch.  Probably best to
> start fresh.
>
> David
>
> P.S.  The qt6 based code runs fine, as long as you don't accidentally
> fork a process.  I've been running it on my secondary frontend box for
> a year now and I forget that box is running qt6 until I trip over this
> bug.
>
> _______________________________________________

The android mythfrontend is unable to fork any processes. That does not 
work with Android, attempts to do anything that forks a process always 
fail. So maybe qt6 is an option for android mythfrontend.

Peter



More information about the mythtv-dev mailing list