[mythtv] Startup crash (Was DVB SI rework - Help needed)

Roger James roger at beardandsandals.co.uk
Sun Jan 29 17:40:25 UTC 2017


On 29 January 2017 1:06:15 pm Roger Siddons <dizygotheca at ntlworld.com> wrote:

> On 29/01/17 12:07, Roger James wrote:
>>
>> Hi Roger
>>
>> The crash is caused by a QImage::Load calling a pointer
>> to a plugin that has already unloaded.
>
> Do you mean Qt loaded it, then unloaded it ?
>
That was my interpretation, the pointer that is being used looks good but 
the area of memory it points to is no longer a valid mapping in the 
process's address space. This would happen if a dynamic mapping had been 
removed. I would have expected the pointer to be null if the module had not 
yet been loaded.

> "Not unloading plugins is Qt's policy, as decided during the 5.0
> development process and reaffirmed now in 5.6. This is due to static
> data in plugins leaking out and remaining in use past the unloading of
> the plugin, causing crashes."
> https://codereview.qt-project.org/#/c/172014/
>

Hmm. I think that explains things. I was running the 0.28 binaries from 
mythbuntu, they could well of been linked to qt4. I will need to check.

> Though what that means in practice is beyond me...
>
> I interpret your trace as Myth is trying to use a plugin that hasn't yet
> been loaded.
>
>> It crashes in the
>> logging thread when it access a null pointer in the incoming log
>> messages queue.
>>
>
> Reminded me of a "static initialisation order fiasco" that exists in
> UPnpDeviceDesc::UPnpDeviceDesc() where the constructor tries to log
> before logging is created. I doubt that's your issue but there may be
> others.
> I presume you are using the standard build scripts.
> What distro and Qt version are you using ?
>

The 0.28-fixes build is a direct clone from the myth repo. However I am 
building against qt5, and the mythbuntu 14.04 distribution. I have of 
removed all the mythbuntu Mythtv packages. Just the standard ./configure 
then make.

>> I will look at this later today. The weird thing with all these crashes
>> is that when the wrapper script restarts the front-end it works perfectly.
>>
>
> Could the partly loaded plugins/images/whatever remain in the file
> system memory-cache and so load a lot quicker 2nd time around ?
> There's so much going on under-the-hood these days.
>
Could be. But that would not really match my unload theory. Who knows?

Cheers,
 Roger






More information about the mythtv-dev mailing list