<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello again,<br>
    <br>
    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.<br>
    <br>
    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.<br>
    <br>
    Still, I'd like to understand what is going wrong, and whether there
    is an issue in my code or somewhere else.<br>
    I have been able to extract and reproduce this behavior in an
    otherwise empty new SailfishOS Qt Quick Application.<br>
    <br>
    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.<br>
    <br>
    If you have an idea about this, I'd be happy to hear from you :)<br>
    <br>
    Best regards & thanks a lot,<br>
    Jens<br>
    <br>
    <span style=" color:#808000;">void</span><span style="
      color:#c0c0c0;"> </span><span style=" color:#800080;">Shell</span><span
      style=" color:#000000;">::</span><span style=" color:#000000;">execute</span><span
      style=" color:#000000;">()</span>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000000;">{</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800000;">m_process</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">new</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QProcess</span><span style=" color:#000000;">(</span><span style=" color:#808000;">this</span><span style=" color:#000000;">);</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800080;">QObject</span><span style=" color:#000000;">::</span><span style=" color:#000000;">connect</span><span style=" color:#000000;">(</span><span style=" color:#800000;">m_process</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">SIGNAL</span><span style=" color:#000000;">(</span>finished<span style=" color:#000000;">(</span><span style=" color:#808000;">int</span><span style=" color:#000000;">)),</span><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">SLOT</span><span style=" color:#000000;">(</span>processFinishedHandler<span style=" color:#000000;">(</span><span style=" color:#808000;">int</span><span style=" color:#000000;">)));</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800000;">m_process</span><span style=" color:#000000;">-></span><span style=" color:#000000;">start</span><span style=" color:#000000;">(</span><span style=" color:#800000;">m_command</span><span style=" color:#000000;">);</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000000;">}</span></pre>
    <pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">void</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">Shell</span><span style=" color:#000000;">::</span><span style=" color:#000000;">processFinishedHandler</span><span style=" color:#000000;">(</span><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">int</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">signum</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">)</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000000;">{</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800080;">QTextStream</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">stream</span><span style=" color:#000000;">(</span><span style=" color:#800000;">m_process</span><span style=" color:#000000;">);</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800000;">m_process</span><span style=" color:#000000;">-></span><span style=" color:#000000;">deleteLater</span><span style=" color:#000000;">();</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#808000;">emit</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">executed</span><span style=" color:#000000;">(</span><span style=" color:#000000;">stream</span><span style=" color:#000000;">.</span><span style=" color:#000000;">readAll</span><span style=" color:#000000;">());</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000000;">}</span></pre>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 22.12.2014 16:21, schrieb jklingen:<br>
    </div>
    <blockquote
cite="mid:255537185.22571.1419261665821.JavaMail.open-xchange@www.ud-mail.de"
      type="cite">
      <pre wrap="">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] <a class="moz-txt-link-freetext" href="unknown:348">unknown:348</a> -
<a class="moz-txt-link-freetext" href="file:///usr/share/lipstick-jolla-home-qt5/switcher/Switcher.qml:348:26">file:///usr/share/lipstick-jolla-home-qt5/switcher/Switcher.qml:348:26</a>: 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 <a class="moz-txt-link-abbreviated" href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>