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

jklingen sailfish-devel at jklingen.com
Fri Dec 26 19:23:25 UTC 2014

Am 26.12.2014 12:46, schrieb Alejandro Exojo:
> El Thursday 25 December 2014, sailfish-devel at jklingen.com escribió:
>> 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
> Huge disclaimer: writing about things that I'm not fully sure, but writing
> them anyway because nobody else replied yet.
Thanks a lot for sharing your thoughts, some interesting stuff for me in 
> ... but it makes some sense given the
> Wayland assertion that you are having. Is it completely gone if you don't
> launch a process?
Yes, when the process invocation is commented (or deferred by 5 
seconds), the assertion failure does not occur. Also the app does not 
crash and all subsequent process invocations work like charm.
> Possible solutions might be cleaning the environment where you launch the
> process, launching it some other way (it's been a while since I last used
> QProcess, but I recall different ways), or just not launching it at all.
> If you want to get the output of "df", think to yourself "how does df get that
> information in the first place?". Launching a process for getting that data is
> a resource waste, and as you've experienced, can be brittle and not
> necessarily less work.
Good point... while I am perfectly aware that implementations like these 
tie an app to its environment tightly, I wouldn't have expected invoking 
an external process like "df" to waste resources. But as I said, I am 
quite new to Qt and my knowledge of C++ is very minimal, so I might well 
be abusing one or another part of the framework with my approach. 
Obviously I'll need to have a deeper look into these things.
> Qt 5.4 includes QStorageInfo, but you can look at an addon developed by the
> same person some time before:
> https://gitorious.org/qdrive/qdrive
Thanks, will check it out. Lots of C++ ;-)

By the way: the "df" thing is really just a side scene for some info on 
the cover page. The main purpose of the app is to talk to "du" (the same 
way) and visualize its output. That's a really large amount of processes 
when browsing through the filesystem a bit. Even more of a reason to 
have a thorough look at this...

Thanks again for your feedback,
Jens :)

More information about the Devel mailing list