Opened 7 years ago

Closed 7 years ago

#9388 closed Bug Report - Crash (fixed)

[CRASH] Crash when loading image in background thread

Reported by: jan@… Owned by: cpinkham
Priority: blocker Milestone: 0.25
Component: MythTV - User Interface Library Version: 0.24-fixes
Severity: high Keywords:
Cc: Ticket locked: no

Description

When navigating through the channel list for setting channel priorities, the frontend crashes. GDB output attached.

Attachments (4)

gdb.txt (115.6 KB) - added by jan 7 years ago.
gdb.2.txt (207.4 KB) - added by jan@… 7 years ago.
mythbackend.log (2.6 KB) - added by jan@… 7 years ago.
mythfrontend.log (5.5 KB) - added by jan@… 7 years ago.

Download all attachments as: .zip

Change History (16)

Changed 7 years ago by jan

Attachment: gdb.txt added

comment:1 Changed 7 years ago by beirdo

Status: newinfoneeded_new

We need: version number (mythfrontend --version), and frontend and backend logs for the crash.

comment:2 Changed 7 years ago by jan@…

Version is b769303, attached are fresh gdb, frontend and backend logs.

Changed 7 years ago by jan@…

Attachment: gdb.2.txt added

Changed 7 years ago by jan@…

Attachment: mythbackend.log added

Changed 7 years ago by jan@…

Attachment: mythfrontend.log added

comment:3 Changed 7 years ago by stuartm

Milestone: unknown0.24.1
Owner: set to stuartm
Priority: minorcritical
Status: infoneeded_newassigned

comment:4 Changed 7 years ago by stuartm

The backtrace shows a sigabort, not a segfault so it's not clear cut.

I'm reasonably confident that the correlation with the Channel Priorities screen is pure coincidence. What we appear to have here is UI code being used outside the UI thread, from the use of LoadAnimatedImages?() I'm guessing it's mythweather. Whatever it is, it has no business calling that code in a background thread, the redraw code is not thread safe as it's not designed to be accessed in multiple threads.

comment:5 Changed 7 years ago by stuartm

Component: MythTV - GeneralPlugin - MythWeather

comment:6 Changed 7 years ago by stuartm

Component: Plugin - MythWeatherMythTV - User Interface Library
Owner: changed from stuartm to cpinkham

Oops, this has nothing to do with MythWeather?. Re-assigning to Chris Pinkham since this seems to be an issue with locking in the threaded image loading.

comment:7 Changed 7 years ago by beirdo

Summary: Crash in channel priorities[CRASH] Crash in channel priorities

comment:8 Changed 7 years ago by stuartm

Milestone: 0.24.10.25
Priority: criticalblocker
Summary: [CRASH] Crash in channel priorities[CRASH] Crash when loading image in background thread

comment:9 Changed 7 years ago by stuartm

See also #9678, #9634

comment:10 Changed 7 years ago by stuartm

Type: Bug ReportBug Report - Crash

comment:11 Changed 7 years ago by beirdo

See also #9547

comment:12 Changed 7 years ago by Github

Resolution: fixed
Status: assignedclosed

Fix a crash caused by background animated image loading.

The background animated image loader was calling SetImages?() which triggers non thread-safe routines in MythUI. Instead of calling SetImages?() in the background thread, return the image QVector in the ImageLoadEvent? and set the images and delays in the UI thread similar to how we set non-animated images.

Fixes #9388.

NOTE: This changes the binary API, so make clean, etc., whatever you normally do.

Branch: master Changeset: 02f8352b91d8f43f39e37e4704edc481ffc1abdd

Note: See TracTickets for help on using tickets.