bamf matcher messes up refcounting on views

Bug #942070 reported by desrt on 2012-02-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BAMF
High
desrt
Unity
Fix Released
High
desrt
bamf (Ubuntu)
Undecided
Unassigned
unity (Ubuntu)
Undecided
Unassigned

Bug Description

when a "Opened" signal comes from bamf, the client side matcher gets the view for the path and refs it. on "Closed" it unrefs it.

the problem comes when you close a window that was open when the application using bamf started running. in that case, the client library sees "Closed" with no "Opened" and drops a reference that it doesn't own.

see the attached test program for a simple demonstration of the problem. open a window, run the test program, then close the window.

Related branches

desrt (desrt) wrote :
description: updated
desrt (desrt) wrote :

this patch fixes the bug for me.

i'm not sure why the matcher wants to hold an extra ref on the view -- the view factory holds a ref in it with its hashtable already. i tested this patch and it works for me, but i may have missed something.

Changed in bamf:
status: New → In Progress
importance: Undecided → Medium
importance: Medium → High
Changed in unity:
milestone: none → 5.6.0
status: New → In Progress
importance: Undecided → High
Changed in bamf:
assignee: nobody → Ryan Lortie (desrt)
Changed in unity:
assignee: nobody → Ryan Lortie (desrt)
Changed in bamf:
status: In Progress → Fix Committed
Changed in unity:
status: In Progress → Fix Committed
Didier Roche (didrocks) on 2012-03-12
Changed in bamf:
status: Fix Committed → Fix Released
Changed in unity:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bamf - 0.2.112-0ubuntu1

---------------
bamf (0.2.112-0ubuntu1) precise; urgency=low

  * New upstream release.
    - bamf matcher messes up refcounting on views (LP: #942070)
    - Chromium is running, but not showing in launcher or alt-tab.
      (LP: #918474)
    - libbamf leaks memory on view dispose (LP: #942148)
    - Coverity PW.PARAMETER_HIDDEN - CID 10449 (LP: #937398)
    - Coverity UNINIT - CID 10451 (LP: #937402)
  * debian/libbamf0.symbols, debian/libbamf3-0.symbols:
    - update symbols for new API
 -- Didier Roche <email address hidden> Mon, 12 Mar 2012 11:47:33 +0100

Changed in bamf (Ubuntu):
status: New → Fix Released
Adolfo Jayme (fitojb) on 2014-01-11
no longer affects: bamf (Ubuntu Quantal)
Changed in unity (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Patches

Bug attachments