Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 19 months ago

Closed 18 months ago

Last modified 18 months ago

#11168 closed Bug Report - Crash (fixed)

mythbrowser and mythnews crash when interrupted

Reported by: jkt@… Owned by: natanojl
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@… 19 months ago.
revert a portion of [1399a9c136]

Download all attachments as: .zip

Change History (6)

Changed 19 months ago by jkt@…

revert a portion of [1399a9c136]

comment:1 Changed 18 months ago by natanojl

  • Owner set to natanojl
  • Status changed from new to assigned

comment:2 Changed 18 months ago by Jonatan Lindblad <jlindblad@…>

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

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 18 months 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 18 months 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 18 months ago by natanojl

  • Milestone changed from unknown to 0.26.1

Add Comment

Modify Ticket

Action
as closed .
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.