Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13239 closed Bug Report - Crash (fixed)

Android seg fault when changing certain settings

Reported by: Peter Bennett Owned by: Peter Bennett
Priority: minor Milestone: 30.0
Component: Ports - Android Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

When changing theme or language, after saving the setting the frontend encounters a Segmentation fault. It seem to be related to the fact that the frontend destroys and recreates the main window in these cases.

Backtrace attached.

Version: mythfrontend-20180308-arm64-v30-Pre-527-g02de2e4-dirty

Attachments (2)

gdb.txt (96.9 KB) - added by Peter Bennett 6 years ago.
backtrace
20180723_1243_fix_themechange_segfault_with_restart_also_startup_gui.patch (3.4 KB) - added by Peter Bennett 6 years ago.
Fix for seg fault

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by Peter Bennett

Attachment: gdb.txt added

backtrace

comment:1 Changed 6 years ago by Peter Bennett

Owner: changed from Mark Spieth to Peter Bennett
Status: newaccepted

Changed 6 years ago by Peter Bennett

Fix for seg fault

comment:2 Changed 6 years ago by Peter Bennett

Patch 20180723_1243_fix_themechange_segfault_with_restart_also_startup_gui.patch​ :

The seg fault is in QWindow::isVisible many levels deep in code that orignates from QT event loop. The back trace gives no information as to which routine posted the message that is causing the fault. Presumably android does allow the main window to be destroyed and a new one created.

This patch changes the code to restart mythfrontend instead of recreating the main window. This applies to Setup Appearance changes.

In the case of the initial window that comes up if you have never connected this android device (TempWindow? in MythContext), we simply keep the window instead of destroying and recreating.

comment:3 Changed 6 years ago by Peter Bennett <pbennett@…>

Resolution: fixed
Status: acceptedclosed

In 0b9d21aa4c/mythtv:

Android: Prevent segfault when re-initializing main window

With Android, recreating the main window after changing theme or other
settings causes a seg fault in QT code. Fix this by restarting the
application instead. In case of first use, retain the temporary window
instead of deleting and recreating it.

Fixes #13239

comment:4 Changed 6 years ago by Peter Bennett <pbennett@…>

In 0b9d21aa4c/mythtv:

Android: Prevent segfault when re-initializing main window

With Android, recreating the main window after changing theme or other
settings causes a seg fault in QT code. Fix this by restarting the
application instead. In case of first use, retain the temporary window
instead of deleting and recreating it.

Fixes #13239

comment:5 Changed 6 years ago by Stuart Auchterlonie

Milestone: needs_triage30.0

comment:6 Changed 6 years ago by Peter Bennett <pbennett@…>

In 0b9d21aa4c/mythtv:

Android: Prevent segfault when re-initializing main window

With Android, recreating the main window after changing theme or other
settings causes a seg fault in QT code. Fix this by restarting the
application instead. In case of first use, retain the temporary window
instead of deleting and recreating it.

Fixes #13239

comment:7 Changed 6 years ago by Peter Bennett <pbennett@…>

In 0b9d21aa4c/mythtv:

Android: Prevent segfault when re-initializing main window

With Android, recreating the main window after changing theme or other
settings causes a seg fault in QT code. Fix this by restarting the
application instead. In case of first use, retain the temporary window
instead of deleting and recreating it.

Fixes #13239

Note: See TracTickets for help on using tickets.