Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11168 closed Bug Report - Crash (fixed)

mythbrowser and mythnews crash when interrupted

Reported by: jkt@… Owned by: Jonatan Lindblad
Priority: minor Milestone: 0.26.1
Component: Plugin - MythBrowser Version: 0.25-fixes
Severity: medium Keywords:
Cc: jkt@… Ticket locked: no

Description

when a page load is interrupted before completion mythfrontend crashes in QObject::disconnect() at sender->metaObject(). after much debugging i found removing a portion of [1399a9c136] sidesteps the problem; it seems mixing delete QWebPage, delete QNetworkAccessManager and pending replies is an explosive combination.

the attached patch lets mythbrowser and mythnews survive interruption, but doing so most likely reinstates #9802.

crashes using branches fixes/0.25, fixes/0.26 and master against libqt4 versions 4.7.4 and 4.8.3, though i did not test all permutations.

Attachments (1)

0001-mythbrowser-and-mythnews-crash-when-interrupted.patch (1.5 KB) - added by jkt@… 11 years ago.
revert a portion of [1399a9c136]

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by jkt@…

revert a portion of [1399a9c136]

comment:1 Changed 11 years ago by Jonatan Lindblad

Owner: set to Jonatan Lindblad
Status: newassigned

comment:2 Changed 11 years ago by Jonatan Lindblad <jlindblad@…>

Resolution: fixed
Status: assignedclosed

In 83e88bc0abe21f54daace479ac921c352710c9de/mythtv:

MythUI: Fix potential use after free when leaving a web page

It's not safe to delete a QNetworkAccessManager before the QWebPage it is being
used with since any outstanding QNetworkReplys will be deleted, causing
QWebPage to potentially access free memory.

Fixes #11168.

comment:3 Changed 11 years ago by Jonatan Lindblad <jlindblad@…>

In 2870590667b4b3b3e13b171c5e81a805d30512ce/mythtv:

MythUI: Fix potential use after free when leaving a web page

It's not safe to delete a QNetworkAccessManager before the QWebPage it is being
used with since any outstanding QNetworkReplys will be deleted, causing
QWebPage to potentially access free memory.

Fixes #11168.
(cherry picked from commit 83e88bc0abe21f54daace479ac921c352710c9de)

comment:4 Changed 11 years ago by Jonatan Lindblad <jlindblad@…>

In 2103465e70f0eda760d4cd25abd49078add273d3/mythtv:

MythUI: Fix potential use after free when leaving a web page

It's not safe to delete a QNetworkAccessManager before the QWebPage it is being
used with since any outstanding QNetworkReplys will be deleted, causing
QWebPage to potentially access free memory.

Fixes #11168.
(cherry picked from commit 83e88bc0abe21f54daace479ac921c352710c9de)

comment:5 Changed 11 years ago by Jonatan Lindblad

Milestone: unknown0.26.1
Note: See TracTickets for help on using tickets.