Opened 5 years ago

Closed 22 months ago

#12394 closed Bug Report - Crash (Won't Fix)

mythfrontend SEGV after pressing e, Qt5 build

Reported by: Bill Meek <keemllib@…> Owned by: stuartm
Priority: minor Milestone: 0.28.2
Component: Qt5 issues Version: Master Head
Severity: medium Keywords: Qt5
Cc: Ticket locked: no

Description

To duplicate

Build with --qmake=qmake5
Begin playback of a recorded episode
Press e from the keyboard to edit the cutlist

The attached SEGV fires.

Attachments (3)

gdb-mythfrontend-26018.txt (77.8 KB) - added by Bill Meek <keemllib@…> 5 years ago.
--version + GDB output
mythfrontend.20150303010957.26018.log (17.5 KB) - added by gdb-mythfrontend-26018.txt 5 years ago.
FE log
gdb-mythfrontend-3842.txt (87.7 KB) - added by Bill Meek <keemllib@…> 5 years ago.
New stack trace. Re-tested with: v0.28-pre-2745-ga177366. Sorry, still SEGVs.

Download all attachments as: .zip

Change History (13)

Changed 5 years ago by Bill Meek <keemllib@…>

Attachment: gdb-mythfrontend-26018.txt added

--version + GDB output

Changed 5 years ago by gdb-mythfrontend-26018.txt

FE log

comment:1 Changed 5 years ago by Bill Meek <keemllib@…>

Add: Press z from the keyboard to load the skiplist

(seems to fail more reliably, but not every time.)

comment:2 Changed 5 years ago by Stuart Auchterlonie

Milestone: unknown0.28

Looks like we are dereferencing a null iterator

1114	Thread 1 (Thread 0x7f08937f97c0 (LWP 26018)):
1115	#0  0x00007f0892d5f89f in DeleteMap::CleanMap (this=0x4249c40) at deletemap.cpp:682
1116	        thistype = 0
1117	        thisframe = 109943
1118	        lasttype = 0
1119	        lastframe = 109943
1120	        tempframe = -1
1121	        it = {i = 0x0}
1122	        total = 109629
1123	        clear = true

code in question is

680         for ( ; it != m_deleteMap.end(); ++it)
681         {
682             int      thistype  = it.value();
683             uint64_t thisframe = it.key();
...
Last edited 5 years ago by Stuart Auchterlonie (previous) (diff)

comment:3 Changed 5 years ago by stuartm

It's likely to have the same root cause as the EITCache segfault I fixed, namely that the map is modified while it's being iterated over, either within the loop or in another thread. QT5 doesn't tolerate this (rightly) but QT4 does.

comment:4 Changed 5 years ago by stuartm

I've taken a quick look and my hypothesis is correct, we removing items from the map while we iterate over it. I'll work on a fix tomorrow.

comment:5 Changed 5 years ago by Stuart Morgan <smorgan@…>

In e492714c3c33d2279954d9a8cfaf7aaad22c772b/mythtv:

Partial fix for crash with editor under QT5. Refs #12394

There are other places in this code where we modify the map while
iterating over it, some of those require a very small amount of
refactoring to eliminate. I just haven't found the time to fix them so
I'm pushing what I've already done in the hope that it reduces the
number of crashes in the short term.

Changed 5 years ago by Bill Meek <keemllib@…>

Attachment: gdb-mythfrontend-3842.txt added

New stack trace. Re-tested with: v0.28-pre-2745-ga177366. Sorry, still SEGVs.

comment:6 Changed 5 years ago by Stuart Auchterlonie

Component: MythTV - GeneralQt5 issues
Owner: set to stuartm
Status: newassigned

comment:7 Changed 5 years ago by Bill Meek <keemllib@…>

As mentioned on the #mythtv channel, the partial fix does, in fact, work. Ignore the last stack trace and comment.

Let's see if this comment gets through the spam filter.

comment:8 Changed 4 years ago by Stuart Auchterlonie

Milestone: 0.280.28.1

Moving unresolved tickets to next point release

comment:9 Changed 3 years ago by Stuart Auchterlonie

Milestone: 0.28.10.28.2

Moving remaining open 0.28.1 tickets to 0.28.2

comment:10 Changed 22 months ago by Stuart Auchterlonie

Resolution: Won't Fix
Status: assignedclosed

Closing any remaining tickets for 0.28, if the issue persists, feel free to reopen and align to v29 or master

Note: See TracTickets for help on using tickets.