Ticket #9388 (closed Bug Report - Crash: fixed)
Opened 2 years ago
Last modified 20 months ago
[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
Change History
comment:1 Changed 2 years ago by beirdo
- Status changed from new to infoneeded_new
We need: version number (mythfrontend --version), and frontend and backend logs for the crash.
comment:2 Changed 2 years ago by jan@…
Version is b769303, attached are fresh gdb, frontend and backend logs.
comment:3 Changed 2 years ago by stuartm
- Owner set to stuartm
- Priority changed from minor to critical
- Status changed from infoneeded_new to assigned
- Milestone changed from unknown to 0.24.1
comment:4 Changed 2 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 2 years ago by stuartm
- Component changed from MythTV - General to Plugin - MythWeather
comment:6 Changed 2 years ago by stuartm
- Owner changed from stuartm to cpinkham
- Component changed from Plugin - MythWeather to MythTV - User Interface Library
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 2 years ago by beirdo
- Summary changed from Crash in channel priorities to [CRASH] Crash in channel priorities
comment:8 Changed 22 months ago by stuartm
- Priority changed from critical to blocker
- Summary changed from [CRASH] Crash in channel priorities to [CRASH] Crash when loading image in background thread
- Milestone changed from 0.24.1 to 0.25
comment:11 Changed 20 months ago by beirdo
See also #9547
comment:12 Changed 20 months ago by Github
- Status changed from assigned to closed
- Resolution set to fixed
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
