Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QJSONDocument and QNetworkReply

QJSONDocument and QNetworkReply

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 990 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    iFoggz
    wrote on last edited by
    #1

    Ive run into a little problem addressing a bug;

    The application runs fine and receives a JSON response in linux.
    the application runs fine and receives a JSON response on windows when compiled with debug symbols and running in gdb.
    the application runs fine but does not receive a JSON response on windows in release version.

    QT 5.8.0

    This is a little confusing. The problem area is :

    try
    {
        QByteArray data;
        data = reply->readAll();
        std::string newVersionString;
    
        QJsonDocument replyJson = QJsonDocument::fromJson(data);
        QJsonObject obj = replyJson.object();
        if(!obj.empty()) {
    

    NOTE: obj is empty only in windows release version of the code. linux release its not empty and windows release with debug symbols running in gdb is not empty.

    any ideas.

    1 Reply Last reply
    0
    • I Offline
      I Offline
      iFoggz
      wrote on last edited by
      #4

      this sounds completely stupid but turns out the debugger is more forgiving dll wise and a dll was forgotten. my bad ! figured it out with errorReply() said SSL problems.

      1 Reply Last reply
      1
      • I Offline
        I Offline
        iFoggz
        wrote on last edited by
        #2

        upn looking further back i realised is the issue is with the network reply. it gets a empty or blank one and finished is signaled.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #3

          Hi and welcome to devnet,

          Did you try something like WireShark to see what happens on the network when it's not working ?
          Does your server generated something wrong ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • I Offline
            I Offline
            iFoggz
            wrote on last edited by
            #4

            this sounds completely stupid but turns out the debugger is more forgiving dll wise and a dll was forgotten. my bad ! figured it out with errorReply() said SSL problems.

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved