Drawing apps show only a black screen where drawable component should be

Bug #1229287 reported by Michael Hall
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
High
Loïc Molinari

Bug Description

Apps that draw custom images to a component at runtime show only a black surface when run. Examples are Stock Ticker (draws a graph in the bottom half of the screen), Graphite and uDraw.

Steps to reproduce:

1) Get the latest Ubuntu Touch ubuntu-system image (57 when the bug was reported)
2) Search for "Graphite" in the "More Suggestions" category on the Apps lens
3) Install Graphite
4) Search for "Graphite" in the "Installed" category on the Apps lens
5) Open Graphite
6) Swipe-up to reveal toolbar
7) Select "New"
8) New sketch shows only a black screen

Revision history for this message
Michael Hall (mhall119) wrote :
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
Michael Hall (mhall119)
description: updated
Julien Funk (jaboing)
tags: added: jfunk-20130919
tags: added: jfunk
removed: jfunk-20130919
Revision history for this message
Florian Boucault (fboucault) wrote :

Can you be more specific as to how the drawing is done, what API is used?
Can you attach a simple QML test program that demonstrates the issue?

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

The stock ticker app in the default build exhibits this problem too.

Current_charts_page.qml in the stock ticker app implements it:-

http://bazaar.launchpad.net/~stock-ticker-dev/stock-ticker-mobile-app/trunk/view/head:/Current_charts_page.qml

Revision history for this message
Florian Boucault (fboucault) wrote :

It looks like the Ticker app is using the QML canvas element.

http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-canvas.html

Trying different renderTarget might help with the issue:
http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-canvas.html#renderTarget-prop

tags: added: canvas
Changed in ubuntu-ui-toolkit:
importance: Undecided → High
Revision history for this message
Jono Bacon (jonobacon) wrote :

This is affecting multiple apps in the store - can someone take care of fixing it?

Revision history for this message
Michael Hall (mhall119) wrote :

uDraw uses the following:

Canvas{
    id: mainCanvas

    renderStrategy: Canvas.Threaded //Needed to save()

    property string drawName: "Draw 001" // Name of the current file
    property color drawingColor: "darkgray" // Name of the current color
    property int lineWidth: units.dp(1)
    property int mxBuffer: -1 // mouse X coordinate buffer
    property int myBuffer: -1 // mouse Y coordinate buffer

    anchors.fill: parent
    smooth: true
    antialiasing: true

}

Revision history for this message
Michael Hall (mhall119) wrote :

Commenting out this line allowed me to draw on the canvas, but it sounds like it will prevent it from being able to save:

renderStrategy: Canvas.Threaded

Revision history for this message
Michael Hall (mhall119) wrote :

Graphite uses:

renderStrategy: Canvas.Immediate

Commenting that out also allows me to draw on the canvas, but it isn't being stored when going back to the "Sketches" page, presumable for the same reason uDraw can't save the content when it's renderStrategy is commented out

Revision history for this message
Michael Hall (mhall119) wrote :

I've tried the following combinations in Graphite:

        renderStrategy: Canvas.Immediate
        renderTarget: Canvas.Image
Result: Crash on app load

        renderStrategy: Canvas.Immediate
        renderTarget: Canvas.FrameBufferObject
Result: Drawing area is black, drawing does not work

        renderStrategy: Canvas.Threaded
        renderTarget: Canvas.Image
Result: Crash on app load

        renderStrategy: Canvas.Threaded
        renderTarget: Canvas.FrameBufferObject
Result: Drawing area is black, drawing does not work

        renderStrategy: Canvas.Cooperative
        renderTarget: Canvas.Image
Result: Drawing area is red (app's background color), drawing works but is not saved when going back to Sketches

        renderStrategy: Canvas.Cooperative
        renderTarget: Canvas.FrameBufferObject
Result: Drawing area is red (app's background color), drawing works but is not saved when going back to Sketches

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

It seems somehow related to setting renderStrategy to Canvas.Threaded
This is a simpler example:
https://plus.google.com/+StuartLangridge/posts/aKfi1VBxcxR

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

loic can you take a quick look, could this be related to qtubuntu

Changed in ubuntu-ui-toolkit:
assignee: nobody → Loïc Molinari (loic.molinari)
Revision history for this message
Tim Peeters (tpeeters) wrote :

was this fixed?

Revision history for this message
Loïc Molinari (loic.molinari) wrote :

Yes, Michael confirmed it's fixed. It's very likely the issue was in the Canvas implementation in QtDeclarative.

Changed in ubuntu-ui-toolkit:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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