<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Here, I copied the most interesting parts from the bug:<br>
    </p>
    <p>Basically, QNetworkAccessManager is sometimes stuck in
      NotAccessible state after switching from mobile data to wifi.<br>
    </p>
    Among other things, it makes QNetworkAccessManager::get () to fail
    with QDisabledNetworkReply which breaks XmlListModel as some people
    have noted.<br>
    <div class="moz-cite-prefix"><br>
      Qt 5.2 had a similar problem but this helped:<br>
      <br>
      <a class="moz-txt-link-freetext" href="https://git.merproject.org/mer-core/qtbase/merge_requests/3">https://git.merproject.org/mer-core/qtbase/merge_requests/3</a><br>
      <br>
      Unfortunately, Qt connman bearer plugin has significantly changed
      in Qt 5.6 and this trick stopped working. <br>
      <br>
      When the switch (between mobile and wifi) is happening, the action
      occurs in parallel on two threads, Qt bearer thread and the main
      thread, the signals are queued, although the main thread is
      fetching the current state directly from the objects being
      manipulated by the bearer thread. My theory was that
      configurationChanged, onlineStateChanged and
      networkSessionStateChanged (queued) signals from the past were
      getting mixed with the current state (which was checked directly)
      in such a way that QNetworkAccessManagerPrivate online state
      remained false even though connman service was getting
      successfully connected. So I came up with this:<br>
      <br>
      <a class="moz-txt-link-freetext" href="https://git.merproject.org/mer-core/qtbase/merge_requests/18">https://git.merproject.org/mer-core/qtbase/merge_requests/18</a><br>
      <br>
      but that didn't quite fix it. It does eliminate one scenario
      (described in the merge request) but there must be something else
      there. The whole connman bearer plugin thing looks generally prone
      to race conditions, I would've done it differently but we have
      what we have.<br>
      <br>
      Cheers,<br>
      -Slava<br>
      <br>
      <br>
    </div>
    <blockquote
cite="mid:CAHCc5YXry1NwFdP6HrZDaSE1zU8_8re93mTR35vLEuVRQmnV_g@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div>
          <div>Thanks for the quick reply;<br>
          </div>
          I was actually hoping to collect some more background intel on
          this issue.<br>
        </div>
        <br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Sun, Apr 30, 2017 at 10:56 PM, Slava
          Monich <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:slava.monich@jolla.com" target="_blank">slava.monich@jolla.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Unfortunately, no,
              it's an internal bug. If you would like to be notified via
              email about a potential fix, you could watch qtbase pull
              requests - those are quite rare, it shouldn't be too much
              of a spam.<br>
              <br>
              Cheers,<br>
              -Slava
              <div>
                <div class="h5"><br>
                  <br>
                  <div class="m_1251028547860576262moz-cite-prefix"><br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>
                        <div>Hi Slava;<br>
                        </div>
                        is there a MER bug for this?<br>
                        <br>
                      </div>
                      tortoisedoc<br>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Sun, Apr 23, 2017 at
                        11:33 AM, Slava Monich <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:slava.monich@jolla.com"
                            target="_blank">slava.monich@jolla.com</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">Network status
                          detection in Qt 5.6 is unreliable when the
                          system is switching between wifi and mobile
                          data. That results in QNetworkAccessManager
                          sometimes thinking that network access is
                          disabled when in fact the device is online. At
                          some point I attempted to fix it (<a
                            moz-do-not-send="true"
                            href="https://git.merproject.org/mer-core/qtbase/commit/8122f32a"
                            rel="noreferrer" target="_blank">https://git.merproject.org/me<wbr>r-core/qtbase/commit/8122f32a</a>)
                          however that only eliminated one particular
                          scenario of failure and reduced the
                          probability. But it's still happening. As I
                          understood it's a random thing (race
                          condition) triggered by two connman services
                          changing their status more or less
                          simultaneously.<br>
                          <br>
                          Jolla's Weather app also uses XmlListModel and
                          suffers from the same issue.<br>
                          <br>
                          Nobody at Jolla is actively working on it at
                          the moment, our resources are limited these
                          days. If somebody has an idea how to fix it,
                          feel free to submit a pull request against
                          mer-5.6 branch (<a moz-do-not-send="true"
                            href="https://git.merproject.org/mer-core/qtbase/commits/mer-5.6"
                            rel="noreferrer" target="_blank">https://git.merproject.org/me<wbr>r-core/qtbase/commits/mer-5.6</a>)<wbr>.<br>
                          <br>
                          Best regards,<br>
                          -Slava<span class="m_1251028547860576262im
                            m_1251028547860576262HOEnZb"><br>
                            <br>
                            <br>
                            <blockquote class="gmail_quote"
                              style="margin:0 0 0 .8ex;border-left:1px
                              #ccc solid;padding-left:1ex"> Hi,<br>
                              <br>
                              The same happens in my Rush hour app
                              available in OpenRepos. My only connection
                              to network is via QtQuick.XmlListModel
                              2.0. I am using Jolla C and the latest
                              Iijoki 2.1.0.11<br>
                              <br>
                              <a moz-do-not-send="true"
                                href="https://github.com/Rikujolla/trafficviewer/issues/2"
                                rel="noreferrer" target="_blank">https://github.com/Rikujolla/t<wbr>rafficviewer/issues/2</a><br>
                              <br>
                              Best regards, Riku<br>
                              <br>
                              Sebastian Wolf kirjoitti sunnuntai 23.
                              huhtikuuta 2017:<br>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex"> Hi
                                colleagues,<br>
                                  some users of my application Piepmatz
                                are reporting network issues when their<br>
                                device network connection changes from
                                WiFi to Cellular and vice versa. I<br>
                                couldn't reproduce it so far with my FP2
                                on 2.0.5. As I'm only using standard Qt<br>
                                Network classes to access the internet
                                and no own network detection and<br>
                                especially that not only my application
                                is affected, it could possibly be<br>
                                something in 2.1 itself. For some
                                details see GitHub issue<br>
                                <a moz-do-not-send="true"
                                  href="https://github.com/Wunderfitz/harbour-piepmatz/issues/11"
                                  rel="noreferrer" target="_blank">https://github.com/Wunderfitz/<wbr>harbour-piepmatz/issues/11</a><br>
                                  Didn't find anything with a quick
                                search on <a moz-do-not-send="true"
                                  href="http://together.jolla.com"
                                  rel="noreferrer" target="_blank">together.jolla.com</a>,
                                so does somebody<br>
                                of you know something about such an
                                issue?<br>
                                  Thanks for any hints and best regards,
                                Sebastia<br>
                              </blockquote>
                            </blockquote>
                            <br>
                          </span>
                          <div class="m_1251028547860576262HOEnZb">
                            <div class="m_1251028547860576262h5">
                              ______________________________<wbr>_________________<br>
                              SailfishOS.org Devel mailing list<br>
                              To unsubscribe, please send a mail to <a
                                moz-do-not-send="true"
                                href="mailto:devel-unsubscribe@lists.sailfishos.org"
                                target="_blank">devel-unsubscribe@lists.sailfi<wbr>shos.org</a></div>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                    <br>
                    <fieldset
                      class="m_1251028547860576262mimeAttachmentHeader"></fieldset>
                    <br>
                    <pre>______________________________<wbr>_________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to <a moz-do-not-send="true" class="m_1251028547860576262moz-txt-link-abbreviated" href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.<wbr>sailfishos.org</a></pre>
    </blockquote>
    

  </div></div></div>


______________________________<wbr>_________________

SailfishOS.org Devel mailing list

To unsubscribe, please send a mail to <a moz-do-not-send="true" href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.<wbr>sailfishos.org</a>
</blockquote></div>
</div>


<fieldset class="mimeAttachmentHeader"></fieldset>
<pre wrap="">_______________________________________________
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>
</body></html>