[mythtv-commits] Ticket #13228: Miscellaneous Android fixes and improvements

MythTV noreply at mythtv.org
Tue Feb 27 21:25:14 UTC 2018

#13228: Miscellaneous Android fixes and improvements
 Reporter:  pbennett         |          Owner:  pbennett
     Type:  Developer Task   |         Status:  accepted
 Priority:  minor            |      Milestone:  30.0
Component:  Ports - Android  |        Version:  Master Head
 Severity:  medium           |     Resolution:
 Keywords:                   |  Ticket locked:  0

Comment (by markspieth):

 Replying to [comment:1 pbennett]:
 > == Exit from frontend causes a SEGFAULT ==
 > The destructor for the main window hits a segfault due to a null
 pointer, many levels deep in the destructor of QWidget. The destructor is
 not called twice. I cannot find a solution, so the workaround for now is
 bypass that on Android. This leaves a memory leak which is preferable to a
 Seg Fault. Note that even with bypassing the destructor, the Android log
 still contains messages about the window having died. See attached patch
 for the workaround (20180227_1059_android_segfault_workaround.patch). Next
 step in fixing this is to implement the correct Android method of closing
 an application, which may avoid the problem.

 I see at least 1 problem with the shutdown code in main() after exec
 exits. There is at least 1 deleteLater which requires the dispatcher to be
 running to process AFAIK.
 cleanup is called after the return when all the destructors are called.
 My bet is qApp is deleted before the call to DestroyMythMainWindow.
 At the top of cleanup() flush/process the dispatcher queue one last time
 just in case.
 Also break on data (gdb) changed for the pointer thats causing the
 Not that this issue is high priority.

Ticket URL: <https://code.mythtv.org/trac/ticket/13228#comment:5>
MythTV <http://www.mythtv.org>
MythTV Media Center

More information about the mythtv-commits mailing list