Modify

Opened 21 months ago

Closed 21 months ago

#11725 closed Bug Report - General (fixed)

When using Qt painter, displaying some notifications will crash

Reported by: jyavenard 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 jyavenard 21 months ago.
ubuntu backtrace
qpaintermaccrash.log (67.2 KB) - added by jyavenard 21 months ago.
mac backtrace (crash is line 1855 of that backtrace)
qpaintermaccrash2.log (62.0 KB) - added by jyavenard 21 months ago.
more detailed backtrace

Download all attachments as: .zip

Change History (6)

Changed 21 months ago by jyavenard

ubuntu backtrace

Changed 21 months ago by jyavenard

mac backtrace (crash is line 1855 of that backtrace)

comment:1 Changed 21 months ago by jyavenard

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

Changed 21 months ago by jyavenard

more detailed backtrace

comment:2 Changed 21 months ago by jyavenard

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 21 months ago by jyavenard (previous) (diff)

comment:3 Changed 21 months ago by Jean-Yves Avenard <jyavenard@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 73c769ff2ae0ec59168e980804bb98896ffefc36/mythtv:

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

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

Fixes #11725

Add Comment

Modify Ticket

Action
as closed The owner will remain stuartm.
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.