[mythtv] OS X 10.3 and MythTV 0.20

Andrew Kimpton awk at awkward.org
Mon Nov 6 01:25:30 UTC 2006


Nigel Pearson wrote:
>   
>> so the dynamic cast at mythmainwindow.cpp line 1096 fails.
>>     
>
> Spot-on, Andrew!
> (wish I had read this _before_ I spent a few
>   hours tracing, patching and rebuilding :-)
>
> It seems related to compiler RTTI stuff.
> See this really old discussion:
> http://www.gossamer-threads.com/lists/mythtv/dev/72747
>
> What I don't understand is why it is failing in
> the older runtime environment. Still tracing,
> but any casting should be in the generated code.
> Not in libC.
>   
What it might be is that if the Qt library is built with a different 
compiler version you could get this sort of a problem. Since XCode on 
10.3 uses gcc 3.x but XCode on 10.4 uses gcc 4.x (by default) you can 
get this sort of a problem if the Qt libraries were built on one 
platform but then linked on another. However to be honest I'd expect 
everything to just break horribly and not this subtly at all.

I also recall some sort of an obscure compiler optimization Apple made 
around this area of code/linking (though it was a while ago I heard 
about it - so it's quite possible I'm mis-remembering things, I'll try 
and dig it up).

You're workaround is OK I guess - but it sort of breaks the whole point 
of RTTI ! Is there a way to do a 'poor-mans' RTTI by trying the cast and 
then examining some particular member to determine if it really looks 
like a Key press event ?

Andrew 8-)




More information about the mythtv-dev mailing list