DeferredDelete events not handled in time when created by GLib dispatched events

Bug #1460970 reported by Lars Karlitski
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
qtbase-opensource-src (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

DeferredDelete events are handled only for the main loop "level" that object->deleteLater() was called in. Events dispatched directly from GLib don't pass through qt's dispatching, thus getting a level of 0, which means that they aren't handled until the program exits (i.e., as long as level 0 exists).

This is causing apparent memory leaks in long-running applications. We're working around this by using queued signal connections or calling sendPostedEvents(). For example in

    https://code.launchpad.net/~lukas-kde/gsettings-qt/queued-processing/+merge/259883

Upstream: https://bugreports.qt.io/browse/QTBUG-32859

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtbase-opensource-src (Ubuntu):
status: New → Confirmed
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

There's a WIP code being worked on by upstream now:
https://codereview.qt-project.org/#/c/142309/

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

The upstream patch set 24 was finally merged.

Could I get a test from affected people using silo 49 (qtbase version 5.4.1+dfsg-2ubuntu11~vivid5~vivid1~test1 ) for the vivid overlay bug? Can you also say if you'd like to have this fix already in OTA-10?

Xenial will be available hopefully soon for testing, but I'm bundling a couple of other fixes there that I'm battling with at the moment. So please test vivid first.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Hmm a call back. It seems like my device didn't upgrade to the correct version, and now that I did there seems to be a problem with the silo with screen mostly black. Since the patch changes core functionality in Qt, I assume it's the deferred delete patch and not the other one.

That means the patch does not function on Qt 5.4 with simple rebasing. It did need slight modifications to apply: the original patch https://codereview.qt-project.org/#/c/142309/24//ALL,unified , the rebasing affected that patch as follows http://paste.ubuntu.com/15186334/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.