[SailfishDevel] app crashed when using Canvas in Dialog page

Samuli Silvius samuli.silvius at gmail.com
Wed Aug 13 18:49:08 UTC 2014


I have Canvas in Silica Dialog page but app crashes when leaving dialog
page both with accept or cancel swipe. It does not crash always just quite

the code:

        Canvas {

            id: imageCanvas

            visible: isImageUrl

            width: imgLoader.sourceSize.width

            height: imgLoader.sourceSize.height

            renderStrategy: Canvas.Immediate

            onPaint: {

                var ctx = getContext("2d")

                ctx.drawImage(imgLoader, 0, 0)



        Image {

            id: imgLoader

            visible: false

            source: isImageUrl ? url : ""


The idea is to save image to the gallery in onAccepted if user has selected
that option as Canvas has save method which can be used to save image to a

And it works fine, but causing app to crash sometimes when leaving Dialog
page with cancel swipe. SDK outputs a long crash dump.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140813/8f21561a/attachment.html>

More information about the Devel mailing list