Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70795

QNetworkRequest invalid parameter passed to C runtime function issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P2: Important P2: Important
    • None
    • 5.9.6
    • Qt Script
    • None
    • Windows 10 build 17763
      Qt 5.9.6
      Visual Studio 2017 version: 15.8.5
    • Windows

      Hi! After updating to Windows 10 build 17763, I get the issue with networking code.

      For example, when I run this code to post some data to the server with attached debugger:

       

       QUrl url;
       url.setUrl("https://test.com/test_link.php");
       QUrlQuery urlQuery;
       urlQuery.addQueryItem("test1", value1);
       urlQuery.addQueryItem("test2", value2);
       QNetworkAccessManager *netManager = new QNetworkAccessManager(this);
       QNetworkRequest request(url);
       request.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/x-www-form-urlencoded"));
       netManager->post(request, urlQuery.toString(QUrl::FullyEncoded).toUtf8());
       connect(netManager, &QNetworkAccessManager::finished, [this, netManager](QNetworkReply *reply) {
           qDebug() << reply->bytesAvailable();
           reply->close();
           reply->deleteLater();
           netManager->deleteLater();
       });
      

      I get the following issue: 

      Invalid parameter passed to C runtime function.

      Screenshot:

      On the previous Windows 10 version, no such issue occurs. Can someone confirm it? Thanks.

       

        1. 2018-09-27_223618.png
          4 kB
          Ruslan Sydorvych
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            tpochep Timur Pocheptsov
            cobra91151 Ruslan Sydorvych
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes