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

Alejandro Exojo suy at badopi.org
Fri Dec 26 11:46:24 UTC 2014

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.

If I'm not mistaken or confusing it with kdeinit, the booster that your 
application is likely using (because is the recommended way) does some 
improvements on start up by linking to all usual libraries, and launching your 
process afterwards. If you are launching an additional process, it might be 
linking again with GUI libraries, and the system might be trying to make 
another GUI of it. This is just a guess, but it makes some sense given the 
Wayland assertion that you are having. Is it completely gone if you don't 
launch a process?

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.

Qt 5.4 includes QStorageInfo, but you can look at an addon developed by the 
same person some time before:


Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
http://barnacity.net/ | http://disperso.net

More information about the Devel mailing list