"Placeholder" notification emits powerd notification event

Bug #1570922 reported by Alexandros Frantzis on 2016-04-15
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
High
Michał Sawicz
unity8 (Ubuntu)
High
Alexandros Frantzis

Bug Description

Steps to reproduce:

1. In Notification.qml add:

  Component.onDestruction { console.log("Notification onDestruction"); }

  and a similar log message in Component.onCompleted.
2. Install dialer-app-autopilot on the phone. This installs a fake phone sim, that, among other things, creates a fake voice mail every time unity8 starts.
3. Restart unity8.
4. A notification is created for the voice mail, before unity8 is fully drawn. No bubble can be seen, only the green envelope on top. Note that in ~/.cache/upstart/unity8.log the notification onCompleted log message can be seen, but not an onDestruction message.
5. stop unity8. Note that ~/.cache/upstart/unity8.log now contains the onDestruction message.

Effectively the initial notification is somehow "leaked" and not destroyed until the end of the program. This presents a problem in the new power architecture model, where unity8 needs to report both when a notification is shown (it already does so) and when it is destroyed.

Notifications sent after unity8 has completed loading are properly destroyed when their bubble disappears.

Related branches

Michael Terry (mterry) wrote :

Are you sure that you're testing was actually observing the voice mail notification?

My *guess* is that the voice mail notification happened too early for unity8 to see it, so it just went to the void. And the notification you're seeing is actually the "placeholder" notification. Which unity-notification creates and is just an empty notification with the "placeholder" type.

"What the heck is a placeholder notification?" I hear you ask. Very good question. I'm not 100% sure. It *seems* to be a hack to move the notifications lower on the screen? But I don't know why that's not done in the UI layer instead of in the notification model... Honestly, I don't know if it has any good purpose. I didn't know about it until I looked into this bug.

So... it might be confusing your testing.

You can debug this a bit by adding more info into your onCompleted print: like "summary", "body", and "type". If type == 0, it's a placeholder (and summary and body will be empty). And you can ignore it if so.

Changed in unity8 (Ubuntu):
status: New → Incomplete
Alexandros Frantzis (afrantzis) wrote :

> You can debug this a bit by adding more info into your onCompleted print: like "summary", "body", and "type". If type == 0, it's a
> placeholder (and summary and body will be empty). And you can ignore it if so.

Thanks for looking into this.

What I am seeing is indeed caused by this peculiar "placeholder" notification. This is still a bug, in the sense that unity8 emits a powerd notification event for a notification that's not real and this confuses the new power daemon (repowerd). I will need to create a fix for this issue in unity8.

Changed in unity8 (Ubuntu):
status: Incomplete → Triaged
assignee: Michael Terry (mterry) → Alexandros Frantzis (afrantzis)
summary: - Initial notifications never shown and not destroyed until unity8 is
- stopped
+ "Placeholder" notification emits powerd notification event
Launchpad Janitor (janitor) wrote :

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

Changed in unity-notifications (Ubuntu):
status: New → Confirmed
no longer affects: unity-notifications (Ubuntu)
kevin gunn (kgunn72) on 2016-05-31
Changed in unity8 (Ubuntu):
importance: Undecided → High
kevin gunn (kgunn72) on 2016-05-31
Changed in canonical-devices-system-image:
milestone: none → 12
assignee: nobody → Michał Sawicz (saviq)
Changed in unity8 (Ubuntu):
status: Triaged → In Progress
Changed in canonical-devices-system-image:
status: New → In Progress
importance: Undecided → High
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity8 - 8.12+16.10.20160617-0ubuntu1

---------------
unity8 (8.12+16.10.20160617-0ubuntu1) yakkety; urgency=medium

  [ Michael Terry ]
  * Do not create Label/Icon if we don't need it
  * Fix Z-ordering of prompt surfaces (LP: #1586219)
  * Drop bottom edge tutorials completely and small fixes for other
    edges. (LP: #1565103)
  * Redo visuals for greeter prompt box. (LP: #1435923)
  * Make tutorial qmltests more robust. (LP: #1590810)
  * Stop showing an extra lockscreen in desktop unity8 sessions. (LP:
    #1582987)

  [ Albert Astals Cid ]
  * Improve dash plugin mock
  * Stabilize PreviewExpandableTest::test_all_widgets_height
  * Workaround QTBUG-53460
  * Split artShape code for cardTool card and regular card
  * Simplify the code since fixedArtSize code is mandatory for regular
    cards
  * Desktop stage: Support rotatesWindowContents (LP: #1547481)
  * Turn if if else into if elseif else
  * Fix leaks in QInputDeviceManagerPrivate::addDevice
  * Do not call |= on uninitialized sigterm.sa_flags
  * initialize udevMonitor
  * Make notifier and notifierFd function local variables
  * Fix crash if a component that is not an Item is given to
    sectionDelegate
  * Tests: Do not use dynamic_cast if we're not going to test it anyway
  * Minor coverity fixes
  * Fix warning about anchors.fill in ProportionalShape (LP: #1590963)
  * Make wait in cleanup() wait for snapTo animation to have finished

  [ Alexandros Frantzis ]
  * Improve the way notifications interact with power management (LP:
    #1570922)

  [ Andrea Cimitan ]
  * Correctly refresh cardcreator cache on artshapestyle changes (LP:
    #1588335)
  * Same tweaks we have for click scope now for libertine
  * add a timer to pull to refresh to work on small windows (LP:
    #1589060)

  [ Daniel d'Andrada ]
  * Clean up debug leftovers
  * Ensure mouse and window movement are pixel-aligned (LP: #1510382)
  * Fix SpreadDelegate rotation animations
  * No point in version-controlling files that are automatically
    generated
  * Center cursor on screen when it's first shown
  * Custom cursor name just have to start with "custom"
  * Work around AnimatedSprite infinite loop bug (LP: #1588929)

  [ Josh Arenson ]
  * Disable showDash when it is already shown. (LP: #1506708)
  * Add a timestamp to the dash log (LP: #1580074)
  * Add timestamp to unity8 log (LP: #1498169)

  [ Lukáš Tinkl ]
  * Implement keyboard shortcuts info panel
  * Implement window controls overlay activatable with 3 fingers tap
    (LP: #1489020)
  * Select correct Chinese input method for OSK in the wizard (LP:
    #1588633)

  [ Michael Zanetti ]
  * Add support for the launcher surface pips displaying the correct
    number of surfaces
  * Add support for the persistent alert state. (LP: #1575147, #1584348,
    #1586621)
  * send a Alt-release event on alt+tab instead of delaying it
    completely and invoking it later (LP: #1565236)

  [ Stephen M. Webb ]
  * added a new upstart $SESSION for unity8-desktop-session (LP:
    #1376715)

 -- Michael Terry <email address hidden> Fri, 17 Jun 2016 01:22:57 +0000

Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
Michał Sawicz (saviq) on 2016-06-18
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers