[SailfishDevel] App fails to start with "Assertion `wayland_ok >= 0' failed"

sailfish-devel at jklingen.com sailfish-devel at jklingen.com
Thu Dec 25 11:52:16 UTC 2014


Hello again,

a follow-up on this: after quite some comment-deploy-run cycles, I have 
been able to narrow this down and eventually patch my app. But I still 
do not know the root cause of this error.

I found out that it is triggered by a QProcess started right after 
completion of my *cover* page. (The initial app page does something 
similar, but does not yield this error.) I have worked around the 
problem by deferring execution of the process with a Timer element, 
which is a good idea anyway (because no one needs this cover information 
right away when starting the application). I assume the solution is not 
bullet-proof though, but rather minimizing the likeliness of the failure 
condition occuring.

Still, I'd like to understand what is going wrong, and whether there is 
an issue in my code or somewhere else.
I have been able to extract and reproduce this behavior in an otherwise 
empty new SailfishOS Qt Quick Application.

I am using the simple piece of code below to invoke the process, the 
"execute" method has been called in Component.onCompleted of my cover 
page. Btw, the process called is "df", but other commands like "ls" gave 
the same results.

If you have an idea about this, I'd be happy to hear from you :)

Best regards & thanks a lot,
Jens

voidShell::execute()

{

     m_process  =  new  QProcess(this);

     QObject::connect(m_process,  SIGNAL(finished(int)),  SLOT(processFinishedHandler(int)));

     m_process->start(m_command);

}

void  Shell::processFinishedHandler(  int  signum  )

{

     QTextStream  stream(m_process);

     m_process->deleteLater();

     emit  executed(stream.readAll());

}




Am 22.12.2014 16:21, schrieb jklingen:
> Ahoy everybody,
>
> After upgrading to SailfishOS 1.1.1.27, my app fails to start sometimes (~ 50%),
> the cover page appearing shortly (~ 3s) with a spinner, then disappearing again.
> When trying again after failure, it usually works fine.
>
> In journalctl, I get these messages when the error occurs:
>
> -----
> 22 12:02:11 Jolla lipstick[1207]: [W] unknown:348 -
> file:///usr/share/lipstick-jolla-home-qt5/switcher/Switcher.qml:348:26: Unable
> to assign [undefined] to int
> Dez 22 12:02:11 Jolla lipstick[1207]: ector: wayland_window.cpp:187:
> WaylandNativeWindow::WaylandNativeWindow(wl_egl_window*, wl_display*,
> alloc_device_t*): Assertion `wayland_ok >= 0' failed.
> Dez 22 12:02:11 Jolla kernel: harbour-space-i(3171) send signal 6 to
> harbour-space-i(3171)
> -----
>
> A user has reported problems with starting the app also, and I don't see this
> happening to other applications, so I assume there must be something wrong with
> mine. Any ideas how I could track down the problem causing this? I cannot
> reproduce this behavior when running from the IDE.
>
> Note: I am quite new to Qt, so there are good chances I am missing something
> obvious.
>
> Thanks in advance,
> Jens
> _______________________________________________
> 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/20141225/96b78893/attachment.html>


More information about the Devel mailing list