Opened 11 years ago

Closed 11 years ago

#11725 closed Bug Report - General (fixed)

When using Qt painter, displaying some notifications will crash

Reported by: JYA Owned by: stuartm
Priority: blocker Milestone: 0.27
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

with the use of AirPlay? and notifications, a notification showing the album artwork and various metadata about the song being played is displayed...

All works well using the OpenGL painter, but it fails when using the Qt painter.

Behaviour is different depending on the platform used.

On Ubutu 12.04 it crashes almost immediately as the artwork image is being displayed. On mac with Qt 4.8,4, the image isn't displayed and it shows a black spot where the image should be. It will crash later however in MythQtPainter::DeletePixmaps? when the notification screen disappear from the display.

The common problem is the MythUIMage was created using a QImage and not a path or a URL to the image. Directly a QImage.

The MythUIImage got an image assigned as follow:

            // We don't have a path to the image, but the image itself
            MythImage *img = new MythImage(m_artworkImage->GetPainter());
            img->Assign(m_image);
            m_artworkImage->SetImage(img);
            img->DecrRef();

where m_artworkImage is the MythUIImage obtained with:

    m_artworkImage      = dynamic_cast<MythUIImage*>(GetChild("image"));

see: https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythui/mythnotificationcenter.cpp#L322

Attached are the two backtraces: one on ubuntu 12.04, the other on mac

Attachments (3)

qtpaintercrash.log (79.4 KB) - added by JYA 11 years ago.
ubuntu backtrace
qpaintermaccrash.log (67.2 KB) - added by JYA 11 years ago.
mac backtrace (crash is line 1855 of that backtrace)
qpaintermaccrash2.log (62.0 KB) - added by JYA 11 years ago.
more detailed backtrace

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by JYA

Attachment: qtpaintercrash.log added

ubuntu backtrace

Changed 11 years ago by JYA

Attachment: qpaintermaccrash.log added

mac backtrace (crash is line 1855 of that backtrace)

comment:1 Changed 11 years ago by JYA

using the arclight theme, the crash is in the same place as the first backtrace. Using tinted glass it's the second one

Changed 11 years ago by JYA

Attachment: qpaintermaccrash2.log added

more detailed backtrace

comment:2 Changed 11 years ago by JYA

qpaintermaccrash2.log is more detailed as it's running using Qt compiled in debug mode.

crash is in GUI thread line 1616.

The pixmap given to painter->drawPixmap() is 0x0 (retrieved using *(qim->GetPixmap?())

Last edited 11 years ago by JYA (previous) (diff)

comment:3 Changed 11 years ago by Jean-Yves Avenard <jyavenard@…>

Resolution: fixed
Status: newclosed

In 73c769ff2ae0ec59168e980804bb98896ffefc36/mythtv:

Do not allocate MythImage? directly, instead call MythPainter::GetFormatImage?()

Generic MythImage? can't be used with Qt Painter.

Fixes #11725

Note: See TracTickets for help on using tickets.