Mir

Some snapshots on Nexus10 upside-down

Bug #1263741 reported by Gerry Boland on 2013-12-23
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mir
Fix Released
High
Kevin DuBois
mir (Ubuntu)
High
Unassigned

Bug Description

Have a go with this demo:

lp:~gerboland/+junk/qml-demo-shell/

(to compile, ensure you have qt5-default, qtbase5-dev, qtdeclarative5-dev, qtbase5-private-dev, libunity-mir-dev installed, run "qmake" and "make"). Run with "./run"

The bottom bar has 3 app launching buttons. Tap one, the app will start and slide in. On the left is a black rectangle - tapping this fetches a new snapshot of the application.

To reproduce this bug, keep fetching snapshots by tapping. I see some snapshots are upside down, and a subset of those with incorrect colouring (suspect the red and blue channels are swapped).

Update:
This bug is now just about the upside-down issue. The swapped colours are covered by bug 1265787.

Related branches

Daniel van Vugt (vanvugt) wrote :

When you say snapshots do you mean actual Mir "snapshot" buffers?

It sounds like the snapshots we're getting no longer have valid contents and you're seeing the wrong area of graphics memory. Have you by any chance resized these surfaces before snapshotting them?

tags: added: nexus10
Gerry Boland (gerboland) wrote :

Yep I mean snapshot buffers.

QtUbuntu does resize the surface on start. Here is the combination of patches that implement this:
https://code.launchpad.net/~ricmm/platform-api/set-dimensions/+merge/198490
https://code.launchpad.net/~ricmm/qtubuntu/papi-setdimensions/+merge/198498

Daniel van Vugt (vanvugt) wrote :

Hmm, can you try eliminating surface->resize() calls and tell us if that prevents the bug from happening?

Gerry Boland (gerboland) wrote :

Removed surface resize calls, still able to repro bug.

description: updated
Daniel van Vugt (vanvugt) wrote :

It's highly likely that "upside-down" and confused RGB/BGR are two separate bugs. Can you please separate them?

Also, please remind me why we need snapshots still? Generating a snapshot is much more computationally intense for both GPU and CPU than showing a live preview of a surface. Is it lack of API preventing use of live previews?

Gerry Boland (gerboland) wrote :

> It's highly likely that "upside-down" and confused RGB/BGR are two separate bugs. Can
> you please separate them?
Ok

> Also, please remind me why we need snapshots still? Generating a snapshot is much
> more computationally intense for both GPU and CPU than showing a live preview of a surface.
> Is it lack of API preventing use of live previews?
We rely heavily on snapshots for current window management animations - we're not ready to use live previews yet.

We will always need snapshots however for application lifecycle purposes, to make app stop/respawn transparent to the user (we'll save snapshot to disk).

summary: - Some snapshots on Nexus10 upside-down (and occasionally swapped red/blue
- channels)
+ Some snapshots on Nexus10 upside-down
description: updated
kevin gunn (kgunn72) on 2014-01-06
Changed in mir:
assignee: nobody → Alexandros Frantzis (afrantzis)
importance: Undecided → Critical
Changed in mir:
milestone: none → 0.1.4
status: New → Triaged
Gerry Boland (gerboland) on 2014-01-07
description: updated
Alexandros Frantzis (afrantzis) wrote :

The root of this is occasional GL_OUT_OF_MEMORY errors when trying to read the pixels from the FBO backed by the application surface texture in GLPixelBuffer. The image reversal is just the result of giving out stale data (which get flipped a second time by GLPixelBuffer::as_argb_8888()).

This issue may be related to https://bugs.launchpad.net/mir/+bug/1238695 .

Kevin DuBois (kdub) wrote :

I'm not sure if they're related (I'd guess not at the moment), but i've posted a potential fix for 1238695 (not this bug) in 1238695's bug report

Daniel van Vugt (vanvugt) wrote :

I think we need to be more conservative with severities. To better distinguish actual show-stoppers.

Changed in mir:
importance: Critical → High

Confirmed that lp:~kdub/mir/fix-1238695 fixes this too. Although the effect is different, the root cause is the same (occasional GL_OUT_OF_MEMORY errors when using EGLImages in different contexts).

Changed in mir:
assignee: Alexandros Frantzis (afrantzis) → Kevin DuBois (kdub)
status: Triaged → In Progress
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir/devel at revision 1320, scheduled for release in mir, milestone Unknown

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
status: Fix Committed → Fix Released
Gerry Boland (gerboland) wrote :

Fix not released yet, Mir still at 0.1.3 (rev 1298)

Changed in mir:
status: Fix Released → Fix Committed
Changed in mir:
status: Fix Committed → Fix Released
Daniel van Vugt (vanvugt) wrote :

mir (0.1.4+14.04.20140204-0ubuntu1) trusty; urgency=medium

Changed in mir (Ubuntu):
importance: Undecided → High
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers