[mythtv] Problems with dynamic_cast

jyavenard at gmail.com jyavenard at gmail.com
Tue Jan 28 22:06:47 UTC 2020


What about doing
auto *dce = dynamic_cast...

Sent from Nine
________________________________
From: Peter Bennett
Sent: Tuesday, 28 January 2020 21:24
To: Mark Spieth; David Engel; Development of MythTV
Subject: [mythtv] Problems with dynamic_cast

In Android build with latest ndk -

In standardsettings.cpp
auto dce = dynamic_cast<DialogCompletionEvent*>(event)
the dynamic cast returns null even when the correct type is passed. I
have changed that code to use a static cast in the Android case.

To see whether all dynamic_casts are failing I set a breakpoint at
another dynamic_cast while running in Android and it is working correctly

tv_play.cpp:3952
auto *qke = dynamic_cast<QKeyEvent*>(e);
After that line is run the value of qke is not null, it is the same as
the value of e.

This one is executed whenever you press a remote button while playing a
recording.

So it is not a general failure, there must be some specific condition
that affects standardsettings.cpp, or some corruption of data.

Peter

_______________________________________________
mythtv-dev mailing list
mythtv-dev at mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20200128/2fcd80a9/attachment.htm>


More information about the mythtv-dev mailing list