[SailfishDevel] app crashed when using Canvas in Dialog page

Samuli Silvius samuli.silvius at gmail.com
Thu Aug 14 07:21:25 UTC 2014


Hi,

Complete app here
https://github.com/tace/jolla2gether.git
I created a branch "*canvas_crash*" for you. The canvas code is in
https://github.com/tace/jolla2gether/blob/canvas_crash/qml/components/ExternalLinkDialog.qml
.

To reproduce the problem.
1. Start app and select "Questions" from pull menu
2. Open any question page having picture. E.g. put to search criteria (from
pull menu) "summer" and you will see this question
https://together.jolla.com/question/44887/high-contrast-ambiences-summer-ready/
which has some pics.
3. Click a picture and you are on the Dialog page where the Canvas is.
4. Now swipe right i.e. cancel the dialog and then click the picture again
to enter Dialog page again. Repeat this until app crashes.

Br
-Samuli


2014-08-14 9:53 GMT+03:00 Gunnar Sletta <gunnar.sletta at jolla.com>:

> Hi,
>
> I'm hoping this will already be fixed in update 9 by the cleanup
> improvements I did to the canvas implementation a few weeks ago, but just
> to be on the safe side, I'd like to test it. Is there an example or app I
> could try to verify that? (I'd prefer to get a complete example rather than
> recreating it based on the posted code segment to ensure that it is
> covering the right cases)
>
> cheers,
> Gunnar
>
>
> On 13 Aug 2014, at 21:39, Samuli Silvius <samuli.silvius at gmail.com> wrote:
>
> > I tried FramebufferObject and now app crashes immediately when opening
> that dialog page, right after Canvas's onPaint is executed (I have
> console.log on last line of onPaint()).
> >
> >
> > [W] QWaylandGLContext::makeCurrent:100 -
> QEGLPlatformContext::makeCurrent: eglError: 3002, this: 0x71661d28
> >
> >
> > [W] GLAcquireContext::GLAcquireContext:80 - Can't make current GL context
> >
> > Remote application crashed: Process killed by signal
> >
> >
> > 2014-08-13 22:27 GMT+03:00 Kimmo Lindholm <Kimmo.Lindholm at eke.fi>:
> > ok.
> >
> >
> >
> > I have not used renderStrategy at all in paint,
> >
> > but renderTarget: Canvas.FramebufferObject
> >
> >
> >
> > I have also dialogs there, and only way I got it broken, is that vkb
> case.
> >
> >
> >
> > -kimmo
> >
> >
> >
> > From: devel-bounces at lists.sailfishos.org [mailto:
> devel-bounces at lists.sailfishos.org] On Behalf Of Samuli Silvius
> > Sent: Wednesday, August 13, 2014 10:20 PM
> >
> >
> > To: Sailfish OS Developers
> > Subject: Re: [SailfishDevel] app crashed when using Canvas in Dialog page
> >
> >
> >
> > No vkb used on that page. Only couple of TextSwitch:es
> >
> >
> >
> > -Samuli
> >
> >
> >
> > 2014-08-13 22:15 GMT+03:00 Kimmo Lindholm <Kimmo.Lindholm at eke.fi>:
> >
> > Do you have virtual keyboard visible when closing dialog?
> >
> >
> >
> >
> https://together.jolla.com/question/44780/closing-dialog-with-vkb-active-breaks-canvas-on-returning-page/
> >
> >
> >
> > -kimmo
> >
> >
> >
> > From: devel-bounces at lists.sailfishos.org [mailto:
> devel-bounces at lists.sailfishos.org] On Behalf Of Samuli Silvius
> > Sent: Wednesday, August 13, 2014 10:07 PM
> > To: Sailfish OS Developers
> > Subject: Re: [SailfishDevel] app crashed when using Canvas in Dialog page
> >
> >
> >
> > Hi,
> >
> >
> >
> > Sdk produces this dump, cannot really figure out the reason? Or what
> backtrace you mean?
> >
> >
> >
> > -Samuli
> >
> >
> >
> > 2014-08-13 21:50 GMT+03:00 Andrey Kozhevnikov <coderusinbox at gmail.com>:
> >
> > try to get backtrace and check what exactly is the reason of crash.
> >
> > 14.08.2014 00:49, Samuli Silvius пишет:
> >
> > Hi,
> >
> >
> >
> > 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
> often.
> >
> >
> >
> > 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 file.
> >
> >
> >
> > And it works fine, but causing app to crash sometimes when leaving
> Dialog page with cancel swipe. SDK outputs a long crash dump.
> >
> >
> >
> > -Samuli
> >
> >
> >
> > _______________________________________________
> > SailfishOS.org Devel mailing list
> > To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
> >
> >
> >
> > _______________________________________________
> > SailfishOS.org Devel mailing list
> > To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
> >
> >
> >
> >
> > _______________________________________________
> > SailfishOS.org Devel mailing list
> > To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
> >
> >
> >
> >
> > _______________________________________________
> > SailfishOS.org Devel mailing list
> > To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
> >
> > _______________________________________________
> > SailfishOS.org Devel mailing list
> > To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140814/dc20ab06/attachment.html>


More information about the Devel mailing list